From: b Date: Tue, 2 Jan 2024 18:44:08 +0000 (+0000) Subject: add source & license & author information; fix fake index html bug X-Git-Tag: v1.0.0~32 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=0225fbd85cfc67074713321347c500bf798f55a4;p=botm%2Foldlogs add source & license & author information; fix fake index html bug --- diff --git a/2words.1.pl b/2words.1.pl index e679c62..24d41e5 100644 --- a/2words.1.pl +++ b/2words.1.pl @@ -624,5 +624,5 @@ print ' '."\n"; print ' '."\n"; -print_html_body_end(\*STDOUT); +print_html_body_end(\*STDOUT, $ong_state == STATE->{'inactive'}); print_html_end(\*STDOUT); diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index 76d2a6b..eb6d61e 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -106,6 +106,10 @@ use File::Copy; ###PERL_COIN_DATE: COIN_DATE = 13-Nov-2016 22:15 ###PERL_INTF_DATE: INTF_DATE = 28-Sep-2016 20:34 +###PERL_STORY_CREDITS: STORY_CREDITS = "BSTA" by Balthasar Szczepański +###PERL_INTF_CREDITS: INTF_CREDITS = Online interface © Balthasar Szczepański; AGPL 3 license +###PERL_SOURCE_URL: SOURCE_URL = http://bicyclesonthemoon.info/git-projects/?p=ott/bsta + use constant STATE => { 'inactive' => 0, 'waiting' => 1, @@ -945,8 +949,15 @@ sub print_html_body_start { } sub print_html_body_end { - (my $fh) = @_; + (my $fh, my $hide_credits) = @_; print $fh ' '."\n"; + unless ($hide_credits) { + print $fh '

'."\n"; + print $fh ' '.html_entity_encode_dec(STORY_CREDITS(),1).'
'."\n"; + print $fh ' '.html_entity_encode_dec(INTF_CREDITS(),1).'
'."\n"; + print $fh ' source code'."\n"; + print $fh '

'."\n"; + } print $fh ' '.html_entity_encode_dec(WEBSITE(),1).''."\n"; print $fh ' '."\n"; } @@ -1331,7 +1342,7 @@ sub print_viewer_page { print $fh " \n"; print $fh " \n"; - print_html_body_end($fh); + print_html_body_end($fh, $ong_state == STATE->{'inactive'}); print_html_end($fh); @@ -1435,7 +1446,7 @@ sub write_index { print $fh ' '."\n"; print $fh ' '."\n"; print $fh '
Apache/2.2.22 (Debian) Server at '.$_website.' Port 80
'."\n"; - print $fh ' /body>'."\n"; + print $fh ' '."\n"; print_html_end ($fh); } # the launch index @@ -1578,7 +1589,7 @@ sub write_index { print $fh " \n"; - print_html_body_end($fh); + print_html_body_end($fh, $ong_state == STATE->{'inactive'}); print_html_end($fh); } close ($fh); diff --git a/chat.1.pl b/chat.1.pl index f7297f9..a7f4921 100644 --- a/chat.1.pl +++ b/chat.1.pl @@ -5,7 +5,7 @@ # # The coincidence interface # -# Copyright (C) 2016, 2017, 2023 Balthasar Szczepański +# Copyright (C) 2016, 2017, 2023, 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 @@ -35,7 +35,7 @@ use botm_common ( 'html_entity_encode_dec', ); use bsta_lib ( - 'CHAT_STATE', 'CHAT_ACTION', + 'STATE', 'CHAT_STATE', 'CHAT_ACTION', 'fail_method', 'fail_content_type', 'get_remote_addr', 'get_id', 'get_password', 'print_html_start', 'print_html_end', @@ -51,6 +51,7 @@ use File::Copy; ###PERL_DATA_CHAT_PATH: DATA_CHAT_PATH = /botm/data/bsta/chat ###PERL_DATA_COIN_PATH: DATA_COIN_PATH = /botm/data/bsta/coincidence ###PERL_DATA_SETTINGS_PATH: DATA_SETTINGS_PATH = /botm/data/bsta/settings +###PERL_DATA_STATE_PATH: DATA_STATE_PATH = /botm/data/bsta/state ###PERL_WEBSITE_NAME: WEBSITE_NAME = Bicycles on the Moon @@ -64,6 +65,7 @@ my %cgi; my %coin; my %chat; my %settings; +my %state; my $time = time(); srand ($time-$$); @@ -114,6 +116,7 @@ $password = get_password(\%cgi); %coin = read_data_file(DATA_COIN_PATH()); %settings = read_data_file(DATA_SETTINGS_PATH()); +%state = read_data_file(DATA_STATE_PATH()); $password_ok = ($password eq $settings{'password'}); @@ -413,7 +416,7 @@ print ' '."\n"; print ' '."\n"; -print_html_body_end(\*STDOUT); +print_html_body_end(\*STDOUT, int($state{'state'}) == STATE->{'inactive'}); print_html_end(\*STDOUT); diff --git a/settings-again.txt b/settings-again.txt index 0e5c207..733bd9c 100644 --- a/settings-again.txt +++ b/settings-again.txt @@ -84,3 +84,7 @@ coin_date : 13-Nov-2016 22:15 story_length : 16 firstpage_length: 4 page_length : 16 + +story_credits: "BSTA" by Balthasar Szczepański +intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license +source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta diff --git a/settings-bsta.txt b/settings-bsta.txt index 6e2fbb3..6e49fee 100644 --- a/settings-bsta.txt +++ b/settings-bsta.txt @@ -84,3 +84,7 @@ coin_date : 13-Nov-2016 22:15 story_length : 16 firstpage_length: 4 page_length : 16 + +story_credits: "BSTA" by Balthasar Szczepański +intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license +source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta diff --git a/settings-debug.txt b/settings-debug.txt index c53dfd3..afd592a 100644 --- a/settings-debug.txt +++ b/settings-debug.txt @@ -84,3 +84,7 @@ coin_date : 13-Nov-2016 22:15 story_length : 16 firstpage_length: 4 page_length : 16 + +story_credits: "BSTA" by Balthasar Szczepański +intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license +source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta diff --git a/settings-tbst.txt b/settings-tbst.txt index bc183ce..c2b5ded 100644 --- a/settings-tbst.txt +++ b/settings-tbst.txt @@ -84,3 +84,7 @@ coin_date : 13-Nov-2016 22:15 story_length : 16 firstpage_length: 4 page_length : 16 + +story_credits: "BSTA" by Balthasar Szczepański +intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license +source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta diff --git a/settings.txt b/settings.txt index 68d5a25..1464378 100644 --- a/settings.txt +++ b/settings.txt @@ -181,6 +181,10 @@ PERL_FAVICON_PATH = @_PERL_CONSTANT_STR( FAVICON_PATH, $favicon_path) PERL_COIN_DATE = @_PERL_CONSTANT_STR( COIN_DATE, $coin_date) PERL_INTF_DATE = @_PERL_CONSTANT_STR( INTF_DATE, $intf_date) +PERL_STORY_CREDITS = @_PERL_CONSTANT_STR( STORY_CREDITS, $story_credits) +PERL_INTF_CREDITS = @_PERL_CONSTANT_STR( INTF_CREDITS , $intf_credits) +PERL_SOURCE_URL = @_PERL_CONSTANT_STR( SOURCE_URL , $source_url) + PERL_GZIP = @_PERL_CONSTANT_STR( GZIP, $gzip) PERL_RESET_PASSWORD = @_PERL_CONSTANT_STR( RESET_PASSWORD, $reset_password)