It's basically a cron-ed bash script that makes a "blog" from a folder of images and text. It is not perfect by any means, it is a blog by the simplest means. If you have questions feel free to email firstname.lastname@example.org
webadddirectory and a
webdirdirectory. Webdir is the site, webadd is images and text to be added.
you might like to share the
webadddirectory to be able to collaborate with people. Syncthing is recommended.
Within the script:
MAXINDEX sets how long, in # of lines, you want the index.html to be before being archived to another page.
when index.html gets bigger than
MAXINDEX, index.html is renamed
$currentdate.html and linked to from archive.html. Then
~/template.conf is copied to create a new index.html. Template.conf is basically the header and footer minus all the content in the middle. The template.conf for sexoskeleton.com is included for example.
MAXLOG sets how many lines of the script log you want to hold onto before it is deleted.
By default everytime sexoskeleton.sh is run it stores most of its output into
~/cronlog.log which isn't precisely a cronlog. But that's what it's called.
when the script is run
The script iterates through files in the
webadd directory. Anything ending in .gif, .jpg, .png or .txt will be picked up. .txt files can contain html but you need to escape your own slashes. Which is to say if you put in / in a .txt add a \ before it.
also of note, image files are moved from
webdir under a unique filename to avoid conflicts and .txt files are DELETED after being appended to the index.
the script looks for
<!--posts--> inside index.html and adds the new content just below that line. I couldn't figure out adding below the line so it actually replaces
<!--posts--> and then adds it back in.
if nothing has changed the site is not re-uploaded
if something has changed, the script runs surge to upload the site. You'll need to configure Surge before running all this. Or just share
webdir with a webserver.
automate that shit
you probs want to add this script to your crontab so it auto checks for new images and adds them.
If you run into a
Syntax error: "(" unexpected error you gotta run it as
./sexoskeleton.sh and not
This script was written by trav