Code Monkey home page Code Monkey logo

gogetwindow's Introduction

#!/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

gogetwindow's People

Contributors

egosown avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.