mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-12-18 00:00:17 +00:00
Updated documentation
This commit is contained in:
parent
93a945062d
commit
978fbf743c
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,18 @@
|
||||||
# Changelog
|
# 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
|
**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.
|
**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.
|
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.
|
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
|
* Twitter threads are replicated on Mastodon: each follow-up message in a thread is posted
|
||||||
displayed in reverse chronological order in the main timeline (first tweet on top) to improve readability.
|
as a reply to its predecessor.
|
||||||
|
* An issue with downloading videos has been fixed ("ERROR: Sorry, you are not authorized to see this status").
|
||||||
*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.
|
|
||||||
|
|
||||||
> Previous updates can be found in CHANGELOG.
|
> 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)
|
* Fetch timeline of given user from twitter.com (through nitter instance)
|
||||||
* Scrape html and format tweets for post on mastodon
|
* Scrape html and format tweets for post on mastodon
|
||||||
|
* Threads (series of replies to own messages) are replicated
|
||||||
* Emojis supported
|
* Emojis supported
|
||||||
* Upload images from tweet to Mastodon
|
* Upload images from tweet to Mastodon
|
||||||
* Optionally upload videos 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
|
## Usage
|
||||||
|
|
||||||
```sh
|
```
|
||||||
usage: twoot.py [-h] [-f <.toml config file>] [-t <twitter account>] [-i <mastodon instance>]
|
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]
|
[-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>]
|
[-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
|
### Removing redirected links
|
||||||
|
|
||||||
`-l` (or `remove_link_redirections = true` in toml file) will follow every link included in the
|
`remove_link_redirections = true` in toml file (or `-l` on the command line ) will follow every link
|
||||||
tweet and replace them with the url that the resource is directly dowmnloaded from (if applicable).
|
included in the tweet and replace them with the url that the resource is directly dowmnloaded from
|
||||||
e.g. bit.ly/xxyyyzz -> example.com
|
(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
|
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.
|
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.
|
also select redirection removal as trackers are often hidden behind the redirection of a short URL.
|
||||||
|
|
||||||
### Uploading videos
|
### 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
|
* 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
|
* 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
|
### 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
|
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
|
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.
|
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.
|
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,
|
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
|
||||||
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>).
|
||||||
zone database (<https://en.wikipedia.org/wiki/Tz_database>)
|
e.g. `tweet_timezone = "Europe/Paris"` or `tweet_timezone = "UTC"`
|
||||||
e.g. `tweet_timezone = "Europe/Paris"`
|
|
||||||
|
|
||||||
### Rate control
|
### 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.
|
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
|
## Installation
|
||||||
|
|
||||||
Make sure python3 is installed.
|
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`
|
In your user folder, execute `git clone https://gitlab.com/jeancf/twoot.git`
|
||||||
to clone repo with twoot.py script.
|
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
|
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
|
and process the tweets posted in the last 5 days but at least 15 minutes
|
||||||
ago:
|
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
|
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
|
## Featured Accounts
|
||||||
|
|
||||||
Twoot is known to be used for the following feeds (older first):
|
Twoot is known to be used for the following feeds (older first):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user