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

Commit

Permalink
Merge branch 'release-v0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
SamR1 committed Jul 16, 2022
2 parents a807516 + 79904f6 commit 5d75b32
Show file tree
Hide file tree
Showing 33 changed files with 541 additions and 200 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## Version 0.7.0 (2022/07/16)

#### Misc
* [PR#31](https://github.com/SamR1/python-twootfeed/pull/31) - Minor improvements


## Version 0.7.0 (2022/07/15)

#### New Features
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[![PyPI version](https://img.shields.io/pypi/v/twootfeed.svg)](https://pypi.org/project/twootfeed/)
[![Downloads](https://pepy.tech/badge/twootfeed)](https://pepy.tech/project/twootfeed)
[![Python Version](https://img.shields.io/badge/python-3.6+-brightgreen.svg)](https://python.org)
[![Python Version](https://img.shields.io/badge/python-3.7+-brightgreen.svg)](https://python.org)
[![Flask Version](https://img.shields.io/badge/flask-2.1-brightgreen.svg)](http://flask.pocoo.org/)
[![code style: black](https://img.shields.io/badge/code%20style-black-black)](https://black.readthedocs.io/en/stable/)
[![type check: mypy](https://img.shields.io/badge/type%20check-mypy-blue)](http://mypy-lang.org/)
Expand All @@ -22,6 +22,7 @@ The RSS feed displays only the original tweets (not the retweets) and toots, wit
- images
- source
- location (only for Twitter)
- visibility (only for Mastodon)
- numbers of retweets and likes for tweets and boosts and favourites for toots


Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0
0.7.1
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ac015f087c3654ff4e74bcd47b106784
config: a60a5b8ce7a38d3ffa6039003e56360f
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 6 additions & 0 deletions docs/_sources/changelog.md.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## Version 0.7.0 (2022/07/16)

#### Misc
* [PR#31](https://github.com/SamR1/python-twootfeed/pull/31) - Minor improvements


## Version 0.7.0 (2022/07/15)

#### New Features
Expand Down
3 changes: 2 additions & 1 deletion docs/_sources/features.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ The feed displays only the original tweets (not the retweets) and toots, with:
- images
- source
- location (only for Twitter)
- visibility (only for Mastodon)
- numbers of retweets and likes for tweets and boosts and favourites for toots

.. warning::

| **twootfeed** is developed for a personal use.
| **twootfeed** is intended for personal use only.
| Tweets and toots are displayed with the user account associated to the API keys (feeds may contain items with **restricted visibility**).
4 changes: 3 additions & 1 deletion docs/_sources/how-to-developers.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Installation

- Get API Keys (see `installation <installation.html#installation>`_)

- Generate token to access feed (see `installation <installation.html#installation>`_)

- Start the server

.. code-block:: bash
Expand All @@ -44,7 +46,7 @@ Installation
Tests
~~~~~~~~~~~~
~~~~~

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Welcome to twootfeed's documentation!
=====================================

**twootfeed** generate a rss feed from parsed Twitter or Mastodon search and from Mastodon bookmarks, favorites and home timeline.
**twootfeed** generate an rss feed from parsed Twitter or Mastodon search and from Mastodon bookmarks, favorites and home timeline.

.. toctree::
:maxdepth: 1
Expand Down
116 changes: 95 additions & 21 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Requirements
Installation
~~~~~~~~~~~~

- Create and activate a virtualenv

- Install from pip

.. code-block:: bash
Expand All @@ -25,50 +27,60 @@ Installation
$ twootfeed_init
- Fill in fields for the client(s) you will use in **'~/.config/twootfeed/config.yml'** :
- Fill in fields for the client(s) you want to use in **'~/.config/twootfeed/config.yml'** :

.. note::
| Details on `feed and app parameters <parameters.html>`_.
- for **Twitter** : see https://apps.twitter.com
- for **Twitter**: see https://apps.twitter.com

copy/paste the Twitter API key values in **config.yml** file ('*consumerKey*' and '*consumerSecret*')

- for **Mastodon** : see `Python wrapper for the Mastodon API <https://mastodonpy.readthedocs.io/>`_
- for **Mastodon**: see `Python wrapper for the Mastodon API <https://mastodonpy.readthedocs.io/>`_

use the included script which will register your app and prompt you to log in, creating the credential files for you.

.. code-block:: bash
$ twootfeed_create_mastodon_cli
Update the `feed and app parameters <parameters.html>`_.
.. warning::
| It may be necessary to temporarily disable two-factor authentication in your Mastodon account, if enabled.
.. versionadded:: 0.7.0

Since **twootfeed** is connected to the user account, feeds may display items with **restricted visibility**.
- Generate the token to access feeds

A token is now mandatory to start the application and access feeds (minimum length: 25 characters).
.. versionadded:: 0.7.0

Some examples for token generation:
Since **twootfeed** is connected to the user account (personal API keys), feeds may display items with **restricted visibility** (like private toots or direct messages).

> with Python
A token is now mandatory to start the application and access feeds, to limit exposing private items (feeds should **not** be publicly available).

.. code-block:: bash
Some examples for token generation (minimum length: 25 characters):

$ python
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import secrets
>>> secrets.token_urlsafe()
'pgoeS3qOsLHxduzNY_gmn6p5vWZqSzqBgnb_VPupQ7o'
>>>
> with Python

> with a linux command line
.. code-block:: bash
.. code-block:: bash
$ python
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import secrets
>>> secrets.token_urlsafe()
'pgoeS3qOsLHxduzNY_gmn6p5vWZqSzqBgnb_VPupQ7o'
>>>
$ date | sha256sum | base64 | head -c 25; echo
NWU2MzE1ZGM0MmVlZDg5NDNhN
> with a linux command line

.. code-block:: bash
$ date | sha256sum | base64 | head -c 25; echo
NWU2MzE1ZGM0MmVlZDg5NDNhN
After generation, copy the value into **'config.yml'**.

.. warning::
| If the token is missing or invalid, **twootfeed** will not start.
- The files location and settings can be changed with the following environment variables:

Expand All @@ -88,6 +100,68 @@ Installation
$ twootfeed
Upgrade
~~~~~~~

- Activate the virtualenv

- Upgrade with pip

.. code-block:: bash
$ pip install -U twootfeed
- Restart the application


Systemd service
~~~~~~~~~~~~~~~

To create a Linux service with systemd:

- create a service file:

.. code-block:: bash
$ sudo nano /etc/systemd/system/twootfeed.service
Template (to update depending on your distribution and installation):

.. code-block::
[Unit]
Description=twootfeed service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=<USER>
#Environment="TWOOTFEED_CONFIG_DIR="
#Environment="TWOOTFEED_CONFIG_FILE="
#Environment="TWOOTFEED_LOG="
#Environment="TWOOTFEED_SETTINGS="
ExecStart=<TWOOTFEED_DIRECTORY>/.venv/bin/python3 -m twootfeed
[Install]
WantedBy=multi-user.target
- start the service:

.. code-block:: bash
$ sudo systemctl start twootfeed
- to start on boot:

.. code-block:: bash
$ sudo systemctl enable twootfeed
Usage
~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/parameters.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Feed
* **timezone**: Feed timezone
* **text_length_limit:** title length of a Feed item
* **max_items**: maximum number of displayed items
* **token**: token for feeds access
* **token**: token for feeds access (minimal length: 25 characters)

App
~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.7.0',
VERSION: '0.7.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit 5d75b32

Please sign in to comment.