Skip to content
View EgosOwn's full-sized avatar
💼
software developer
💼
software developer

Block or report EgosOwn

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
EgosOwn/README.md
#!/bin/bash

Kevin Froman

# Perform literate tangling then run all the scripts
srcweave --tangle . README.md
for f in *.sh; do
    chmod +x "$f"
    bash "$f"
done
rm *.sh
git add README.md
git commit -m "Automatic update"
git push origin master
# Past the exit we can have invalid bash code
exit 0

I am a freelance software engineer and open source full-stack developer most proficient in Python, Go, C#, and ES6. I have particular interest in PETs.

My profile readme is a self-updating bash-markdown polyglot using the literate programming tool srcweave. In plain english, that means you can run this document as a bash script.

Information and statistics

Readme build time Thu Dec 28 02:49:54 AM UTC 2023

git.voidnet.tech status: Online

Commit stats

--- /updatereadme.sh

@{setbuildtime}
@{loadGitStatus}

It's handy to know when the current build was done. This portion sets the build time in the statistics section.

--- setbuildtime

# Set the build time
buildTime=$(date -u)

sed -i "s/^Readme build time.*/Readme build time $buildTime/" README.md

My gitea instance is where I do much of my programming: git.voidnet.tech

Below we check if my site is online, and we update the entry in the statistics section.

--- loadGitStatus

gitOnline=$(curl --max-time 6 -I https://git.voidnet.tech/explore/repos)
if [[ $gitOnline == "HTTP/2 200"* ]]; then
    echo "Gitea online"
    sed -i "0,/git.voidnet.tech status Offline/{s/^git.voidnet.tech status Offline/git.voidnet.tech status Online/}" README.md
else
    echo "Node offline"
    sed -i "0,/git.voidnet.tech status Offline/{s/^git.voidnet.tech status Online/git.voidnet.tech status Offline/}" README.md
fi

@EgosOwn's activity is private