remarkable-rss.py is an Python script that efficiently fetches news from any RSS website, processes the information to read, analyze, and summarize the content for human readers. It seamlessly converts the summarized news into a PDF format, which is directly sent to the Remarkable device. Users can schedule this script to run regularly, ensuring they stay updated on diverse topics by transforming RSS feeds into a compatible document format and effortlessly uploading it to Google Drive for easy access on their Remarkable device.
- Python 3.x
- Feedparser library
- Any additional libraries required for rendering or converting formats
- Clone the repository:
- Run
pip install -r requirements.txt - Provide the RSS-Feed link inside the code.
- Save the .json location and folder ID in a
.envfile as
SERVICE_ACCOUNT_FILE = ''
FOLDER_ID = ''
OPENAI_API_KEY = ''
MODEL_ID = ''
- Execute and check the code if it is generating a .txt file and .pdf file.
- Go to the Google Cloud Console.
- Create a new project by clicking on the "Select a project" dropdown at the top and then "New Project."
- Enter a name for your project and click "Create."
- In the left sidebar, navigate to "APIs & Services" > "Library."
- Search for "Google Drive API" and select it from the results.
- Click on the "Enable" button to enable the Google Drive API for your project.
- After enabling the API, navigate to "APIs & Services" > "Credentials."
- Click on "Create Credentials" and select "Service account."
- Fill in the details for your service account and click "Create."
- Assign a role to your service account, such as "Editor," and click "Continue."
- On the next screen, you can skip granting users access and click "Done."
- In the "Service accounts" list, find your newly created service account and click on it.
- Click on the "Add Key" dropdown and select "JSON" to create a key. This will download a JSON file containing your service account credentials.
- Share the Google Drive folder you want to access by right-clicking the folder in Google Drive, selecting "Share," and entering the service account email address (found in the JSON file) to grant access.
- Set the desired permissions (e.g., Viewer or Editor) and click "Send."
-
Open the terminal.
-
Type
crontab -eto edit the cron jobs. -
Add the following line to execute the script every morning at 8 AM:
0 8 * * * /path/to/python /path/to/remarkable-rss.py
- Open the Start menu and search for "Task Scheduler."
- Click on "Create Basic Task" in the right-hand sidebar.
- Give your task a name (e.g., "Remarkable RSS Update") and click "Next."
- Choose "Daily" and click "Next."
- Set the start time and recurrence (e.g., every day) and click "Next."
- Select "Start a Program" and click "Next."
- In the "Program/script" box, enter the path to your Python executable (e.g.,
C:\Python39\python.exe). - In the "Add arguments (optional)" box, enter the path to your script (e.g.,
C:\path\to\remarkable-rss.py). - Click "Next," review your settings, and then click "Finish" to create the task.
Thanks to Remarkable for building such and amazing device.
