From cb2d1639816499d6e499ead818a8952952a60bff Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 3 Jun 2017 20:52:57 +0100 Subject: [PATCH] =?UTF-8?q?...rename=20duckbin=20to=20kamokan=20-->=20?= =?UTF-8?q?=E9=B4=A8=E7=BC=B6.=20yay!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 8 ++--- ...ug_duckbin.ini.in => debug_kamokan.ini.in} | 4 +-- config/{duckbin.ini => kamokan.ini} | 2 +- config/nginx/{duckbin.conf => kamokan.conf} | 6 ++-- config/uwsgi/{duckbin.ini => kamokan.ini} | 4 +-- ...kbin-icon-new.xcf => kamokan-icon-new.xcf} | Bin .../{duckbin-icon.png => kamokan-icon.png} | Bin .../{duckbin-icon.xcf => kamokan-icon.xcf} | Bin ...kbin-icon-new.png => kamokan-icon-new.png} | Bin html/website/edit.html.mstch | 14 ++++----- html/website/head.mustache | 6 ++-- html/website/{duckbin.css => kamokan.css} | 0 html/website/topbar.mustache | 4 +-- src/{duckbin => kamokan}/CMakeLists.txt | 10 +++---- .../kamokan_config.h.in} | 14 ++++----- src/{duckbin => kamokan}/main.cpp | 28 +++++++++--------- 16 files changed, 50 insertions(+), 50 deletions(-) rename config/{debug_duckbin.ini.in => debug_kamokan.ini.in} (77%) rename config/{duckbin.ini => kamokan.ini} (93%) rename config/nginx/{duckbin.conf => kamokan.conf} (90%) rename config/uwsgi/{duckbin.ini => kamokan.ini} (67%) rename html/templates/bin/{duckbin-icon-new.xcf => kamokan-icon-new.xcf} (100%) rename html/templates/bin/{duckbin-icon.png => kamokan-icon.png} (100%) rename html/templates/bin/{duckbin-icon.xcf => kamokan-icon.xcf} (100%) rename html/website/Pictures/{duckbin-icon-new.png => kamokan-icon-new.png} (100%) rename html/website/{duckbin.css => kamokan.css} (100%) rename src/{duckbin => kamokan}/CMakeLists.txt (65%) rename src/{duckbin/duckbin_config.h.in => kamokan/kamokan_config.h.in} (62%) rename src/{duckbin => kamokan}/main.cpp (88%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6071a54..9c8e209 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR) list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) -project(duckbin_top LANGUAGES NONE) +project(kamokan_top LANGUAGES NONE) include(CTest) @@ -8,15 +8,15 @@ set(INCREDIS_FORCE_DISABLE_TESTS ON) set(TAWASHI_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/config/debug_duckbin.ini.in" - "${CMAKE_CURRENT_BINARY_DIR}/duckbin.ini" + "${CMAKE_CURRENT_SOURCE_DIR}/config/debug_kamokan.ini.in" + "${CMAKE_CURRENT_BINARY_DIR}/kamokan.ini" ) add_subdirectory(lib/incredis) add_subdirectory(lib/mstch) add_subdirectory(lib/houdini) add_subdirectory(src/tawashi) -add_subdirectory(src/duckbin) +add_subdirectory(src/kamokan) install(DIRECTORY html/website/ DESTINATION html) diff --git a/config/debug_duckbin.ini.in b/config/debug_kamokan.ini.in similarity index 77% rename from config/debug_duckbin.ini.in rename to config/debug_kamokan.ini.in index d1386c3..e3020e5 100644 --- a/config/debug_duckbin.ini.in +++ b/config/debug_kamokan.ini.in @@ -1,4 +1,4 @@ -[duckbin] +[kamokan] redis_server = 127.0.0.1 redis_port = 6379 redis_mode = inet @@ -7,4 +7,4 @@ host_port = from_downstream highlight_css = sh_greenlcd.css website_root = @CMAKE_CURRENT_BINARY_DIR@/html logging_level = trace -log_file = @CMAKE_CURRENT_BINARY_DIR@/duckbin.log +log_file = @CMAKE_CURRENT_BINARY_DIR@/kamokan.log diff --git a/config/duckbin.ini b/config/kamokan.ini similarity index 93% rename from config/duckbin.ini rename to config/kamokan.ini index 522f32a..ccc8ab3 100644 --- a/config/duckbin.ini +++ b/config/kamokan.ini @@ -1,4 +1,4 @@ -[duckbin] +[kamokan] redis_server = 127.0.0.1 redis_port = 6379 redis_mode = inet diff --git a/config/nginx/duckbin.conf b/config/nginx/kamokan.conf similarity index 90% rename from config/nginx/duckbin.conf rename to config/nginx/kamokan.conf index 28944db..eaa1d8d 100644 --- a/config/nginx/duckbin.conf +++ b/config/nginx/kamokan.conf @@ -1,6 +1,6 @@ server { listen 8080; - #server_name duckbin.domain.*; + #server_name kamokan.domain.*; server_name 127.0.0.1; #charset koi8-r; @@ -10,10 +10,10 @@ server { index index.cgi; include uwsgi_params; uwsgi_modifier1 9; - uwsgi_pass unix:/run/uwsgi/duckbin.sock; + uwsgi_pass unix:/run/uwsgi/kamokan.sock; } location ~ (\.css$|Pictures/) { - root /srv/http/duckbin; + root /srv/http/kamokan; } #error_page 404 /404.html; diff --git a/config/uwsgi/duckbin.ini b/config/uwsgi/kamokan.ini similarity index 67% rename from config/uwsgi/duckbin.ini rename to config/uwsgi/kamokan.ini index 51c4f51..6d1a227 100644 --- a/config/uwsgi/duckbin.ini +++ b/config/uwsgi/kamokan.ini @@ -2,9 +2,9 @@ processes = 4 master = 1 socket = /run/uwsgi/%n.sock -cgi = /srv/http/duckbin/%n.cgi +cgi = /srv/http/kamokan/%n.cgi chmod-socket = 664 strict = true gid = http plugins = cgi -chdir = /srv/http/duckbin +chdir = /srv/http/kamokan diff --git a/html/templates/bin/duckbin-icon-new.xcf b/html/templates/bin/kamokan-icon-new.xcf similarity index 100% rename from html/templates/bin/duckbin-icon-new.xcf rename to html/templates/bin/kamokan-icon-new.xcf diff --git a/html/templates/bin/duckbin-icon.png b/html/templates/bin/kamokan-icon.png similarity index 100% rename from html/templates/bin/duckbin-icon.png rename to html/templates/bin/kamokan-icon.png diff --git a/html/templates/bin/duckbin-icon.xcf b/html/templates/bin/kamokan-icon.xcf similarity index 100% rename from html/templates/bin/duckbin-icon.xcf rename to html/templates/bin/kamokan-icon.xcf diff --git a/html/website/Pictures/duckbin-icon-new.png b/html/website/Pictures/kamokan-icon-new.png similarity index 100% rename from html/website/Pictures/duckbin-icon-new.png rename to html/website/Pictures/kamokan-icon-new.png diff --git a/html/website/edit.html.mstch b/html/website/edit.html.mstch index 4c1dd2f..8a09ab8 100644 --- a/html/website/edit.html.mstch +++ b/html/website/edit.html.mstch @@ -2,20 +2,20 @@ - DuckBin + KamoKan - + - + - +
-

duckbin 1.0.0

- duckbin icon +

kamokan 1.0.0

+ kamokan icon new icon duplicate and edit icon @@ -27,6 +27,6 @@

- + diff --git a/html/website/head.mustache b/html/website/head.mustache index b84dc01..06627c4 100644 --- a/html/website/head.mustache +++ b/html/website/head.mustache @@ -2,12 +2,12 @@ - DuckBin + KamoKan - + - + diff --git a/html/website/duckbin.css b/html/website/kamokan.css similarity index 100% rename from html/website/duckbin.css rename to html/website/kamokan.css diff --git a/html/website/topbar.mustache b/html/website/topbar.mustache index c68d1bf..665ae12 100644 --- a/html/website/topbar.mustache +++ b/html/website/topbar.mustache @@ -1,6 +1,6 @@
-

duckbin {{version}}

- duckbin icon +

kamokan {{version}}

+ kamokan icon new icon duplicate and edit icon diff --git a/src/duckbin/CMakeLists.txt b/src/kamokan/CMakeLists.txt similarity index 65% rename from src/duckbin/CMakeLists.txt rename to src/kamokan/CMakeLists.txt index 8d5bb0f..7a8d9c2 100644 --- a/src/duckbin/CMakeLists.txt +++ b/src/kamokan/CMakeLists.txt @@ -1,7 +1,7 @@ -project(duckbin VERSION 0.1.0 LANGUAGES CXX) +project(kamokan VERSION 0.1.0 LANGUAGES CXX) -set(DUCKBIN_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix") -set(DUCKBIN_CONFIG_FILE "duckbin.ini" CACHE STRING "Filename of the config file in DUCKBIN_CONFIG_PATH") +set(KAMOKAN_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix") +set(KAMOKAN_CONFIG_FILE "kamokan.ini" CACHE STRING "Filename of the config file in KAMOKAN_CONFIG_PATH") set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -30,6 +30,6 @@ install(TARGETS ${PROJECT_NAME} ) configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/duckbin_config.h.in" - "${CMAKE_CURRENT_BINARY_DIR}/include/duckbin_config.h" + "${CMAKE_CURRENT_SOURCE_DIR}/kamokan_config.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/include/kamokan_config.h" ) diff --git a/src/duckbin/duckbin_config.h.in b/src/kamokan/kamokan_config.h.in similarity index 62% rename from src/duckbin/duckbin_config.h.in rename to src/kamokan/kamokan_config.h.in index e717d11..c8468d8 100644 --- a/src/duckbin/duckbin_config.h.in +++ b/src/kamokan/kamokan_config.h.in @@ -1,25 +1,25 @@ /* Copyright 2017, Michele Santullo - * This file is part of "duckbin". + * This file is part of "kamokan". * - * "duckbin" is free software: you can redistribute it and/or modify + * "kamokan" is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * "duckbin" is distributed in the hope that it will be useful, + * "kamokan" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with "duckbin". If not, see . + * along with "kamokan". If not, see . */ #pragma once -#define DUCKBIN_CONFIG_PATH "@DUCKBIN_CONFIG_PATH@" -#define DUCKBIN_CONFIG_FILE "@DUCKBIN_CONFIG_FILE@" -#define DUCKBIN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@" +#define KAMOKAN_CONFIG_PATH "@KAMOKAN_CONFIG_PATH@" +#define KAMOKAN_CONFIG_FILE "@KAMOKAN_CONFIG_FILE@" +#define KAMOKAN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@" #define VERSION_MAJOR @PROJECT_VERSION_MAJOR@ #define VERSION_MINOR @PROJECT_VERSION_MINOR@ #define VERSION_PATCH @PROJECT_VERSION_PATCH@ diff --git a/src/duckbin/main.cpp b/src/kamokan/main.cpp similarity index 88% rename from src/duckbin/main.cpp rename to src/kamokan/main.cpp index 10e738e..edc5438 100644 --- a/src/duckbin/main.cpp +++ b/src/kamokan/main.cpp @@ -1,21 +1,21 @@ /* Copyright 2017, Michele Santullo - * This file is part of "duckbin". + * This file is part of "kamokan". * - * "duckbin" is free software: you can redistribute it and/or modify + * "kamokan" is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * "duckbin" is distributed in the hope that it will be useful, + * "kamokan" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with "duckbin". If not, see . + * along with "kamokan". If not, see . */ -#include "duckbin_config.h" +#include "kamokan_config.h" #include "submit_paste_response.hpp" #include "quick_submit_paste_response.hpp" #include "pastie_response.hpp" @@ -43,16 +43,16 @@ namespace { std::string config_file_path() a_pure; std::string config_file_path() { - mchlib::PathName config_path(DUCKBIN_CONFIG_PATH); + mchlib::PathName config_path(KAMOKAN_CONFIG_PATH); mchlib::PathName full_path(""); if (config_path.is_absolute()) { full_path = std::move(config_path); } else { - full_path = mchlib::PathName(DUCKBIN_PATH_PREFIX); + full_path = mchlib::PathName(KAMOKAN_PATH_PREFIX); full_path.join(config_path); } - full_path.join(DUCKBIN_CONFIG_FILE); + full_path.join(KAMOKAN_CONFIG_FILE); return full_path.path(); } @@ -95,9 +95,9 @@ namespace { std::cout << "no (Debug build)"; #endif std::cout << '\n'; - std::cout << "DUCKBIN_CONFIG_FILE: \"" << DUCKBIN_CONFIG_FILE << "\"\n"; - std::cout << "DUCKBIN_CONFIG_PATH: \"" << DUCKBIN_CONFIG_PATH << "\"\n"; - std::cout << "DUCKBIN_PATH_PREFIX: \"" << DUCKBIN_PATH_PREFIX << "\"\n"; + std::cout << "KAMOKAN_CONFIG_FILE: \"" << KAMOKAN_CONFIG_FILE << "\"\n"; + std::cout << "KAMOKAN_CONFIG_PATH: \"" << KAMOKAN_CONFIG_PATH << "\"\n"; + std::cout << "KAMOKAN_PATH_PREFIX: \"" << KAMOKAN_PATH_PREFIX << "\"\n"; std::cout << "VERSION_MAJOR: " << VERSION_MAJOR << '\n'; std::cout << "VERSION_MINOR: " << VERSION_MINOR << '\n'; std::cout << "VERSION_PATCH: " << VERSION_PATCH << '\n'; @@ -147,11 +147,11 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) { } SafeStackObject ini = load_ini(); - auto settings = SafeStackObject(ini, "duckbin"); + auto settings = SafeStackObject(ini, "kamokan"); fill_defaults(*settings); auto statuslog = setup_logging(*settings); - SPDLOG_DEBUG(statuslog, "duckbin started"); + SPDLOG_DEBUG(statuslog, "kamokan started"); int retval = 0; try { statuslog->info("Loaded config: \"{}\"", config_file_path()); @@ -178,6 +178,6 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) { retval = 1; } - SPDLOG_DEBUG(statuslog, "duckbin done, quitting with {}", retval); + SPDLOG_DEBUG(statuslog, "kamokan done, quitting with {}", retval); return retval; }