+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
-<html lang="pl">
- <head>
- <title>It's 403fication time! • Bicycles on the Moon</title>
- <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
- <link rel="icon" type="image/png" href="/img/favicon.png"/>
- </head>
- <body>
- <a href="/"><img src="/img/botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>
- <h1>It's 403fication time!</h1>
- <form method="post" action="/cgi/npb/npbd/403">
- 403 by URL<br>
- URL of image:
- <input type="text" name="inpix">
- <input type="submit" value="403">
- </form>
- <br>
- <form method="post" action="/cgi/npb/npbd/403" enctype="multipart/form-data">
- 403 by file upload<br>
- Upload the image:
- <input type="file" name="inpix">
- <input type="submit" value="403">
- </form>
- <br>
- Source code available at <a href="svn://bicyclesonthemoon.dnsd.info/npb">svn://bicyclesonthemoon.dnsd.info/npb</a> (use "e" to login) or <a href="http://1190.bicyclesonthemoon.dnsd.info/pro/npb">http://1190.bicyclesonthemoon.dnsd.info/pro/npb</a>.
-
- </body>
-</html>
<h1>ENHANCE!</h1>
- <form method="post" action="/enhance/bluenh" enctype='multipart/form-data'>
+ <form method="post" action="###HTML_BLUENH_PATH;" enctype='multipart/form-data'>
<img src="param.png" alt="parameter explanation picture"><br>
<br>
a=<input class="pt" type="text" name="a" value= "0" size="3">, b=<input class="pt" type="text" name="b" value= "34" size="3">, c=<input class="pt" type="text" name="c" value= "41" size="3">,<br>
-Subproject commit 1c21433837c5bc34100f04bbfeb8ce403844e91d
+Subproject commit fc9affec336a16cde93b2675a836bdd01d1c2210
<h1>See the difference!</h1>
- <form method="post" action="/enhance/diff" enctype='multipart/form-data'>
+ <form method="post" action="###HTML_DIFF_PATH;" enctype='multipart/form-data'>
Enhance by URL<br>
URL 1: <input class="pt" type="text" name="inpix0"><br>
URL 2: <input class="pt" type="text" name="inpix1"><br>
# Enhance tools
-ScriptAlias /enhance/bluenh ###CONF_bluenh;
-ScriptAlias /enhance/diff ###CONF_diff;
-ScriptAlias /enhance/nofading ###CONF_nofading;
-ScriptAlias /enhance/npb ###CONF_npb;
-ScriptAlias /enhance/pal ###CONF_pal;
-ScriptAlias /enhance/reveal ###CONF_reveal;
-ScriptAlias /enhance/t-1 ###CONF_t-1;
+ScriptAlias ###CONF_cgi_bluenh; ###CONF_bin_bluenh;
+ScriptAlias ###CONF_cgi_diff; ###CONF_bin_diff;
+ScriptAlias ###CONF_cgi_nofading; ###CONF_bin_nofading;
+ScriptAlias ###CONF_cgi_npb; ###CONF_bin_npb;
+ScriptAlias ###CONF_cgi_pal; ###CONF_bin_pal;
+ScriptAlias ###CONF_cgi_reveal; ###CONF_bin_reveal;
+ScriptAlias ###CONF_cgi_t-1; ###CONF_bin_t-1;
<Directory ###CONF_bin;>
Require all granted
</Directory>
-
-# legacy redirections
-Redirect permanent /pro/npb/npb.htm /enhance/npb.htm
-Redirect permanent /pro/npb/403.htm /enhance/npb.htm
-Redirect permanent /pro/bluenh/bluenh.htm /enhance/bluenh.htm
-Redirect permanent /pro/nofading/nofading.htm /enhance/nofading.htm
-Redirect permanent /pro/insertframe/insertframe.htm /enhance/pal.htm
-Redirect permanent /pro /enhance?
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+make clean
+make -B TARGET=release makefile
+make install
+make clean
# "makefile" is automatically generated from "makefile.1.mak"
-# 07.12.2022
#
-# Copyright (C) 2022 Balthasar Szczepański
+# Copyright (C) 2022, 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEFAULT_TARGET = debug
ifndef TARGET
-TARGET = release
+TARGET = debug
# when want to change target run this first:
# make -B TARGET=target_name makefile
endif
PERL =/usr/bin/perl
RM =/usr/bin/rm
-BIN_PATH = /botm/bin/enhance
-TMP_PATH = /botm/tmp/enhance
-WWW_PATH = /botm/www/1190/enhance
+BIN_PATH = /botm/bin/test-enhance
+TMP_PATH = /botm/tmp/test-enhance
+WWW_PATH = /botm/www/1190/enhancetest
-CONF = /botm/etc/www/conf/1190/enhance.conf
+CONF = /botm/etc/www/conf/1190/test-enhance.conf
CONFIGFILE = settings-$(TARGET).txt settings.txt
+DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt
# The configuration tool
# http://bicyclesonthemoon.info/git/botm-config
-CONFIGURE = $(PERL) ./configure.pl
+CONFIGURE = $(PERL) ./configure.pl --do
CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE)
makefile: makefile.1.mak $(CONFIGFILE) configure.pl
- $(CONFIGURE_CMD) < makefile.1.mak > makefile
+ $(CONFIGURE_CMD) --in makefile.1.mak --out makefile
configure.pl: $(CONFIGFILE) config/configure.1.pl
- $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
+ $(PERL) config/configure.1.pl --do target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
$(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl
- $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
+ $(CONFIGURE_CMD) --v --in $(GENERATE_FROM) --out $(TO_GENERATE)
$(CGI): %: %.c online-core.c online-core.h $(H_PNG)
$(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
$(CC) $(CF) -o f2h f2h.c
$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) configure.pl
- $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm
+ $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) --out $*.htm
index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) configure.pl
- $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
+ $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) --out index.htm
setuid: $(SETUID)
$(CP) -r $(WWW) $(WWW_PATH)
install: all cp_bin cp_www cp_conf
+
clean:
$(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
+ $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile
PHONY: all clean install setuid mktree cp_bin cp_www
# "makefile" is automatically generated from "makefile.1.mak"
-# 07.12.2022
#
-# Copyright (C) 2022 Balthasar Szczepański
+# Copyright (C) 2022, 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEFAULT_TARGET = debug
ifndef TARGET
-TARGET = debug ###MAKE_TARGET:
+TARGET = $(DEFAULT_TARGET) ###MAKE_TARGET:
# when want to change target run this first:
# make -B TARGET=target_name makefile
endif
CONFIGFILE = settings-$(TARGET).txt settings.txt
+DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt
# The configuration tool
# http://bicyclesonthemoon.info/git/botm-config
-CONFIGURE = $(PERL) ./configure.pl
+CONFIGURE = $(PERL) ./configure.pl --do
CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE)
makefile: makefile.1.mak $(CONFIGFILE) configure.pl
- $(CONFIGURE_CMD) < makefile.1.mak > makefile
+ $(CONFIGURE_CMD) --in makefile.1.mak --out makefile
configure.pl: $(CONFIGFILE) config/configure.1.pl
- $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
+ $(PERL) config/configure.1.pl --do target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
$(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl
- $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
+ $(CONFIGURE_CMD) --v --in $(GENERATE_FROM) --out $(TO_GENERATE)
$(CGI): %: %.c online-core.c online-core.h $(H_PNG)
$(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
$(CC) $(CF) -o f2h f2h.c
$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) configure.pl
- $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm
+ $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) --out $*.htm
index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) configure.pl
- $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
+ $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) --out index.htm
setuid: $(SETUID)
$(CP) -r $(WWW) $(WWW_PATH)
install: all cp_bin cp_www cp_conf
+
clean:
$(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
+ $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile
PHONY: all clean install setuid mktree cp_bin cp_www
<h1>No fading!</h1>
- <form method="post" action="/enhance/nofading">
+ <form method="post" action="###HTML_NOFADING_PATH;">
Enhance by URL<br>
URL of image:
<input class="pt" type="text" name="inpix">
<input type="checkbox" class="pt" name="a"> enhance alpha
</form>
<br>
- <form method="post" action="/enhance/nofading" enctype="multipart/form-data">
+ <form method="post" action="###HTML_NOFADING_PATH;" enctype="multipart/form-data">
Enhance by file upload<br>
Upload the image:
<input class="pt" type="file" name="inpix">
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
-<html lang="pl">
- <head>
- <title>It's NewpixbOTTification time! • Bicycles on the Moon</title>
- <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
- <link rel="stylesheet" href="/css/botm.css">
- <link rel="icon" type="image/png" href="/img/favicon.png"/>
- </head>
- <body>
- <a href="/"><img src="/img/botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>
- <h1>It's NewpixbOTTification time!</h1>
- <form method="post" action="/ongoing/npb">
- NewpixbOTTify by URL<br>
- URL of image:
- <input class="pt" type="text" name="inpix">
- <input class="pk" type="submit" value="NewpixbOTTify!">
- </form>
- <br>
- <form method="post" action="/ongoing/npb" enctype="multipart/form-data">
- NewpixbOTTify by file upload<br>
- Upload the image:
- <input class="pt" type="file" name="inpix">
- <input class="pk" type="submit" value="NewpixbOTTify!">
- </form>
- <br>
- Source code available at <a href="svn://bicyclesonthemoon.info/npb">svn://bicyclesonthemoon.info/npb</a> (use "e" to login) or <a href="http://1190.bicyclesonthemoon.info/pro/npb">http://1190.bicyclesonthemoon.info/pro/npb</a>.
-
- </body>
-</html>
<h1>It's NewpixbOTTification time!</h1>
- <form method="post" action="/enhance/npb" enctype="multipart/form-data">
+ <form method="post" action="###HTML_NPB_PATH;" enctype="multipart/form-data">
NewpixbOTTify by URL<br>
URL of image:
<input class="pt" type="text" name="inpix2">
<h1>Hidden frames</h1>\r
- <form method="post" action="/enhance/pal" enctype="multipart/form-data">\r
+ <form method="post" action="###HTML_PAL_PATH;" enctype="multipart/form-data">\r
Upload frame(s):<br>\r
Frame 1: <input class="pt" type="file" name="inpixf0"><br>\r
Frame 2: <input class="pt" type="file" name="inpixf1"><br>\r
<h1>Reveal hidden detail!</h1>
- <form method="post" action="/enhance/reveal">
+ <form method="post" action="###HTML_REVEAL_PATH;">
Enhance by URL<br>
URL of image:
<input class="pt" type="text" name="inpix">
<input class="pk" type="submit" value="ENHANCE!"><br>
</form>
<br>
- <form method="post" action="/enhance/reveal" enctype="multipart/form-data">
+ <form method="post" action="###HTML_REVEAL_PATH;" enctype="multipart/form-data">
Enhance by file upload<br>
Upload the image:
<input class="pt" type="file" name="inpix">
--- /dev/null
+# Name must be unique, not shared with other projects / targets.
+# otherwise config files will collide
+name: test-enhance
+
+# target name. settings file (THIS FILE) is "settings-TARGET_NAME.txt"
+# where TARGET_NAME is the value
+target: debug
+
+useragent: ENHANCE!ment tool (http://1190.bicyclesonthemoon.info/enhancetest)
+
+title_bluenh : ENHANCE!
+title_diff : See the difference!
+title_enhance : ENHANCE!
+title_nofading: No fading!
+title_npb : It's NewpixbOTTification time!
+title_pal : Hidden frames
+title_reveal : Reveal hidden detail!
+title_t-1 : Remap t-1
+
+bin_path : /botm/bin/test-enhance
+cgi_path : /enhancetest
+conf_path: /botm/etc/www/conf/1190
+tmp_path : /botm/tmp/test-enhance
+www_path : /botm/www/1190/enhancetest
+
+cat : /usr/bin/cat
+cp : /usr/bin/cp
+chmod: /usr/bin/chmod
+mkdir: /usr/bin/mkdir
+perl : /usr/bin/perl
+rm : /usr/bin/rm
+wget : /usr/bin/wget
+
+CC : gcc
+CF : -g -Wall
+L_IL : -lIL
+L_CGI: -lcgi
useragent: ENHANCE!ment tool (http://1190.bicyclesonthemoon.info/enhance)
-title_bluenh: ENHANCE!
-title_diff: See the difference!
-title_enhance: ENHANCE!
+title_bluenh : ENHANCE!
+title_diff : See the difference!
+title_enhance : ENHANCE!
title_nofading: No fading!
-title_npb: It's NewpixbOTTification time!
-title_pal: Hidden frames
-title_reveal: Reveal hidden detail!
-title_t-1: Remap t-1
+title_npb : It's NewpixbOTTification time!
+title_pal : Hidden frames
+title_reveal : Reveal hidden detail!
+title_t-1 : Remap t-1
-bin_path: /botm/bin/enhance
+bin_path : /botm/bin/enhance
+cgi_path : /enhance
conf_path: /botm/etc/www/conf/1190
-tmp_path: /botm/tmp/enhance
-www_path: /botm/www/1190/enhance
+tmp_path : /botm/tmp/enhance
+www_path : /botm/www/1190/enhance
-cat: /usr/bin/cat
-cp: /usr/bin/cp
+cat : /usr/bin/cat
+cp : /usr/bin/cp
chmod: /usr/bin/chmod
mkdir: /usr/bin/mkdir
-perl: /usr/bin/perl
-rm: /usr/bin/rm
-wget: /usr/bin/wget
+perl : /usr/bin/perl
+rm : /usr/bin/rm
+wget : /usr/bin/wget
-CC: gcc
-CF: -g -Wall
-L_IL: -lIL
+CC : gcc
+CF : -g -Wall
+L_IL : -lIL
L_CGI: -lcgi
# settings.txt
-# 04.12.2022
#
-# Copyright (C) 2022 Balthasar Szczepański
+# Copyright (C) 2022, 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
_bin_reveal_cgi_path = @_PATH($bin_path, reveal-cgi)
_bin_t-1_cgi_path = @_PATH($bin_path, t-1-cgi)
+_cgi_bluenh_path = @_PATH($cgi_path, bluenh)
+_cgi_diff_path = @_PATH($cgi_path, diff)
+_cgi_nofading_path = @_PATH($cgi_path, nofading)
+_cgi_npb_path = @_PATH($cgi_path, npb)
+_cgi_pal_path = @_PATH($cgi_path, pal)
+_cgi_reveal_path = @_PATH($cgi_path, reveal)
+_cgi_t-1_path = @_PATH($cgi_path, t-1)
+
_conf_path = @_PATH($conf_path, $name\.conf)
-HTML_TITLE = @_HTML_TITLE()
+
+HTML_TITLE = @_HT_ENCODE(@_HTML_TITLE())
+
+HTML_BLUENH_PATH = @_HT_ENCODE($_cgi_bluenh_path)
+HTML_DIFF_PATH = @_HT_ENCODE($_cgi_diff_path)
+HTML_NOFADING_PATH = @_HT_ENCODE($_cgi_nofading_path)
+HTML_NPB_PATH = @_HT_ENCODE($_cgi_npb_path)
+HTML_PAL_PATH = @_HT_ENCODE($_cgi_pal_path)
+HTML_REVEAL_PATH = @_HT_ENCODE($_cgi_reveal_path)
+HTML_T-1_PATH = @_HT_ENCODE($_cgi_t-1_path)
CONF_bin = $bin_path
-CONF_bluenh = $_bin_bluenh_cgi_path
-CONF_diff = $_bin_diff_cgi_path
-CONF_nofading = $_bin_nofading_cgi_path
-CONF_npb = $_bin_npb_cgi_path
-CONF_pal = $_bin_pal_cgi_path
-CONF_reveal = $_bin_reveal_cgi_path
-CONF_t-1 = $_bin_t-1_cgi_path
+CONF_bin_bluenh = $_bin_bluenh_cgi_path
+CONF_bin_diff = $_bin_diff_cgi_path
+CONF_bin_nofading = $_bin_nofading_cgi_path
+CONF_bin_npb = $_bin_npb_cgi_path
+CONF_bin_pal = $_bin_pal_cgi_path
+CONF_bin_reveal = $_bin_reveal_cgi_path
+CONF_bin_t-1 = $_bin_t-1_cgi_path
+
+CONF_cgi_bluenh = $_cgi_bluenh_path
+CONF_cgi_diff = $_cgi_diff_path
+CONF_cgi_nofading = $_cgi_nofading_path
+CONF_cgi_npb = $_cgi_npb_path
+CONF_cgi_pal = $_cgi_pal_path
+CONF_cgi_reveal = $_cgi_reveal_path
+CONF_cgi_t-1 = $_cgi_t-1_path
MAKE_TARGET = TARGET = $target
<h1>Remap t-1</h1>\r
- <form method="post" action="/enhance/t-1" enctype="multipart/form-data">\r
+ <form method="post" action="###HTML_T-1_PATH;" enctype="multipart/form-data">\r
Remap by file upload<br>\r
File: <input class="pt" type="file" name="inpix2"><br>\r
<br>\r