deactivate
}
-diaspora() {
- source ~/src/diaspy/venv/bin/activate
- python3 ~/src/jan-pona-mute/jan-pona-mute.py "$@" || { deactivate; return 1; }
- deactivate
-}
-
# usage: toot [-PROFILE_NAME] [TOOT_ARGS]
toot() {
local account
}
-# post to mastodon + twitter + gnu social post + diaspora
-#
-# Diaspora is skipped if posting to dbd accounts.
+# post to mastodon + twitter + gnu social post
#
# If posting video, it only goes to twitter. Other accounts can be
# posted to manually with free software.
if ! toot -$mastodon_account post "$*" $toot_arg; then
fails+=(toot)
fi
- if ! $dbd; then
- if ! printf "post %s\n" "${dia_arg}$*" | diaspora; then
- fails+=(diaspora)
- fi
- fi
# https://gnusocial.net/doc/twitterapi
if ! curl -o /dev/null -sS -u "$gs_account:$(cat ~/.gnusocial_login-$gs_account)" \
$gs_arg -F "status=$*" https://status.fsf.org/api/statuses/update.xml; then
mkdir -p ~/src
cd ~/src
- for repo in errhandle rainbowstream diaspy jan-pona-mute video-tweet; do
+ for repo in errhandle rainbowstream video-tweet; do
if [[ -e $repo ]]; then
cd $repo
git fetch
deactivate
- # This repo's upstream is https://alexschroeder.ch/cgit/diaspy which is
- # recommended in the install instructions here:
- # https://alexschroeder.ch/cgit/jan-pona-mute/about/
- cd ~/src/diaspy
- python3 -m virtualenv -p python3 venv
- source venv/bin/activate
- python3 -m pip install -r requirements.txt
- python3 -m pip install -e .
- deactivate
-
rm -rf ~/src/toot
mkdir -p ~/src/toot
cd ~/src/toot
python3 -m pip install -r requirements.txt
deactivate
-
- if [[ ! -s ~/.config/jan-pona-mute/login ]]; then
- mkdir ~/.config/jan-pona-mute
- account=fsf@framasphere.org
- read -r -p "enter the password for $account > " pass
- # background: format for this found using the save command
- cat >~/.config/jan-pona-mute/login <<EOF
-account $account
-password $pass
-login
-EOF
- fi
-
for account in dbd fsf; do
if [[ ! -s ~/.rainbow_oauth-$account ]]; then
printf "$(tput setaf 5)█$(tput sgr0)%.0s" $(eval echo "{1..${COLUMNS:-60}}");