mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Updated documentation
This commit is contained in:
parent
93a945062d
commit
978fbf743c
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,18 @@
|
|||
# Changelog
|
||||
|
||||
**14 JUL 2023** VERSION 4.2
|
||||
|
||||
Twoot can now handle threads. All tweets can again be uploaded on Mastodon. Tweets in a threads are
|
||||
displayed in reverse chronological order in the main timeline (first tweet on top) to improve readability.
|
||||
|
||||
*When several toots are posted in the same run of toot it is possible that these toots do not appear in
|
||||
chronological order on the timeline. If it is the case, try setting `upload_pause` to 3-5 seconds in
|
||||
your config file to slow down the rate at which toots are uploaded.*
|
||||
|
||||
A list of nitter instances to use can now be specified in the config file
|
||||
e.g. `nitter_instances = ["nitter.nl", "nitter.fdn.fr"]`.
|
||||
If none is specified, the built-in list of 2-3 known good instances is used as before.
|
||||
|
||||
**12 JUL 2023** VERSION 4.1
|
||||
|
||||
**Nitter has recently added a change that highlights tweets that are part of a thread. Twoot cannot handle this modification yet therefore TWEETS THAT ARE PART OF A THREAD ARE CURRENTLY IGNORED.** A warning message is added to the log file instead.
|
||||
|
|
46
README.md
46
README.md
|
@ -3,18 +3,11 @@
|
|||
Twoot is a python script that mirrors tweets from a twitter account to a Mastodon account.
|
||||
It is simple to set-up on a local machine, configurable and feature-rich.
|
||||
|
||||
**14 JUL 2023** VERSION 4.2
|
||||
**17 JUL 2023** VERSION 4.3
|
||||
|
||||
Twoot can now handle threads. All tweets can again be uploaded on Mastodon. Tweets in a threads are
|
||||
displayed in reverse chronological order in the main timeline (first tweet on top) to improve readability.
|
||||
|
||||
*When several toots are posted in the same run of toot it is possible that these toots do not appear in
|
||||
chronological order on the timeline. If it is the case, try setting `upload_pause` to 3-5 seconds in
|
||||
your config file to slow down the rate at which toots are uploaded.*
|
||||
|
||||
A list of nitter instances to use can now be specified in the config file
|
||||
e.g. `nitter_instances = ["nitter.nl", "nitter.fdn.fr"]`.
|
||||
If none is specified, the built-in list of 2-3 known good instances is used as before.
|
||||
* Twitter threads are replicated on Mastodon: each follow-up message in a thread is posted
|
||||
as a reply to its predecessor.
|
||||
* An issue with downloading videos has been fixed ("ERROR: Sorry, you are not authorized to see this status").
|
||||
|
||||
> Previous updates can be found in CHANGELOG.
|
||||
|
||||
|
@ -22,6 +15,7 @@ If none is specified, the built-in list of 2-3 known good instances is used as b
|
|||
|
||||
* Fetch timeline of given user from twitter.com (through nitter instance)
|
||||
* Scrape html and format tweets for post on mastodon
|
||||
* Threads (series of replies to own messages) are replicated
|
||||
* Emojis supported
|
||||
* Upload images from tweet to Mastodon
|
||||
* Optionally upload videos from tweet to Mastodon
|
||||
|
@ -41,7 +35,7 @@ If none is specified, the built-in list of 2-3 known good instances is used as b
|
|||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
```
|
||||
usage: twoot.py [-h] [-f <.toml config file>] [-t <twitter account>] [-i <mastodon instance>]
|
||||
[-m <mastodon account>] [-p <mastodon password>] [-r] [-s] [-l] [-u] [-v] [-o] [-q]
|
||||
[-a <max age (in days)>] [-d <min delay (in mins)>] [-c <max # of toots to post>]
|
||||
|
@ -85,18 +79,19 @@ to use, all the other command-line parameters are ignored, except `-p` (password
|
|||
|
||||
### Removing redirected links
|
||||
|
||||
`-l` (or `remove_link_redirections = true` in toml file) will follow every link included in the
|
||||
tweet and replace them with the url that the resource is directly dowmnloaded from (if applicable).
|
||||
e.g. bit.ly/xxyyyzz -> example.com
|
||||
`remove_link_redirections = true` in toml file (or `-l` on the command line ) will follow every link
|
||||
included in the tweet and replace them with the url that the resource is directly dowmnloaded from
|
||||
(if applicable). e.g. bit.ly/xxyyyzz -> example.com
|
||||
|
||||
Every link visit can take up to 5 sec (timeout) depending on the responsiveness of the source
|
||||
therefore this option will slow down tweet processing.
|
||||
|
||||
If you are interested by tracker removal (`-u`, `remove_trackers_from_urls = true`) you should
|
||||
If you are interested by tracker removal (`remove_trackers_from_urls = true`, `-u`) you should
|
||||
also select redirection removal as trackers are often hidden behind the redirection of a short URL.
|
||||
|
||||
### Uploading videos
|
||||
|
||||
When using the `-v` (`upload_videos = true`) switch consider:
|
||||
When using the `upload_videos = true` (`-v`) switch consider:
|
||||
|
||||
* whether the copyright of the content that you want to cross-post allows it
|
||||
* the storage / transfer limitations of the Mastodon instance that you are posting to
|
||||
|
@ -104,7 +99,7 @@ When using the `-v` (`upload_videos = true`) switch consider:
|
|||
|
||||
### Updating profile
|
||||
|
||||
If `-q` (`update_profile = true`) is specified, twoot will check if the avatar and banner pictures
|
||||
If `update_profile = true` (`-q`) is specified, twoot will check if the avatar and banner pictures
|
||||
have changed on the twitter page. This check compares the name of files used by twitter with the names
|
||||
of the files that have been uploaded on Mastodon and if they differ both files are downloaded from
|
||||
twitter and uploaded on Mastodon. The check is very fast if there is no update.
|
||||
|
@ -119,10 +114,9 @@ e.g. `tweet_time_format = "(%d %b %Y %H:%M %Z)"`
|
|||
|
||||
An empty or missing `tweet_time_format` disables the display of the timestamp.
|
||||
|
||||
By default, dates are specified in UTC time zone. To convert the timestamp to another time zone,
|
||||
use the `tweet_timezone` option in configuration file. Valid time zone names are those of the Olson time
|
||||
zone database (<https://en.wikipedia.org/wiki/Tz_database>)
|
||||
e.g. `tweet_timezone = "Europe/Paris"`
|
||||
By default, dates are specified in the local timezone of the machine running the script. To display the timestamp to another time zone, use the `tweet_timezone` option in configuration file. Valid time zone names are those of the Olson time
|
||||
zone database (<https://en.wikipedia.org/wiki/Tz_database>).
|
||||
e.g. `tweet_timezone = "Europe/Paris"` or `tweet_timezone = "UTC"`
|
||||
|
||||
### Rate control
|
||||
|
||||
|
@ -132,6 +126,9 @@ Default min delay is 0 minutes.
|
|||
|
||||
No limitation is applied to the number of toots uploaded if `-c` is not specified.
|
||||
|
||||
If messages in a thread that are uploaded simultaneously appear in the wrong order, try setting
|
||||
the `upload_pause` configuration variable in the configuration file to a few seconds (start with 3-5).
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure python3 is installed.
|
||||
|
@ -151,6 +148,9 @@ pip install beautifulsoup4 Mastodon.py youtube-dl2 pytz
|
|||
In your user folder, execute `git clone https://gitlab.com/jeancf/twoot.git`
|
||||
to clone repo with twoot.py script.
|
||||
|
||||
If you want to use a config file to specify options (recommended), copy `default.toml` to
|
||||
`[you_preferred_name].toml` and edit it to your preferences.
|
||||
|
||||
Add command line to crontab. For example, to run every 15 minutes starting at minute 1 of every hour
|
||||
and process the tweets posted in the last 5 days but at least 15 minutes
|
||||
ago:
|
||||
|
@ -159,6 +159,8 @@ ago:
|
|||
1-59/15 * * * * /path/to/twoot.py -t SuperDuper -i masto.space -m sd@example.com -p my_Sup3r-S4f3*pw -a 5 -d 15
|
||||
```
|
||||
|
||||
After the first successful run, you no longer need to specify the password and yoiucan remove the `-p` switch.
|
||||
|
||||
## Featured Accounts
|
||||
|
||||
Twoot is known to be used for the following feeds (older first):
|
||||
|
|
Loading…
Reference in New Issue
Block a user