Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 3e0325e

Browse files
committed
generate documentation with sphinx - fix #27
1 parent 1f81ed1 commit 3e0325e

File tree

99 files changed

+19471
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+19471
-81
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ tootrss_clientcred.txt
1717
tootrss_usercred.txt
1818
*.log
1919
/twootfeed.egg-info/
20+
21+
## Doc
22+
/docsrc/build/

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ clean:
1313
create-mastodon-cli:
1414
$(PYTHON) twootfeed/utils/create_mastodon_client.py
1515

16+
html:
17+
rm -rf docsrc/build
18+
rm -rf docs/*
19+
touch docs/.nojekyll
20+
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
cp -a docsrc/build/html/. docs
22+
1623
install:
1724
test -d $(VENV) || virtualenv $(VENV) -p $(PYTHON_VERSION)
18-
$(PIP) install -e .[test]
25+
$(PIP) install -e .[test,doc]
1926
test -e twootfeed/config.yml || cp twootfeed/config.example.yml twootfeed/config.yml
2027

2128
serve:

Makefile.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ PIP = $(VENV)/bin/pip
1717
FLASK = $(VENV)/bin/flask
1818
PYTEST = $(VENV)/bin/py.test
1919
GUNICORN = $(VENV)/bin/gunicorn
20+
21+
#Sphinx Docs
22+
SPHINXOPTS ?=
23+
SPHINXBUILD ?= $(VENV)/bin/sphinx-build
24+
SOURCEDIR = docsrc/source
25+
BUILDDIR = docsrc/build

README.md

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -20,87 +20,9 @@ The RSS feed displays only the original tweets (not the retweets) and toots, wit
2020
- source
2121
- location (only for Twitter)
2222
- numbers of retweets and likes for tweets and boosts and favourites for toots
23-
(see examples below).
2423

25-
## Requirements
2624

27-
- Python 3.6+
28-
- API keys Twitter and/or Mastodon
29-
30-
31-
## Installation and configuration
32-
33-
- Install from pip
34-
35-
```bash
36-
$ pip install twootfeed
37-
```
38-
39-
- Initialize the configuration file
40-
```bash
41-
$ twootfeed_init
42-
```
43-
44-
- Fill in fields for the client(s) you will use in **'~/.config/twootfeed/config.yml'** :
45-
- for **Twitter** : see https://apps.twitter.com
46-
copy/paste the Twitter API key values in **config.yml** file ('_consumerKey_' and '_consumerSecret_')
47-
- for **Mastodon** : see [Python wrapper for the Mastodon API](https://mastodonpy.readthedocs.io/)
48-
use the included script which will register your app and prompt you to log in, creating the credential files for you.
49-
```bash
50-
$ twootfeed_create_mastodon_cli
51-
```
52-
Update the [feed and app parameters](https://github.com/SamR1/python-twootfeed/wiki/Application-parameters).
53-
54-
55-
- The files location can be changed with the following environment variables:
56-
57-
| variable | description | app default value |
58-
|------------------------|-----------------------------------------------| ------------------------------------------------------------------------------------------|
59-
| `TWOOTFEED_CONFIG_DIR` | configuration and credentials files directory | **'~/.config/twootfeed/'** |
60-
| `TWOOTFEED_CONFIG_FILE`| config file full path | config dir + **'config.yml'** => with default value: **'~/.config/twootfeed/config.yml'** |
61-
| `TWOOTFEED_LOG` | application log file | _no default value (log printed on the console)_ |
62-
63-
- Start the app
64-
```bash
65-
$ twootfeed
66-
```
67-
68-
## Usage
69-
70-
The RSS feeds are available on these urls:
71-
- for Twitter: http://localhost:8080/<keywords> or http://localhost:8080/tweets/<keywords>
72-
- for Mastodon:
73-
- search:
74-
- keyword as a hashtag: http://localhost:8080/toots/<hashtag> (without the leading #)
75-
- query: http://localhost:8080/toot_search/<query>
76-
- connected user favourites: http://localhost:8080/toot_favorites
77-
78-
79-
## Examples
80-
81-
### Search on Twitter
82-
83-
![Twitter search](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/twitter.png)
84-
85-
Results in RSS Feed:
86-
![RSS Feed](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/RSSFeed.png)
87-
88-
Display on FreshRSS, a great free self-hosted aggregator (https://github.com/FreshRSS/FreshRSS):
89-
![FreshRSS](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/FreshRSS.png)
90-
91-
### Search on Mastodon
92-
93-
![Mastodon search](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/mastodon.png)
94-
95-
Results in RSS Feed:
96-
![Mastodon Feed](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/MastodonRSSFeed.png)
97-
98-
Display on FreshRSS:
99-
![Mastodon FreshRSS](https://raw.githubusercontent.com/SamR1/python-twootfeed/master/images/MastodonFreshRSS.png)
100-
101-
102-
## Contribute
103-
see [Quick start for developers](https://github.com/SamR1/python-twootfeed/wiki/Quick-start-for-developers)
25+
➡️ see [documentation](https://samr1.github.io/python-twootfeed/index.html) for installation instructions and features.
10426

10527

10628
## Contributors

docs/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 9bb041ae8d48f10f011ae9f45d95b00f
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)