mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 14:01:13 +00:00
Improve README
This commit is contained in:
parent
943dfffeb1
commit
e53cef4274
11
README.md
11
README.md
|
@ -16,7 +16,6 @@ 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, a built-in list of 2-3 known good instances is used as before.
|
||||
|
||||
|
||||
> Previous updates can be found in CHANGELOG.
|
||||
|
||||
## Features
|
||||
|
@ -115,14 +114,14 @@ twitter and uploaded on Mastodon. The check is very fast if there is no update.
|
|||
Use `tweet_time_format` option in configuration file to specify the datetime format to display the date
|
||||
at which the tweet was published next to the "Original tweet" link. Valid format specifiers are
|
||||
the same as those used to format datetimes in python
|
||||
(https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior).
|
||||
(<https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior>).
|
||||
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)
|
||||
zone database (<https://en.wikipedia.org/wiki/Tz_database>)
|
||||
e.g. `tweet_timezone = "Europe/Paris"`
|
||||
|
||||
### Rate control
|
||||
|
@ -137,10 +136,10 @@ No limitation is applied to the number of toots uploaded if `-c` is not specifie
|
|||
|
||||
Make sure python3 is installed.
|
||||
|
||||
Twoot depends on `beautifulsoup4`, `Mastodon.py` and `pytz` python modules. Additionally, if you are using
|
||||
a version of python < 3.11 you also need to install the `tomli` module.
|
||||
Twoot depends on `requests`, `beautifulsoup4`, `Mastodon.py` and `pytz` python modules.
|
||||
Additionally, if you are using a version of python < 3.11 you also need to install the `tomli` module.
|
||||
|
||||
**Only If you plan to download videos** with the `-v` switch, are the additional dependencies required:
|
||||
**Only If you plan to download videos** with the `-v` switch, are additional dependencies required:
|
||||
|
||||
* Python module `youtube-dl2`
|
||||
* [ffmpeg](https://ffmpeg.org/download.html) (installed with the package manager of your distribution)
|
||||
|
|
2
twoot.py
2
twoot.py
|
@ -34,6 +34,7 @@ from urllib.parse import urlparse, parse_qsl, urlencode, urlunparse, urljoin, un
|
|||
import requests
|
||||
from bs4 import BeautifulSoup, element
|
||||
from mastodon import Mastodon, MastodonError, MastodonAPIError, MastodonIllegalArgumentError
|
||||
import pytz
|
||||
|
||||
# Number of records to keep in db table for each twitter account
|
||||
MAX_REC_COUNT = 50
|
||||
|
@ -1064,7 +1065,6 @@ def main(argv):
|
|||
if TOML['options']['tweet_time_format'] != "":
|
||||
timestamp_display = timestamp
|
||||
# Adjust timezone
|
||||
import pytz
|
||||
if TOML['options']['tweet_timezone'] != "":
|
||||
timezone_display = pytz.timezone(TOML['options']['tweet_timezone'])
|
||||
else: # Use local timezone by default
|
||||
|
|
Loading…
Reference in New Issue
Block a user