Cleanup and README.md update for release

This commit is contained in:
JC Francois 2020-04-05 10:37:54 +02:00
parent e32620d79b
commit 092f2ab371
3 changed files with 35 additions and 4 deletions

View File

@ -1,9 +1,17 @@
# Twoot
Twoot is a python script that extracts tweets from a twitter feed and
reposts them as toots on a Mastodon account.
I started twoot when [tootbot](https://github.com/cquest/tootbot) I started twoot when [tootbot](https://github.com/cquest/tootbot)
stopped working. Tootbot relies on rss feeds from https://twitrss.me stopped working. Tootbot relies on rss feeds from https://twitrss.me
that broke when Twitter refreshed their web UI in July 2019. that broke when Twitter refreshed their web UI in July 2019.
Instead twoot is self contained and handles all the processing. Instead twoot is self contained and handles all the processing.
**UPDATE 05 APR 2020** VERSION 1.0. Twoot can now optionally download
videos from Twitter and upload them on Mastodon.
**UPDATE 17 MAR 2020** Added command line switch (`-r`) to also post **UPDATE 17 MAR 2020** Added command line switch (`-r`) to also post
reply-to tweets on the mastodon account. They will not be included by reply-to tweets on the mastodon account. They will not be included by
default anymore. default anymore.
@ -66,9 +74,9 @@ Make sure python3 is installed.
Twoot depends on `beautifulsoup4` and `Mastodon.py` python modules. Twoot depends on `beautifulsoup4` and `Mastodon.py` python modules.
If you plan to use the `-v` switch to download videos, the additional depedencies are required: **Only If you plan to download videos** with the `-v` switch, are the additional dependencies required:
* Python modules `m3u8` and `ffmpeg-python` * Python modules `m3u8` and `ffmpeg-python`
* [ffmpeg](https://ffmpeg.org/download.html) (check the package manager of your distribution) * [ffmpeg](https://ffmpeg.org/download.html) (installed with the package manager of your distribution)
``` ```
> pip install beautifulsoup4 Mastodon.py m3u8 ffmpeg-python > pip install beautifulsoup4 Mastodon.py m3u8 ffmpeg-python

View File

@ -1,5 +1,27 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
"""
This file is a modification of
https://github.com/h4ckninja/twitter-video-downloader/
The original package has an unknown license. The modified version
is released here under GPL v3.
Copyright (C) 2019 Jean-Christophe Francois
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import argparse import argparse
import requests import requests
import json import json

View File

@ -1,7 +1,7 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
''' """
Copyright (C) 2019 Jean-Christophe Francois Copyright (C) 2019 Jean-Christophe Francois
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
''' """
import sys import sys
import argparse import argparse
@ -551,5 +551,6 @@ def main(argv):
except FileNotFoundError: # The directory does not exist except FileNotFoundError: # The directory does not exist
pass pass
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)