mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-11-27 00:43:47 +00:00
...rename duckbin to kamokan --> 鴨缶. yay!
This commit is contained in:
parent
ae283b6c96
commit
cb2d163981
16 changed files with 50 additions and 50 deletions
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||||
project(duckbin_top LANGUAGES NONE)
|
project(kamokan_top LANGUAGES NONE)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
|
@ -8,15 +8,15 @@ set(INCREDIS_FORCE_DISABLE_TESTS ON)
|
||||||
set(TAWASHI_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(TAWASHI_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/config/debug_duckbin.ini.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/config/debug_kamokan.ini.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/duckbin.ini"
|
"${CMAKE_CURRENT_BINARY_DIR}/kamokan.ini"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(lib/incredis)
|
add_subdirectory(lib/incredis)
|
||||||
add_subdirectory(lib/mstch)
|
add_subdirectory(lib/mstch)
|
||||||
add_subdirectory(lib/houdini)
|
add_subdirectory(lib/houdini)
|
||||||
add_subdirectory(src/tawashi)
|
add_subdirectory(src/tawashi)
|
||||||
add_subdirectory(src/duckbin)
|
add_subdirectory(src/kamokan)
|
||||||
|
|
||||||
install(DIRECTORY html/website/ DESTINATION html)
|
install(DIRECTORY html/website/ DESTINATION html)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[duckbin]
|
[kamokan]
|
||||||
redis_server = 127.0.0.1
|
redis_server = 127.0.0.1
|
||||||
redis_port = 6379
|
redis_port = 6379
|
||||||
redis_mode = inet
|
redis_mode = inet
|
||||||
|
@ -7,4 +7,4 @@ host_port = from_downstream
|
||||||
highlight_css = sh_greenlcd.css
|
highlight_css = sh_greenlcd.css
|
||||||
website_root = @CMAKE_CURRENT_BINARY_DIR@/html
|
website_root = @CMAKE_CURRENT_BINARY_DIR@/html
|
||||||
logging_level = trace
|
logging_level = trace
|
||||||
log_file = @CMAKE_CURRENT_BINARY_DIR@/duckbin.log
|
log_file = @CMAKE_CURRENT_BINARY_DIR@/kamokan.log
|
|
@ -1,4 +1,4 @@
|
||||||
[duckbin]
|
[kamokan]
|
||||||
redis_server = 127.0.0.1
|
redis_server = 127.0.0.1
|
||||||
redis_port = 6379
|
redis_port = 6379
|
||||||
redis_mode = inet
|
redis_mode = inet
|
|
@ -1,6 +1,6 @@
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
#server_name duckbin.domain.*;
|
#server_name kamokan.domain.*;
|
||||||
server_name 127.0.0.1;
|
server_name 127.0.0.1;
|
||||||
#charset koi8-r;
|
#charset koi8-r;
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ server {
|
||||||
index index.cgi;
|
index index.cgi;
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_modifier1 9;
|
uwsgi_modifier1 9;
|
||||||
uwsgi_pass unix:/run/uwsgi/duckbin.sock;
|
uwsgi_pass unix:/run/uwsgi/kamokan.sock;
|
||||||
}
|
}
|
||||||
location ~ (\.css$|Pictures/) {
|
location ~ (\.css$|Pictures/) {
|
||||||
root /srv/http/duckbin;
|
root /srv/http/kamokan;
|
||||||
}
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
#error_page 404 /404.html;
|
|
@ -2,9 +2,9 @@
|
||||||
processes = 4
|
processes = 4
|
||||||
master = 1
|
master = 1
|
||||||
socket = /run/uwsgi/%n.sock
|
socket = /run/uwsgi/%n.sock
|
||||||
cgi = /srv/http/duckbin/%n.cgi
|
cgi = /srv/http/kamokan/%n.cgi
|
||||||
chmod-socket = 664
|
chmod-socket = 664
|
||||||
strict = true
|
strict = true
|
||||||
gid = http
|
gid = http
|
||||||
plugins = cgi
|
plugins = cgi
|
||||||
chdir = /srv/http/duckbin
|
chdir = /srv/http/kamokan
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -2,20 +2,20 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>DuckBin</title>
|
<title>KamoKan</title>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="description" content="DuckBin, text storage site." />
|
<meta name="description" content="KamoKan, text storage site." />
|
||||||
<meta name="keywords" content="text storage, pastebin, source code snippets, code review" />
|
<meta name="keywords" content="text storage, pastebin, source code snippets, code review" />
|
||||||
<meta name="author" content="Unknown" />
|
<meta name="author" content="Unknown" />
|
||||||
<link rel="stylesheet" href="duckbin.css" />
|
<link rel="stylesheet" href="kamokan.css" />
|
||||||
<link rel="icon" href="icon" />
|
<link rel="icon" href="icon" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="topbar">
|
<div id="topbar">
|
||||||
<p id="version">duckbin 1.0.0</p>
|
<p id="version">kamokan 1.0.0</p>
|
||||||
<a href="index.html"><img src="Pictures/duckbin-icon-new.png" alt="duckbin icon" class="icon"></a>
|
<a href="index.html"><img src="Pictures/kamokan-icon-new.png" alt="kamokan icon" class="icon"></a>
|
||||||
<a href="save.html"><input type="image" src="Pictures/save-ink-t.png" alt="Submit" class="icon-green" title="Save"/></a>
|
<a href="save.html"><input type="image" src="Pictures/save-ink-t.png" alt="Submit" class="icon-green" title="Save"/></a>
|
||||||
<a href="index.html"><img src="Pictures/new-ink-t.png" alt="new icon" class="icon-green" title="New"/></a>
|
<a href="index.html"><img src="Pictures/new-ink-t.png" alt="new icon" class="icon-green" title="New"/></a>
|
||||||
<a href=""><img src="Pictures/edit-ink-t.png" alt="duplicate and edit icon" class="icon-green" title="Duplicate and Edit"/></a>
|
<a href=""><img src="Pictures/edit-ink-t.png" alt="duplicate and edit icon" class="icon-green" title="Duplicate and Edit"/></a>
|
||||||
|
@ -27,6 +27,6 @@
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>DuckBin</title>
|
<title>KamoKan</title>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="description" content="DuckBin, text storage site." />
|
<meta name="description" content="KamoKan, text storage site." />
|
||||||
<meta name="keywords" content="text storage, pastebin, source code snippets, code review" />
|
<meta name="keywords" content="text storage, pastebin, source code snippets, code review" />
|
||||||
<meta name="author" content="Elena" />
|
<meta name="author" content="Elena" />
|
||||||
<link rel="stylesheet" href="duckbin.css" />
|
<link rel="stylesheet" href="kamokan.css" />
|
||||||
<link rel="icon" href="icon" />
|
<link rel="icon" href="icon" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="topbar">
|
<div id="topbar">
|
||||||
<p id="version">duckbin {{version}}</p>
|
<p id="version">kamokan {{version}}</p>
|
||||||
<a href="{{base_uri}}"><img src="Pictures/duckbin-icon-new.png" alt="duckbin icon" class="icon"></a>
|
<a href="{{base_uri}}"><img src="Pictures/kamokan-icon-new.png" alt="kamokan icon" class="icon"></a>
|
||||||
<a href="save.html"><input type="image" src="Pictures/save-ink.png" alt="Submit" class="icon-green" title="Paste"/></a>
|
<a href="save.html"><input type="image" src="Pictures/save-ink.png" alt="Submit" class="icon-green" title="Paste"/></a>
|
||||||
<a href="{{base_uri}}"><img src="Pictures/new-ink.png" alt="new icon" class="icon-green" title="New"/></a>
|
<a href="{{base_uri}}"><img src="Pictures/new-ink.png" alt="new icon" class="icon-green" title="New"/></a>
|
||||||
<a href="edit.html"><img src="Pictures/edit-ink.png" alt="duplicate and edit icon" class="icon-green" title="Duplicate and Edit"/></a>
|
<a href="edit.html"><img src="Pictures/edit-ink.png" alt="duplicate and edit icon" class="icon-green" title="Duplicate and Edit"/></a>
|
||||||
|
|
|
@ -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(KAMOKAN_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_FILE "kamokan.ini" CACHE STRING "Filename of the config file in KAMOKAN_CONFIG_PATH")
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
@ -30,6 +30,6 @@ install(TARGETS ${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/duckbin_config.h.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/kamokan_config.h.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/include/duckbin_config.h"
|
"${CMAKE_CURRENT_BINARY_DIR}/include/kamokan_config.h"
|
||||||
)
|
)
|
|
@ -1,25 +1,25 @@
|
||||||
/* Copyright 2017, Michele Santullo
|
/* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (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
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with "duckbin". If not, see <http://www.gnu.org/licenses/>.
|
* along with "kamokan". If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define DUCKBIN_CONFIG_PATH "@DUCKBIN_CONFIG_PATH@"
|
#define KAMOKAN_CONFIG_PATH "@KAMOKAN_CONFIG_PATH@"
|
||||||
#define DUCKBIN_CONFIG_FILE "@DUCKBIN_CONFIG_FILE@"
|
#define KAMOKAN_CONFIG_FILE "@KAMOKAN_CONFIG_FILE@"
|
||||||
#define DUCKBIN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
#define KAMOKAN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||||
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||||||
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
|
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||||||
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
|
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
|
|
@ -1,21 +1,21 @@
|
||||||
/* Copyright 2017, Michele Santullo
|
/* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (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
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with "duckbin". If not, see <http://www.gnu.org/licenses/>.
|
* along with "kamokan". If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "duckbin_config.h"
|
#include "kamokan_config.h"
|
||||||
#include "submit_paste_response.hpp"
|
#include "submit_paste_response.hpp"
|
||||||
#include "quick_submit_paste_response.hpp"
|
#include "quick_submit_paste_response.hpp"
|
||||||
#include "pastie_response.hpp"
|
#include "pastie_response.hpp"
|
||||||
|
@ -43,16 +43,16 @@ namespace {
|
||||||
std::string config_file_path() a_pure;
|
std::string config_file_path() a_pure;
|
||||||
|
|
||||||
std::string config_file_path() {
|
std::string config_file_path() {
|
||||||
mchlib::PathName config_path(DUCKBIN_CONFIG_PATH);
|
mchlib::PathName config_path(KAMOKAN_CONFIG_PATH);
|
||||||
mchlib::PathName full_path("");
|
mchlib::PathName full_path("");
|
||||||
if (config_path.is_absolute()) {
|
if (config_path.is_absolute()) {
|
||||||
full_path = std::move(config_path);
|
full_path = std::move(config_path);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
full_path = mchlib::PathName(DUCKBIN_PATH_PREFIX);
|
full_path = mchlib::PathName(KAMOKAN_PATH_PREFIX);
|
||||||
full_path.join(config_path);
|
full_path.join(config_path);
|
||||||
}
|
}
|
||||||
full_path.join(DUCKBIN_CONFIG_FILE);
|
full_path.join(KAMOKAN_CONFIG_FILE);
|
||||||
return full_path.path();
|
return full_path.path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,9 +95,9 @@ namespace {
|
||||||
std::cout << "no (Debug build)";
|
std::cout << "no (Debug build)";
|
||||||
#endif
|
#endif
|
||||||
std::cout << '\n';
|
std::cout << '\n';
|
||||||
std::cout << "DUCKBIN_CONFIG_FILE: \"" << DUCKBIN_CONFIG_FILE << "\"\n";
|
std::cout << "KAMOKAN_CONFIG_FILE: \"" << KAMOKAN_CONFIG_FILE << "\"\n";
|
||||||
std::cout << "DUCKBIN_CONFIG_PATH: \"" << DUCKBIN_CONFIG_PATH << "\"\n";
|
std::cout << "KAMOKAN_CONFIG_PATH: \"" << KAMOKAN_CONFIG_PATH << "\"\n";
|
||||||
std::cout << "DUCKBIN_PATH_PREFIX: \"" << DUCKBIN_PATH_PREFIX << "\"\n";
|
std::cout << "KAMOKAN_PATH_PREFIX: \"" << KAMOKAN_PATH_PREFIX << "\"\n";
|
||||||
std::cout << "VERSION_MAJOR: " << VERSION_MAJOR << '\n';
|
std::cout << "VERSION_MAJOR: " << VERSION_MAJOR << '\n';
|
||||||
std::cout << "VERSION_MINOR: " << VERSION_MINOR << '\n';
|
std::cout << "VERSION_MINOR: " << VERSION_MINOR << '\n';
|
||||||
std::cout << "VERSION_PATCH: " << VERSION_PATCH << '\n';
|
std::cout << "VERSION_PATCH: " << VERSION_PATCH << '\n';
|
||||||
|
@ -147,11 +147,11 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeStackObject<tawashi::IniFile> ini = load_ini();
|
SafeStackObject<tawashi::IniFile> ini = load_ini();
|
||||||
auto settings = SafeStackObject<tawashi::SettingsBag>(ini, "duckbin");
|
auto settings = SafeStackObject<tawashi::SettingsBag>(ini, "kamokan");
|
||||||
fill_defaults(*settings);
|
fill_defaults(*settings);
|
||||||
|
|
||||||
auto statuslog = setup_logging(*settings);
|
auto statuslog = setup_logging(*settings);
|
||||||
SPDLOG_DEBUG(statuslog, "duckbin started");
|
SPDLOG_DEBUG(statuslog, "kamokan started");
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
try {
|
try {
|
||||||
statuslog->info("Loaded config: \"{}\"", config_file_path());
|
statuslog->info("Loaded config: \"{}\"", config_file_path());
|
||||||
|
@ -178,6 +178,6 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) {
|
||||||
retval = 1;
|
retval = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPDLOG_DEBUG(statuslog, "duckbin done, quitting with {}", retval);
|
SPDLOG_DEBUG(statuslog, "kamokan done, quitting with {}", retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
Loading…
Reference in a new issue