Skip to content

Instantly share code, notes, and snippets.

@edsu
Created December 23, 2022 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/cd8ae0bbeefe69336010cd21b56440be to your computer and use it in GitHub Desktop.
Save edsu/cd8ae0bbeefe69336010cd21b56440be to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /home/ed/Projects/mastodon_digest/
# get the date
date=`TZ=GMT+24 date +%Y-%m-%d`
# create the output directory
output_dir="/var/www/inkdroid.org/mastodon-digest/$date"
mkdir $output_dir
# symlink "latest" to the most recent digest
latest="/var/www/inkdroid.org/mastodon-digest/latest"
if [ -L $latest ]; then
rm $latest
fi
ln -s $output_dir /var/www/inkdroid.org/mastodon-digest/latest
# generate the digest
python3 run.py -n 24 -s ExtendedSimple -o $output_dir > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment