You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/_sources/installation.rst.txt
+95-21Lines changed: 95 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ Requirements
11
11
Installation
12
12
~~~~~~~~~~~~
13
13
14
+
- Create and activate a virtualenv
15
+
14
16
- Install from pip
15
17
16
18
.. code-block:: bash
@@ -25,50 +27,60 @@ Installation
25
27
$ twootfeed_init
26
28
27
29
28
-
- Fill in fields for the client(s) you will use in **'~/.config/twootfeed/config.yml'** :
30
+
- Fill in fields for the client(s) you want to use in **'~/.config/twootfeed/config.yml'** :
31
+
32
+
.. note::
33
+
|Details on `feed and app parameters <parameters.html>`_.
29
34
30
-
- for **Twitter**: see https://apps.twitter.com
35
+
- for **Twitter**: see https://apps.twitter.com
31
36
32
37
copy/paste the Twitter API key values in **config.yml** file ('*consumerKey*' and '*consumerSecret*')
33
38
34
-
- for **Mastodon**: see `Python wrapper for the Mastodon API <https://mastodonpy.readthedocs.io/>`_
39
+
- for **Mastodon**: see `Python wrapper for the Mastodon API <https://mastodonpy.readthedocs.io/>`_
35
40
36
41
use the included script which will register your app and prompt you to log in, creating the credential files for you.
37
42
38
43
.. code-block:: bash
39
44
40
45
$ twootfeed_create_mastodon_cli
41
46
42
-
Update the `feed and app parameters <parameters.html>`_.
47
+
.. warning::
48
+
|It may be necessary to temporarily disable two-factor authentication in your Mastodon account, if enabled.
43
49
44
-
.. versionadded:: 0.7.0
45
50
46
-
Since **twootfeed** is connected to the user account, feeds may display items with **restricted visibility**.
51
+
- Generate the token to access feeds
47
52
48
-
A token is now mandatory to start the application and access feeds (minimum length: 25 characters).
53
+
.. versionadded:: 0.7.0
49
54
50
-
Some examples for token generation:
55
+
Since **twootfeed** is connected to the user account (personal API keys), feeds may display items with **restricted visibility** (like private toots or direct messages).
51
56
52
-
> with Python
57
+
A token is now mandatory to start the application and access feeds, to limit exposing private items (feeds should **not** be publicly available).
53
58
54
-
.. code-block:: bash
59
+
Some examples for token generation (minimum length: 25 characters):
55
60
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
-
>>>
61
+
> with Python
63
62
64
-
> with a linux command line
63
+
.. code-block:: bash
65
64
66
-
.. code-block:: bash
65
+
$ python
66
+
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
67
+
Type "help", "copyright", "credits" or "license"for more information.
68
+
>>> import secrets
69
+
>>> secrets.token_urlsafe()
70
+
'pgoeS3qOsLHxduzNY_gmn6p5vWZqSzqBgnb_VPupQ7o'
71
+
>>>
67
72
68
-
$ date | sha256sum | base64 | head -c 25;echo
69
-
NWU2MzE1ZGM0MmVlZDg5NDNhN
73
+
> with a linux command line
70
74
75
+
.. code-block:: bash
76
+
77
+
$ date | sha256sum | base64 | head -c 25;echo
78
+
NWU2MzE1ZGM0MmVlZDg5NDNhN
79
+
80
+
After generation, copy the value into **'config.yml'**.
71
81
82
+
.. warning::
83
+
|If the token is missing or invalid, **twootfeed** will not start.
72
84
73
85
- The files location and settings can be changed with the following environment variables:
74
86
@@ -88,6 +100,68 @@ Installation
88
100
$ twootfeed
89
101
90
102
103
+
Upgrade
104
+
~~~~~~~
105
+
106
+
- Activate the virtualenv
107
+
108
+
- Upgrade with pip
109
+
110
+
.. code-block:: bash
111
+
112
+
$ pip install -U twootfeed
113
+
114
+
- Restart the application
115
+
116
+
117
+
Systemd service
118
+
~~~~~~~~~~~~~~~
119
+
120
+
To create a Linux service with systemd:
121
+
122
+
- create a service file:
123
+
124
+
.. code-block:: bash
125
+
126
+
$ sudo nano /etc/systemd/system/twootfeed.service
127
+
128
+
Template (to update depending on your distribution and installation):
0 commit comments