Tiny Core Extensions > TCE Talk
could we have a web-site index.html of extensions for tc10 64 and 32 bits?
mocore:
at some point :P
i hope to finish/update the scripts in the linked post
--- Quote ---get-repo-info.sh - small script to download/collect each $arch/info.lst file
mk-repo-table.js - read $arch/info.lst data into json and create html table
--- End quote ---
to 'get/view what tcz is in *each* arch for each release version'
both have been rewritten in awk!
http://forum.tinycorelinux.net/index.php/topic,18767.msg115000.html#msg115000
... in the mean time
a few other methods to create a 'nice' extension list can be found in "Programming & Scripting - Unofficial"
eg
http://forum.tinycorelinux.net/index.php/topic,22016.0.html (tabulate.sh) Enhancing the "Browse TCZs" Webpage with an Automated Script
http://forum.tinycorelinux.net/index.php?topic=20688.0 'UserScript' for Tampermonkey aka "Extentions Repository Browser Userscript"
....
nick65go:
--- Quote from: mocore on June 04, 2019, 09:23:05 AM ---at some point :P
i hope to finish/update the scripts in the linked post
--- End quote ---
thanks for links/info. noted :)
mocore:
hacking about with TooTallNate/bashttpd and "Extentions Repository Browser Userscript"
serving the Repository Browser Userscript with bashttpd
and using tce-fetch.sh to get files from tcl mirror
to test this method follow the steps below
:)
--- Code: ---tce-load -li socat || tce-load -ilw socat
tce-load -li bash || tce-load -ilw bash
mkdir ~/tcz-www
cd ~/tcz-www
wget https://code.jquery.com/jquery-2.1.4.min.js
wget https://github.com/TooTallNate/bashttpd/raw/master/bashttpd
# save teh-botol script ( extentions-repository-browser-userscript_erbs.js )
# from http://forum.tinycorelinux.net/index.php/topic,20688.0.html
# change the line
# > var list = $('body').text().split('\n');
# to
# > var list = $('#list').text().split('\n');
# run ./bashttpd to generate ./bashttpd.conf
# manually copy the code below into ./bashttpd.conf
# and comment out
# the line >unconditionally serve_static_string 'Hello, world! You can configure bashttpd by modifying bashttpd.conf.'
# or
# patch ./bashttpd.conf
# finally start the server
BASHTTPD_CONFIG="$PWD/bashttpd.conf" socat TCP4-LISTEN:8080,fork EXEC:./bashttpd
# then visit localhost:8080/tcz in the browser
# enjoy tcz information at your finger tips =]
--- End code ---
copy the code block below into ./bashttpd.conf
and comment out the line
>" unconditionally serve_static_string 'Hello, world! You can configure bashttpd by modifying bashttpd.conf.' "
--- Code: ---
html_Page() { pghead="$1"; pgbody="$2";
serve_static_string "<html><head> $pghead </head><body> $pgbody </body></html>" "text/html" ; }
tcz_fn() { # serve_static_string "$(tce-fetch.sh -O info.lst )"
local _path=$1;
local _file="${2-info.lst}";
default_tcz_route() {
page_head="<title> tcz - 1=$1 - 2=$2</title> <script src='/jquery-2.1.4.min.js'>"
##<script src='/extentions-repository-browser-userscript_erbs.js'></script>
page_body="<pre id='list'>$(tce-fetch.sh -O info.lst )</pre>
<script src='/extentions-repository-browser-userscript_erbs.js'></script>" ;
html_Page "$page_head" "$page_body";
}
# case for file route's
case "$_file" in
'/'|'info.lst') default_tcz_route $_path "$_file" ;; # default route / , info.lst
*) serve_static_string "$(tce-fetch.sh -O "$_file" )" ;; # get $_file from mirror
esac
}
on_uri_match '^/tcz(.*)' tcz_fn
--- End code ---
OR
patch /bashttpd.conf
--- Code: ------ ./bashttpd.conf.old
+++ ./bashttpd.conf
@@ -65,7 +65,32 @@
# paths relative to the specified "$DOCROOT"
#
-unconditionally serve_static_string 'Hello, world! You can configure bashttpd by modifying bashttpd.conf.'
+#unconditionally serve_static_string 'Hello, world! You can configure bashttpd by modifying bashttpd.conf.'
+
+ html_Page() { pghead="$1"; pgbody="$2";
+ serve_static_string "<html><head> $pghead </head><body> $pgbody </body></html>" "text/html" ; }
+
+ tcz_fn() { # serve_static_string "$(tce-fetch.sh -O info.lst )"
+ local _path=$1;
+ local _file="${2-info.lst}";
+
+ default_tcz_route() {
+ page_head="<title> tcz - 1=$1 - 2=$2</title> <script src='/jquery-2.1.4.min.js'>"
+ ##<script src='/extentions-repository-browser-userscript_erbs.js'></script>
+ page_body="<pre id='list'>$(tce-fetch.sh -O info.lst )</pre>
+ <script src='/extentions-repository-browser-userscript_erbs.js'></script>" ;
+ html_Page "$page_head" "$page_body";
+ }
+ # case for file route's
+ case "$_file" in
+ '/'|'info.lst') default_tcz_route $_path "$_file" ;; # default route / , info.lst
+ *) serve_static_string "$(tce-fetch.sh -O "$_file" )" ;; # get $_file from mirror
+ esac
+ }
+
+ on_uri_match '^/tcz(.*)' tcz_fn
+
+
# More about commands:
#
--- End code ---
mocore:
::)
... i had forgotten :-[ a few things ???
hear is the full bashttpd.conf
https://gitlab.com/snippets/1899570 (mostly ;)) tested ! and working
test this by running the script below
:D
--- Code: ---tce-load -li socat || tce-load -ilw socat
tce-load -li bash || tce-load -ilw bash
tce-load -li tree || tce-load -ilw tree
mkdir ~/tcz-www
cd ~/tcz-www
wget https://code.jquery.com/jquery-2.1.4.min.js
wget https://github.com/TooTallNate/bashttpd/raw/master/bashttpd
# save teh-botol script ( extentions-repository-browser-userscript_erbs.js )
# from http://forum.tinycorelinux.net/index.php/topic,20688.0.html
wget -O./extentions-repository-browser-userscript_erbs.js https://gitlab.com/snippets/1899573/raw
sed -i "s/var list = \$('body')/var list = \$('#list')/g" ./extentions-repository-bro
wser-userscript_erbs.js
# download this config
wget -O./bashttpd-tcz-erbs.conf https://gitlab.com/snippets/1899570/raw
# finally start the server
BASHTTPD_CONFIG="$PWD/bashttpd-tcz-erbs.conf" socat TCP4-LISTEN:8080,fork EXEC:./bashttpd
# then visit localhost:8080/tcz in the browser
# enjoy tcz information at your finger tips =]
--- End code ---
nick65go:
Thanks mocore for you ambition/info/technicality. A TCZ extension to wrap it all will be nice. Unfortunatly I start to get rusty at understanding programming (maybe the age takes its toll, maybe the life goes on.. other priorities).
I aplly more offen Pareto priciple: achive 80% results with 20% effort ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version