From: b Date: Sat, 24 Feb 2024 22:39:30 +0000 (+0000) Subject: started addpost X-Git-Tag: v1.0.5~1 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=8dfb53e27ad7b316d35778498056cf61e5ca640f;p=ott%2Fpost started addpost --- diff --git a/addpost.1.pl b/addpost.1.pl new file mode 100644 index 0000000..019462b --- /dev/null +++ b/addpost.1.pl @@ -0,0 +1,38 @@ +###RUN_PERL: + +# Copyright (C) 2024 Balthasar Szczepański +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use strict; +use utf8; +use Getopt::Long; +use Encode::Locale ('decode_argv'); +use Encode ('encode', 'decode'); + +###PERL_LIB: use lib '/botm/lib/post'; +use botm_common ( + # 'read_data_file', 'write_data_file', + # 'read_header_file', + # 'merge_url', + # 'html_entity_decode', 'url_query_encode', + # 'make_temp_path' +); +use post_common ( + # 'prepare_post', + # 'wget', + # 'CODE' +); + +# TODO contione \ No newline at end of file diff --git a/exec b/exec index 92cf35c..4cc21a9 160000 --- a/exec +++ b/exec @@ -1 +1 @@ -Subproject commit 92cf35c0340afcadb39f06248de26e114ad5603c +Subproject commit 4cc21a9192d4f85d7dcee52333e5810d8aadc109 diff --git a/makefile b/makefile index 2987f3c..27c240f 100644 --- a/makefile +++ b/makefile @@ -32,10 +32,13 @@ MKDIR=/usr/bin/mkdir RM =/usr/bin/rm PERL =/usr/bin/perl -BIN_PATH = /botm/bin/test-post -DATA_PATH = /botm/data/test-post -LIB_PATH = /botm/lib/test-post -TMP_PATH = /botm/tmp/test-post +BIN_PATH = /botm/bin/test-post +DATA_PATH = /botm/data/test-post +DATA_FAIL_PATH = /botm/data/test-post/fail +DATA_SENT_PATH = /botm/data/test-post/sent +DATA_WAIT_PATH = /botm/data/test-post/wait +LIB_PATH = /botm/lib/test-post +TMP_PATH = /botm/tmp/test-post CONFIGFILE = settings-$(TARGET).txt settings.txt @@ -46,11 +49,13 @@ CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ +addpost.1.pl\ sendpost.1.pl\ preview.1.pl\ post_common.1.pm TO_GENERATE=\ +addpost.pl\ sendpost.pl\ preview.pl\ post_common.pm @@ -58,20 +63,29 @@ post_common.pm DIR=\ $(BIN_PATH)\ $(DATA_PATH)\ +$(DATA_FAIL_PATH)\ +$(DATA_SENT_PATH)\ +$(DATA_WAIT_PATH)\ $(LIB_PATH)\ $(TMP_PATH) HIDDEN_DIR=\ +$(DATA_FAIL_PATH)\ +$(DATA_SENT_PATH)\ +$(DATA_WAIT_PATH)\ $(TMP_PATH) SETUID=\ -sendpost.pl +addpost\ +sendpost EXEC=\ +addpost.pl\ sendpost.pl\ preview.pl PERL_WRAP_EXEC=\ +addpost\ sendpost\ preview diff --git a/makefile.1.mak b/makefile.1.mak index 2c6ac43..06819d8 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -32,10 +32,13 @@ PERL = perl ###MAKE_RM: RM = rm ###MAKE_PERL: PERL = perl -###MAKE_BIN_PATH: BIN_PATH = /botm/bin/post -###MAKE_DATA_PATH: DATA_PATH = /botm/data/post -###MAKE_LIB_PATH: LIB_PATH = /botm/lib/post -###MAKE_TMP_PATH: TMP_PATH = /botm/tmp/post +###MAKE_BIN_PATH: BIN_PATH = /botm/bin/post +###MAKE_DATA_PATH: DATA_PATH = /botm/data/post +###MAKE_DATA_FAIL_PATH: DATA_FAIL_PATH = /botm/data/post/fail +###MAKE_DATA_SENT_PATH: DATA_SENT_PATH = /botm/data/post/sent +###MAKE_DATA_WAIT_PATH: DATA_WAIT_PATH = /botm/data/post/wait +###MAKE_LIB_PATH: LIB_PATH = /botm/lib/post +###MAKE_TMP_PATH: TMP_PATH = /botm/tmp/post CONFIGFILE = settings-$(TARGET).txt settings.txt @@ -46,11 +49,13 @@ CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) # keep these 2 lists in the same order!: GENERATE_FROM=\ +addpost.1.pl\ sendpost.1.pl\ preview.1.pl\ post_common.1.pm TO_GENERATE=\ +addpost.pl\ sendpost.pl\ preview.pl\ post_common.pm @@ -58,20 +63,29 @@ post_common.pm DIR=\ $(BIN_PATH)\ $(DATA_PATH)\ +$(DATA_FAIL_PATH)\ +$(DATA_SENT_PATH)\ +$(DATA_WAIT_PATH)\ $(LIB_PATH)\ $(TMP_PATH) HIDDEN_DIR=\ +$(DATA_FAIL_PATH)\ +$(DATA_SENT_PATH)\ +$(DATA_WAIT_PATH)\ $(TMP_PATH) SETUID=\ -sendpost.pl +addpost\ +sendpost EXEC=\ +addpost.pl\ sendpost.pl\ preview.pl PERL_WRAP_EXEC=\ +addpost\ sendpost\ preview diff --git a/settings.txt b/settings.txt index a11c314..a980017 100644 --- a/settings.txt +++ b/settings.txt @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -_version: 1.0.4 +_version: 1.0.5 _PERL_STR: '@_ESCAPE($0,')' _SHEBANG: #!$0 @@ -25,6 +25,11 @@ _PERL_CONSTANT_STR: @_PERL_CONSTANT($0,@_PERL_STR($1)) _PERL_OUR: our $0 = $1; _PERL_OUR_STR: @_PERL_OUR(\$$0,@_PERL_STR($1)) +_data_fail_path = @_PATH($data_path, fail) +_data_sent_path = @_PATH($data_path, sent) +_data_wait_path = @_PATH($data_path, wait) + + MAKE_TARGET = TARGET = $target MAKE_CHMOD = CHMOD=$chmod @@ -36,10 +41,13 @@ MAKE_RM = RM =$rm MAKE_CC = CC =$CC MAKE_CF = CF =$CF -MAKE_BIN_PATH = BIN_PATH = $bin_path -MAKE_DATA_PATH = DATA_PATH = $data_path -MAKE_LIB_PATH = LIB_PATH = $lib_path -MAKE_TMP_PATH = TMP_PATH = $tmp_path +MAKE_BIN_PATH = BIN_PATH = $bin_path +MAKE_DATA_PATH = DATA_PATH = $data_path +MAKE_DATA_FAIL_PATH = DATA_FAIL_PATH = $_data_fail_path +MAKE_DATA_SENT_PATH = DATA_SENT_PATH = $_data_sent_path +MAKE_DATA_WAIT_PATH = DATA_WAIT_PATH = $_data_wait_path +MAKE_LIB_PATH = LIB_PATH = $lib_path +MAKE_TMP_PATH = TMP_PATH = $tmp_path PERL_EXPORT_VERSION = @_PERL_OUR_STR( VERSION, $_version)