Service to auto-upload the ZEIT π e-paper to your Tolino cloud library π
I know there are a bunch of similar repos out there, but as far as I know, they all depend on some additional resources
which take care of triggering and executing the syncing mechanism. zeit-on-tolino
solves this by using GitHub actions.
This service uses a scheduled GitHub actions workflow for automating the down- and upload of the e-paper, so you don't
have to worry about the runtime environment of the scripts. See usage instructions below for more details
- Fork this repo to your own GitHub space
- Go to your repo's settings and navigate to Actions > General > Actions permissions and enable "Allow all actions and reusable workflows".
- Now navigate to the Secrets page: Settings > Security > Secrets > Actions.
- Add the following secrets by clicking on the "New repository secret" button:
TOLINO_PARTNER_SHOP
: The name of the shop you purchased your device from (see supported shops).TOLINO_USER
: The username (usually an email address) you use for logging into the Tolino cloud.TOLINO_PASSWORD
: The associated password.ZEIT_PREMIUM_USER
: Your ZEIT premium username.ZEIT_PREMIUM_PASSWORD
: The associated password.
- Observe that your forked repo automatically triggers the sync, given the configuration of the scheduled trigger.
For a more detailed step-by-step guide check out my blog post about zeit-on-tolino
.
Currently, not all Tolino partner shops are supported. The following shops are supported and should work out of the box:
thalia
hugendubel
Make sure to set the TOLINO_PARTNER_SHOP
environment variable to one of the supported values. In case the shop
you want to use is missing, feel free to either open an issue or
raise a PR that adds the additional shop.
In case you want to add a new partner shop to the list of supported shops, I recommend checking the tolino_partner.py file. This file contains the minimal required configuration
values needed for a successful login. It specifies how selenium should find the user and password fields and also the
string shop_image_keyword
, which needs to be part of the style attribute of the image <div>
of your shop to be
clicked on. If that does not make too much sense to you, don't worry - feel free to reach out and I will be happy to
provide support π
Yes, to manually sync the latest ZEIT e-paper to your Tolino cloud, follow these steps:
- Clone the repo to your local machine via
git clone git@github.com:fgebhart/zeit-on-tolino.git
andcd zeit-on-tolino
- Install the requirements via
pip install poetry
andpoetry install
- Export the above-mentioned environment variables to your local environment
- Run the python sync script via
python sync.py
This script can of course also be executed in a cron-scheduled fashion on a raspberry by or similar.
To benefit from recent changes in the upstream zeit-on-tolino repo use the
Update Fork
GitHub actions workflow. Navigate to your GitHub actions and dispatch the workflow by manually clicking via
the GitHub UI.
After forking the repo you need to enable running workflows for your repo. Go to your repo's settings and navigate to Actions > General > Actions permissions and enable "Allow all actions and reusable workflows".
All kinds of contributions are welcome!
Clone the repo:
git clone git@github.com:fgebhart/zeit-on-tolino.git && cd zeit-on-tolino
and install the requirements using poetry:
poetry install
Note, running the tests requires exporting the above-mentioned environment variables because the tests simulate the upload flow of a dummy epub file to your Tolino cloud. Be aware of this side-effect, though, the dummy file will be removed from your Tolino cloud once the upload was successful.
Run the tests via:
pytest tests