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

Commit 93b4709

Browse files
committed
update documentation
1 parent cd8b3fe commit 93b4709

22 files changed

+156
-178
lines changed

docs/_images/FreshRSS.png

-352 KB
Binary file not shown.

docs/_images/MastodonFreshRSS.png

-223 KB
Binary file not shown.

docs/_images/MastodonRSSFeed.png

-170 KB
Binary file not shown.

docs/_images/RSSFeed.png

-430 KB
Binary file not shown.

docs/_images/mastodon.png

-394 KB
Binary file not shown.

docs/_images/twitter.png

-841 KB
Binary file not shown.

docs/_sources/features.rst.txt

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,7 @@ The feed displays only the original tweets (not the retweets) and toots, with:
2020
- location (only for Twitter)
2121
- numbers of retweets and likes for tweets and boosts and favourites for toots
2222

23+
.. warning::
2324

24-
25-
.. danger::
26-
27-
| **twootfeed** is developed for personal use.
28-
| Tweets and toots are displayed for the user associated to API keys, it may expose private items if feeds are publicly available.
29-
30-
31-
Examples
32-
~~~~~~~~
33-
34-
- Search on Twitter
35-
36-
.. figure:: _images/twitter.png
37-
:alt: Twitter search
38-
:figclass: doc-img
39-
40-
Results in RSS Feed:
41-
42-
.. figure:: _images/RSSFeed.png
43-
:alt: RSS Feed
44-
:figclass: doc-img
45-
46-
Display on FreshRSS, a great free self-hosted aggregator (https://github.com/FreshRSS/FreshRSS):
47-
48-
.. figure:: _images/FreshRSS.png
49-
:alt: FreshRSS
50-
:figclass: doc-img
51-
52-
- Search on Mastodon
53-
54-
.. figure:: _images/mastodon.png
55-
:alt: Mastodon search
56-
:figclass: doc-img
57-
58-
Results in RSS Feed:
59-
60-
.. figure:: _images/MastodonRSSFeed.png
61-
:alt: Mastodon Feed
62-
:figclass: doc-img
63-
64-
Display on FreshRSS:
65-
66-
.. figure:: _images/MastodonFreshRSS.png
67-
:alt: Mastodon FreshRSS
68-
:figclass: doc-img
25+
| **twootfeed** is developed for a personal use.
26+
| Tweets and toots are displayed for the user associated to the API keys (feeds may contain items with **restricted visibility**).

docs/_sources/installation.rst.txt

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,45 @@ Installation
4141
4242
Update the `feed and app parameters <parameters.html>`_.
4343

44+
.. versionadded:: 0.7.0
45+
46+
Since **twootfeed** is connected to the user account, feeds may display private private items.
47+
48+
A token is now mandatory to start the application and access feeds (minimum length: 25 characters).
49+
50+
Some examples for token generation:
51+
52+
> with Python
53+
54+
.. code-block:: bash
55+
56+
$ python
57+
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
58+
Type "help", "copyright", "credits" or "license" for more information.
59+
>>> import secrets
60+
>>> secrets.token_urlsafe()
61+
'pgoeS3qOsLHxduzNY_gmn6p5vWZqSzqBgnb_VPupQ7o'
62+
>>>
63+
64+
> with a linux command line
65+
66+
.. code-block:: bash
67+
68+
$ date | sha256sum | base64 | head -c 25; echo
69+
NWU2MzE1ZGM0MmVlZDg5NDNhN
70+
71+
4472
4573
- The files location can be changed with the following environment variables:
4674

47-
========================= =============================================== ===========================================================================================
48-
variable description app default value
49-
========================= =============================================== ===========================================================================================
50-
`TWOOTFEED_CONFIG_DIR` configuration and credentials files directory **'~/.config/twootfeed/'**
51-
`TWOOTFEED_CONFIG_FILE` config file full path config dir + **'config.yml'** => with default value: **'~/.config/twootfeed/config.yml'**
52-
`TWOOTFEED_LOG` application log file _no default value (log printed on the console)_
53-
========================= =============================================== ===========================================================================================
75+
=========================== =============================================== ===========================================================================================
76+
variable description app default value
77+
=========================== =============================================== ===========================================================================================
78+
``TWOOTFEED_CONFIG_DIR`` configuration and credentials files directory **'~/.config/twootfeed/'**
79+
``TWOOTFEED_CONFIG_FILE`` config file full path config dir + **'config.yml'** => with default value: **'~/.config/twootfeed/config.yml'**
80+
``TWOOTFEED_LOG`` application log file `no default value (log printed on the console)`
81+
``TWOOTFEED_SETTINGS`` application settings **'ProductionConfig'**
82+
=========================== =============================================== ===========================================================================================
5483

5584
- Start the app
5685

@@ -62,33 +91,35 @@ Installation
6291
Usage
6392
~~~~~
6493

65-
The RSS feeds are available on these urls:
94+
The following RSS feeds are available:
6695

6796
- for Twitter search:
6897

69-
- http://localhost:8080/tweets/<keywords>
70-
- http://localhost:8080/<keywords> (*will be deprecated in a next version*)
98+
- http://localhost:8080/tweets/<keywords>?token=XXX
99+
- http://localhost:8080/<keywords>?token=XXX (*will be deprecated in a next version*)
71100

72101
- for Mastodon search:
73102

74103
- keyword as a hashtag:
75104

76-
- http://localhost:8080/toots/<hashtag> (without the leading #)
105+
- http://localhost:8080/toots/<hashtag>?token=XXX (without the leading #)
77106

78107
- query:
79108

80-
- http://localhost:8080/toots/search/<query>
81-
- http://localhost:8080/toot_search/<query> (*will be deprecated in a next version*)
109+
- http://localhost:8080/toots/search/<query>?token=XXX
110+
- http://localhost:8080/toot_search/<query>?token=XXX (*will be deprecated in a next version*)
82111

83112
- for Mastodon connected user favorites:
84113

85-
- http://localhost:8080/toots/favorites
86-
- http://localhost:8080/toot_favorites (*will be deprecated in a next version*)
114+
- http://localhost:8080/toots/favorites?token=XXX
115+
- http://localhost:8080/toot_favorites?token=XXX (*will be deprecated in a next version*)
87116

88117
- for Mastodon connected user bookmarks:
89118

90-
- http://localhost:8080/toots/bookmarks
119+
- http://localhost:8080/toots/bookmarks?token=XXX
91120

92121
- for Mastodon connected user home timeline:
93122

94-
- http://localhost:8080/toots/home_timeline
123+
- http://localhost:8080/toots/home_timeline?token=XXX
124+
125+
where XXX is the token set in configuration.

docs/_sources/parameters.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Application parameters are stored in ``config.yml`` file:
2525
timezone: 'Europe/Paris'
2626
text_length_limit: 100
2727
max_items: 20
28+
token: ''
2829
app:
2930
host: '0.0.0.0'
3031
port: '8080'
@@ -54,6 +55,7 @@ Feed
5455
* **timezone**: Feed timezone
5556
* **text_length_limit:** title length of a Feed item
5657
* **max_items**: maximum number of displayed items
58+
* **token**: token for feeds access
5759

5860
App
5961
~~~

docs/features.html

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<ul class="current">
4949
<li class="toctree-l1 current"><a class="current reference internal" href="#">Features</a><ul>
5050
<li class="toctree-l2"><a class="reference internal" href="#description">Description</a></li>
51-
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a></li>
5251
</ul>
5352
</li>
5453
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation and usage</a></li>
@@ -103,45 +102,14 @@ <h2>Description<a class="headerlink" href="#description" title="Permalink to thi
103102
<li><p>location (only for Twitter)</p></li>
104103
<li><p>numbers of retweets and likes for tweets and boosts and favourites for toots</p></li>
105104
</ul>
106-
<div class="admonition danger">
107-
<p class="admonition-title">Danger</p>
105+
<div class="admonition warning">
106+
<p class="admonition-title">Warning</p>
108107
<div class="line-block">
109-
<div class="line"><strong>twootfeed</strong> is developed for personal use.</div>
110-
<div class="line">Tweets and toots are displayed for the user associated to API keys, it may expose private items if feeds are publicly available.</div>
108+
<div class="line"><strong>twootfeed</strong> is developed for a personal use.</div>
109+
<div class="line">Tweets and toots are displayed for the user associated to the API keys (feeds may contain items with <strong>restricted visibility</strong>).</div>
111110
</div>
112111
</div>
113112
</section>
114-
<section id="examples">
115-
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h2>
116-
<ul class="simple">
117-
<li><p>Search on Twitter</p></li>
118-
</ul>
119-
<figure class="doc-img align-default">
120-
<img alt="Twitter search" src="_images/twitter.png" />
121-
</figure>
122-
<p>Results in RSS Feed:</p>
123-
<figure class="doc-img align-default">
124-
<img alt="RSS Feed" src="_images/RSSFeed.png" />
125-
</figure>
126-
<p>Display on FreshRSS, a great free self-hosted aggregator (<a class="reference external" href="https://github.com/FreshRSS/FreshRSS">https://github.com/FreshRSS/FreshRSS</a>):</p>
127-
<figure class="doc-img align-default">
128-
<img alt="FreshRSS" src="_images/FreshRSS.png" />
129-
</figure>
130-
<ul class="simple">
131-
<li><p>Search on Mastodon</p></li>
132-
</ul>
133-
<figure class="doc-img align-default">
134-
<img alt="Mastodon search" src="_images/mastodon.png" />
135-
</figure>
136-
<p>Results in RSS Feed:</p>
137-
<figure class="doc-img align-default">
138-
<img alt="Mastodon Feed" src="_images/MastodonRSSFeed.png" />
139-
</figure>
140-
<p>Display on FreshRSS:</p>
141-
<figure class="doc-img align-default">
142-
<img alt="Mastodon FreshRSS" src="_images/MastodonFreshRSS.png" />
143-
</figure>
144-
</section>
145113
</section>
146114

147115

0 commit comments

Comments
 (0)