From: Ian Kelling Date: Thu, 25 Feb 2021 16:41:05 +0000 (-0500) Subject: add more documentation X-Git-Url: https://vcs.fsf.org/?p=pdt.git;a=commitdiff_plain;h=0d7441e0fc47583ccfac4f06d9161607de8c026d add more documentation --- diff --git a/README b/README new file mode 100644 index 0000000..de71b2a --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +# pdt: post to FSF social media via command line +# Copyright (C) 2021 Ian Kelling +# SPDX-License-Identifier: AGPL-3.0-or-later + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + + +For FSF staff: more detailed examples are on our internal wiki. Non-fsf +staff, if you are familiar with the command line, you aren't missing +anything. + +FSF account names are hardcoded, if you want to use this script for +your own accounts, I'm happy to accept a patch or write one that uses +account names from a configuration file. Just email me. + +Main usage: source pdt.sh, run pdt-setup one time, then usually just run +pdt to do posts. The documentation for each function is within the +pdt.sh file. + +Patches welcome, email them to iank@fsf.org . If you aren't sure how +to send a patch, see https://git-send-email.io/ diff --git a/pdt.sh b/pdt.sh index 61490f7..25cc461 100644 --- a/pdt.sh +++ b/pdt.sh @@ -79,6 +79,11 @@ toot() { # post to mastodon + twitter + gnu social post + diaspora # +# Diaspora is skipped if posting to dbd accounts. +# +# If posting video, it only goes to twitter. Other accounts can be +# posted to manually with free software. +# # usage: pdt [--dbd] [-m MEDIA_FILE] [-v VIDEO_PATH] [POST] pdt() { local video media rbow_account gs_account mastodon_account dbd video rbow_arg toot_arg dia_arg gs_arg @@ -172,8 +177,8 @@ pdt() { fi } +# Usage: pdt-setup pdt-setup() { - if [[ $pdttest ]]; then mastodon_accounts=(iank) else