~stormdragon2976/bashtml

aba60d61f080f6da652ebdd470c09c0f66077003 — Storm Dragon 1 year, 7 months ago 169fd08
Moved bashtml-plugins to its own git repositor to be used as a submodule for this one.
2 files changed, 0 insertions(+), 29 deletions(-)

D bashtml-plugins/gnusocial.post.sh
D bashtml-plugins/music.prefooter.sh
D bashtml-plugins/gnusocial.post.sh => bashtml-plugins/gnusocial.post.sh +0 -21
@@ 1,21 0,0 @@
#!/bin/bash

# Your GNU Social username
user=""
# Password, if not set you will be prompted
password=""
# Your node address, do not add trailing slashes, for example, https://example.org
node=""

# $1 Post title, $2 Blug URL
if [ -z "$password" ]; then
echo "Please enter the password for ${user}'s GNU Social account:"
curl -s -u "$user" --data-urlencode status="$1 - $2" -d source="BasHTML" ${node}/api/statuses/update.json &> /dev/null && postStatus=0 || postStatus=1
else
curl -s -u "$user:$password" --data-urlencode status="$1 - $2" -d source="BasHTML" ${node}/api/statuses/update.json &> /dev/null && postStatus=0 || postStatus=1
fi
if [ $postStatus -eq 0 ]; then
echo "$1 posted to ${node}"
else
echo "There was a problem posting $1 to ${node}."
fi

D bashtml-plugins/music.prefooter.sh => bashtml-plugins/music.prefooter.sh +0 -8
@@ 1,8 0,0 @@
if [[ "$1" != "index.html" ]]; then
    echo "<p>"
    echo -n "Composed to the sound of "
    # Uncomment one
    # audtool --current-song
    # mpc -f "%artist% - %track%" current
    echo "</p>"
fi