summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb4rkod <lllillilll@protonmail.com>2024-05-15 23:50:36 +0300
committerb4rkod <lllillilll@protonmail.com>2024-05-15 23:50:36 +0300
commit0e97f4e9e7672743bc9b04a2efa0b68d7f9bfa14 (patch)
tree49c7f49b5d04ceed2e94c3aa8945a5d2cf3dc64a
parent3624bc6c786a438c429615589225da9e121e42c9 (diff)
redid everything, not at the documentation stage
-rwxr-xr-xadd_to_rss.sh9
-rwxr-xr-xbasics.sh5
-rwxr-xr-xcompile.sh10
-rwxr-xr-xcopy.sh3
-rwxr-xr-xformatter.sh4
-rwxr-xr-xpages/blogposts.sh4
-rwxr-xr-xpages/index.sh13
-rwxr-xr-xpages/tools_i_use.sh48
-rwxr-xr-xrss_compile.sh27
9 files changed, 107 insertions, 16 deletions
diff --git a/add_to_rss.sh b/add_to_rss.sh
index 0c4e0b3..c829f9f 100755
--- a/add_to_rss.sh
+++ b/add_to_rss.sh
@@ -1,7 +1,8 @@
-BASE=$(basename $1|sed s/txt$/html/)
-FILE=$(cat $1|sed -E ':a;N;$!ba; s/\/\/\///g ;s/\//\\\//g ; s/\r{0,1}\n/<\\\/p>/g;s/^/<p>/;')
-echo $BASE
+FILE=$(cat $1 | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g'| sed "s#\/#\\\/#g" )
-sed -i "/<\!--item-->/s/$/\n\<item><pubDate><\/pubDate><guid>https:\/\/b4rkod.net.tr\/$BASE<\/guid><title>$BASE<\/title><link>https:\/\/b4rkod.net.tr\/blogposts\/$BASE<\/link><description><![CDATA[$FILE]]><\/description><\/item>/" "$HOME/www/source/rss.xml"
+BASE=$(basename $1)
+
+RSS_DATE=$(date -d "$(stat -c %w $1)" -R)
+sed -i "/<\!--item-->/s/$/\n<item>\n<pubDate>$RSS_DATE<\/pubDate>\n<guid>https:\/\/b4rkod.net.tr\/$BASE<\/guid>\n<title>$BASE<\/title>\n<link>https:\/\/b4rkod.net.tr\/blogposts\/$BASE<\/link>\n<description><![CDATA[$FILE]]><\/description>\n<\/item>/" "$HOME/www/source/rss.xml"
diff --git a/basics.sh b/basics.sh
index 21e255e..1c01c42 100755
--- a/basics.sh
+++ b/basics.sh
@@ -29,10 +29,11 @@ header() {
<div id="menu" >
<a href="/index.html" >Main</a>
<a href="/blogposts.html" >Blogposts</a>
- <a href="https://b4rkod.net.tr/avatar.html" >avatar</a>
+ <a href="/tools_i_use.html" >tools i use</a>
<a href="https://git.b4rkod.net.tr" >git</a>
- <a href="https://b4rkod.net.tr/rss.xml" >RSS</a>
<a href="https://b4rkod.net.tr/#webrings" >webrings</a>
+ <a href="https://b4rkod.net.tr/avatar.html" >avatar</a>
+ <a href="https://b4rkod.net.tr/rss.xml" >RSS</a>
</div>
<br>
<div id="main">
diff --git a/compile.sh b/compile.sh
new file mode 100755
index 0000000..51869b2
--- /dev/null
+++ b/compile.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+. ~/.config/b4rcms/basics.sh
+
+for f in $(ls $ROOT/sh/pages) ; do
+ $ROOT/sh/pages/$f ;
+done
+
+copy.sh
+
diff --git a/copy.sh b/copy.sh
new file mode 100755
index 0000000..d7ca8ca
--- /dev/null
+++ b/copy.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. ~/.config/b4rcms/basics.sh
+rsync -al ~/www/source/* $SERVERFILE
diff --git a/formatter.sh b/formatter.sh
index d498b28..c5fa98e 100755
--- a/formatter.sh
+++ b/formatter.sh
@@ -1,8 +1,8 @@
#!/bin/sh
. $HOME/www/sh/basics.sh
-header $(basename $1|sed s/txt$/html/)
+header $(basename $1)
printf "<p> date : $(stat -c '%w' $1| cut -d " " -f 1)\n "
-sed "/\/\/\//s/$/<\/p>/;/\/\/\//s/\/\/\//<p> /" $1
+cat $1
footer
diff --git a/pages/blogposts.sh b/pages/blogposts.sh
index 81242f0..33ba683 100755
--- a/pages/blogposts.sh
+++ b/pages/blogposts.sh
@@ -3,7 +3,7 @@
. ~/.config/b4rcms/basics.sh
#compile the blogposts
-for FILE in $(ls --time=creation -t $ROOT/blogposts) ; do
+for FILE in $(ls -t $ROOT/blogposts) ; do
mkdir -p $SOURCE/blogposts
echo "$(header $FILE; cat $ROOT/blogposts/$FILE; footer)" >| $SOURCE/blogposts/$FILE
done
@@ -14,7 +14,7 @@ printf "$(
printf \ "
<h1> Here is all the blogposts i have posted about</h1>
<ul> ";
- for FILE in $(ls --time=creation -t $ROOT/blogposts) ; do
+ for FILE in $(ls -t $ROOT/blogposts) ; do
echo "<li> <a href="blogposts/$FILE">$FILE</a> </li>"
done
footer
diff --git a/pages/index.sh b/pages/index.sh
index 1ee499c..754e09a 100755
--- a/pages/index.sh
+++ b/pages/index.sh
@@ -13,19 +13,20 @@ echo "$(
<img src="/files/b4rkod_avatar.png" align="right">
<p>Anyways!<p>
<p>In this site i will post crazy weird ramblings about technology with maybe my awful c practices scattered here and there.</p>
- <p>I know my website doesn\'t look like much right now but i am stable and can be trusted with long, tedious labour with no immediate returns soo i will fill it with thingies and stuff. Pinkie promise...</p>
+ <p>I know my website doesn't look like much right now but i am stable and can be trusted with long, tedious labour with no immediate returns soo i will fill it with thingies and stuff. Pinkie promise...</p>
<h2 > Contents </h2> "
echo \ "
<ul id="contents">
- <li><a href="//git.b4rkod.net.tr">git</a></li>
- <li><a href=blogposts.html >Blogposts</a></li>
+ <li><a href=/blogposts.html >Blogposts</a></li>
+ <li><a href="https://git.b4rkod.net.tr">git</a></li>
+ <li><a href=/tools_i_use.html >Tools i use</a></li>
+ <li><a href=https://b4rkod.net.tr/#webrings >webrings</a></li>
<li><a href=https://b4rkod.net.tr/avatar.html >avatar</a></li>
- <li><a href=files/files.html >Library</a></li>
- <li><a href=https://git.b4rkod.net.tr >git</a></li>
<li><a href=https://b4rkod.net.tr/rss.xml >RSS</a></li>
- <li><a href=https://b4rkod.net.tr/#webrings >webrings</a></li>
+ <li><a href=/twtxt.txt >twtxt</a></li>
+ <li><a href=files/files.html >Library</a></li>
<li><a href=/trash/trash.html >Trash</a></li>
</ul>
"
diff --git a/pages/tools_i_use.sh b/pages/tools_i_use.sh
new file mode 100755
index 0000000..2240821
--- /dev/null
+++ b/pages/tools_i_use.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#compile the tools_i_use.html
+
+. ~/.config/b4rcms/basics.sh
+
+echo "$(
+ header
+ echo \ "
+ <h3>Hardware i use</h3>
+
+ <dl>
+
+ <dt>Hardware
+
+ <dd>I currently use a <a href="https://www.thinkwiki.org/wiki/Category:X201"> Thinkpad X201 M540</a> named Asena. Linux runs on any hardware soo i don't really care about the performance and the keyboard and the trackpoint just makes her perfect for me. I maxxed out everything i could on her, the only thing i could upgrade is a msata drive, which is on the list.
+
+ </dl>
+
+ <h3>Software i use</h3>
+
+ <dl>
+ <dt>Distro
+
+ <dd> I use<a href="https://artixlinux.org"> Artix Gnu/Linux</a> for desktop but i have no hard feeling about distros.
+ <dd> my servers run the latest version of debian, i don't remember which version.
+
+ <dt>WM
+
+ <dd>I use <a href="https://dwm.suckless.org">DWM</a> because it is just great. I use it without any patches, disabled layouts, can't change the number of windows in the left side and deleted all code related to starting other programs. I like it more when sxhkd starts my programs, not dwm.
+
+ <dt>Init
+
+ <dd>I use <a href="http://smarden.org/runit">Runit</a> because as far as my limited linux experience goes, it is the most stable one. It is also simple stupid if you spare 5 minutes to read the manual.
+
+ <dt>Terminal Emulator
+
+ <dd>I use <a href="https://st.suckless.org">St</a> as you would expect, i just have scrollback and anysize patches for it.
+
+ <dt>Editor
+
+ <dd>I use <a href="https://neovim.io">Neovim</a>, i don't even remember why i use nvim instead of vim directly but i do. Vim is just soo much better, anyone that says it isn't that good or efficient is lying to themselves. You can only gain from using vim.
+
+ <dt>Shell
+
+ <dd>I use bash as interactive shell because it was the one the system came with. I try to keep the shell close to default,my .bashrc is only 66 lines. /bin/sh is symlinked to dash.
+ "
+ footer
+)" >| $SOURCE/tools_i_use.html
diff --git a/rss_compile.sh b/rss_compile.sh
new file mode 100755
index 0000000..3650502
--- /dev/null
+++ b/rss_compile.sh
@@ -0,0 +1,27 @@
+
+#!/bin/sh
+
+. ~/.config/b4rcms/basics.sh
+
+ echo \ "
+ <?xml version="1.0" encoding="UTF-8" ?>
+ <rss version="2.0">
+
+ <channel>
+ "
+ echo "<title>b4rkod's Basement</title>"
+ echo " <link>https://b4rkod.net.tr/rss.xml</link> "
+ echo "<description>My Basement's Window</description>"
+ echo '<!--item--> '
+
+ for FILE in $(ls --time=creation -t $ROOT/blogposts) ; do
+ RSS_DATE=$(date -d "$(stat -c %w $ROOT/blogposts/$FILE)" -R)
+ echo \ "
+ <item>
+ <pubdate>$RSS_DATE<\/pubdate>
+ <guid>https:\/\/b4rkod.net.tr\/$FILE<\/guid>
+ <title>$FILE<\/title>
+ <link>https:\/\/b4rkod.net.tr\/blogposts\/$FILE<\/link>
+ <description><![cdata[$FILE]]><\/description>
+ <\/item>/"
+ done