From: b Date: Wed, 14 Jun 2023 23:17:13 +0000 (+0000) Subject: wget X-Git-Tag: v1.0.0~4 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=b16cc3b4922e18b4b871d8b26a3db41ee9637d23;p=ott%2Fpost wget --- diff --git a/botm-common b/botm-common index b443d98..f59a33c 160000 --- a/botm-common +++ b/botm-common @@ -1 +1 @@ -Subproject commit b443d985fea32c8971cf6ffe5e2821119598d823 +Subproject commit f59a33c43337111906246e3c26df2445886255bb diff --git a/sendpost.1.pl b/sendpost.1.pl index 5108218..5a5cb10 100644 --- a/sendpost.1.pl +++ b/sendpost.1.pl @@ -25,7 +25,8 @@ use Encode ('encode', 'decode'); use botm_common ( 'read_data_file', 'write_data_file', 'merge_url', - 'make_temp_path' + 'make_temp_path', + 'system_encoded' ); ###PERL_ENCODING_FILE: use constant ENCODING_FILE => 'UTF-8'; @@ -34,7 +35,9 @@ use botm_common ( ###PERL_DEFAULT_SUBJECT: use constant DEFAULT_SUBJECT => 'Re: 1190: "Time"'; ###PERL_DEFAULT_USERNAME: use constant DEFAULT_USERNAME => 'username'; -###PERL_TMP_PATH: use constant TMP_PATH => '/botm/tmp/post'; +###PERL_WGET: use constant WGET => '/usr/bin/wget'; + +###PERL_TMP_PATH: use constant TMP_PATH => '/botm/tmp/post'; ###PERL_MIRROR_URL: use constant MIRROR_URL => 'https://1190.bicyclesonthemoon.info/ott'; @@ -269,10 +272,18 @@ sub post_to_mirror { my $cookie_path = make_temp_path(TMP_PATH, 'sendpost.cookie.txt'); my $postdata_path = make_temp_path(TMP_PATH, 'sendpost.postdata.txt'); + wget($post_url, $tmp_path); + + +} + +sub wget { + (my $url, my $path, my $postdata) = @_; + + my @arg = (WGET, '-q', $url, '-O', $path); + system_encoded(WGET, @arg); + - print $post_url."\n"; - print $tmp_path."\n"; - print $cookie_path."\n"; - print $postdata_path."\n"; + return 1; } diff --git a/settings-debug.txt b/settings-debug.txt index bc2ba56..a183570 100644 --- a/settings-debug.txt +++ b/settings-debug.txt @@ -25,3 +25,4 @@ chmod: /usr/bin/chmod mkdir: /usr/bin/mkdir perl: /usr/bin/perl rm: /usr/bin/rm +wget: /usr/bin/wget diff --git a/settings-release.txt b/settings-release.txt index aeeb7fe..e8c91c7 100644 --- a/settings-release.txt +++ b/settings-release.txt @@ -25,3 +25,4 @@ chmod: /usr/bin/chmod mkdir: /usr/bin/mkdir perl: /usr/bin/perl rm: /usr/bin/rm +wget: /usr/bin/wget diff --git a/settings.txt b/settings.txt index 8cd1625..9b845a0 100644 --- a/settings.txt +++ b/settings.txt @@ -42,6 +42,8 @@ PERL_ENCODING_FILE = @_PERL_CONSTANT_STR( ENCODING_FILE , $encoding_file) PERL_MIRROR_URL = @_PERL_CONSTANT_STR( MIRROR_URL , $mirror_url) PERL_TMP_PATH = @_PERL_CONSTANT_STR( TMP_PATH , $tmp_path) +PERL_WGET = @_PERL_CONSTANT_STR( WGET , $wget) + PERL_LIB = @_PERL_USE_2(lib, @_PERL_STR($lib_path))