srikiraju / website-to-remarkable

Upload any webpage to your remarkable with a single command! It can also crawl selected websites for new articles and uploads them as pdf's to your remarkable tablet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

website-to-remarkable

PRs welcome GitHub issues oses supported Languages supported GitHub license

A program for your reMarkable tablet, that scrapes selected websites for new articles and uploads them as PDFs to your reMarkable tablet. The program runs on macOS and Linux. Windows is not supported.

Setup

The program makes use of rmapi and requires rmapi to be set up in the same directory as the clone of this GitHub repo.

rmapi can be downloaded here. Download the file, unzip it and then run the command

$ ./rmapi

and follow the instructions to get the program synced with your reMarkable tablet.

Then run

$ pip install -r requirements.txt 

this installs the required Python packages.

Last, we must install wkhtmltopdf. This is system specific. Follow the instructions for your operating system.

macOS

Run

$ brew cask install wkhtmltopdf

If you do not have brew installed, you must first run

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Debian/Ubuntu

Run

$ sudo apt-get install wkhtmltopdf
Arch

Run

$ sudo pacman -S wkhtmltopdf

You are now ready to go!

Adding a single webpage

Run

$ python3 single_website.py <website link> <name of remarkable file>

As an example, you could run

$ python3 single_website.py https://github.com/MperorM/website-to-remarkable github_page.pdf

The link will now be converted to a PDF and uploaded to your reMarkable!

Adding multiple articles from selected webpages

Run

$ python3 main.py

While the program is running you can turn on your reMarkable and see the articles being added live.

How do I make it scrape other websites?

To change the websites from which articles are downloaded, you must change the configuration.json file to include the website you want added, along with the XPaths that capture article links and names.

If you are unsure how to do this, write an issue with a request to add support for some website, and I will write it for you!

GitHub closed issues

How can I set it up to run automatically each day?

I like reading my reMarkable papers in the morning before I touch my computer. Using a cronjob you can set it up to run at certain times of day of your liking.

To do so type in your terminal:

$ cronjob -e

In here, add the following line:

<minute of day> <hour of day> * * * cd <location of cloned github repo> && <absolute python path> main.py

For example, you might run:

15 06 * * * cd ~/username/Desktop/website-to-remarkable && /usr/local/bin/python3 main.py

This will cause the articles to be downloaded at 06:15 each morning.

About

Upload any webpage to your remarkable with a single command! It can also crawl selected websites for new articles and uploads them as pdf's to your remarkable tablet


Languages

Language:Python 100.0%