From f102c9f48cdd023af731a831b4e7efda6ada8b12 Mon Sep 17 00:00:00 2001 From: "Aviv \"RustyStriker\" Romem" Date: Sat, 11 Jun 2022 15:28:45 +0300 Subject: [PATCH] added ls prints to some pages and index pages for subfolders --- bscripts/index.html | 20 ++++++++++++++++++++ bscripts/ls_to_a.py | 4 ++-- index.html | 6 ++++++ template/header.html | 2 +- template/index.html | 18 ++++++++++++++++++ 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 bscripts/index.html create mode 100644 template/index.html diff --git a/bscripts/index.html b/bscripts/index.html new file mode 100644 index 0000000..8974ef2 --- /dev/null +++ b/bscripts/index.html @@ -0,0 +1,20 @@ +cat $HOME/template/header.html | sed "s/__PAGE TITLE__/Build Scripts/" + +

Build Scripts

+
+

+ Folder keeping build script helpers(for running using my injector). +
+ For example: a python script + (yes i know i hate python but its v quick for simple stuff) + to transform input from ls into a list of <a> tags(with space between) +

+

+ here is the list of files here: +
+ cd $CURRENT && ls *.* | python3 $HOME/bscripts/ls_to_a.py +

+
+ + +cat $HOME/template/footer.html diff --git a/bscripts/ls_to_a.py b/bscripts/ls_to_a.py index d2bbb33..cc5833c 100644 --- a/bscripts/ls_to_a.py +++ b/bscripts/ls_to_a.py @@ -5,5 +5,5 @@ while True: try: a = input() except: - break; - print('' + a + '') + break + print('' + a.replace('.html', '') + '') diff --git a/index.html b/index.html index edd6147..faf9850 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,11 @@ cat $HOME/template/header.html | sed "s/__PAGE TITLE__/Rusty's website/" +

+ Folders: cd $CURRENT && ls */ -d | sed 's/\///' | python3 $HOME/bscripts/ls_to_a.py +
+ Files: cd $CURRENT && ls *.html | python3 $HOME/bscripts/ls_to_a.py +

+

Welcome, to my WEBSITE!

diff --git a/template/header.html b/template/header.html index a4e6702..679b107 100644 --- a/template/header.html +++ b/template/header.html @@ -32,7 +32,7 @@ __PAGE TITLE__ - +
diff --git a/template/index.html b/template/index.html new file mode 100644 index 0000000..e82ad13 --- /dev/null +++ b/template/index.html @@ -0,0 +1,18 @@ +cat $HOME/template/header.html | sed "s/__PAGE TITLE__/Template/" + +

Template

+
+

+ This is where I keep templates(or part of templates) for the website, + like the header and footer + of the pages(also contains the start and end of the pages!, tho I might change that) +

+

+ here is the list of templates in here: +
+ cd $CURRENT && ls *.html | python3 $HOME/bscripts/ls_to_a.py +

+
+ + +cat $HOME/template/footer.html