Skip to content

dannberg/daily-pinboard

Repository files navigation

Daily Pinboard

📌 Receive a daily email with all your past Pinboard bookmarks from this date in history. Like TimeHop, but for Pinboard.

GitHub Python Pinboard

📖 Overview

Daily Pinboard is a Python script that emails you a list of all your Pinboard bookmarks made on this day in previous years. If no bookmarks exist for that date, no email is sent. This is a great way to rediscover old saved links over time.


🚀 Setup

1️⃣ Install Dependencies

Ensure you have the required Python packages installed.

pip install -r requirements.txt

2️⃣ Config and Environment Variables

This code uses two configuration files:

  1. config.py - Contains non-sensitive configuration
  2. .env - Contains sensitive environment variables

Setting up config.py

Rename config-example.py to config.py and update all the variables:

Config Description
MSG_FROM Email address where the daily email should be sent from
MSG_TO Email address where you want the email sent
SMTP_SERVER Your SMTP server address
SMTP_USERNAME Your SMTP server username
FIRST_POST_YEAR The year in which you made your first Pinboard bookmark

Setting up Environment Variables

Copy .env.example to .env and add your sensitive credentials:

cp .env.example .env

Then edit .env with your actual credentials:

  • PINBOARD_API_TOKEN: Pinboard API token (Get yours from Pinboard Settings)
  • SMTP_PASS: Your SMTP server password

TIP: (optional) If you want a simple and inexpensive way to forward and send emails with your domains, I've been a happy customer of ForwardedEmail.net for a while now. This is not an ad, just a personal recommendation.

3️⃣ Running the Script

Execute the script manually:

python daily_pinboard.py

Or set up a cron job for daily execution:

  1. Make the scripts executable:
chmod +x rundailypinboard.sh
chmod +x daily-pinboard.py
  1. Open your crontab file:
crontab -e
  1. Add the following line:
0 7 * * * /path/to/rundailypinboard.sh >> /path/to/daily-pinboard/logs.txt 2>&1

Note: Replace both /path/to/ with the actual paths to your script and logs.txt file.

The cron job will run daily at 7 AM (server timezone). You can adjust the schedule to your preferred time. Logs are saved to logs.txt, which is ignored by this repository.


🤝 Contributing

If you have improvements or optimizations, feel free to submit a pull request!

Similarly, if you have any problems or bugs to report, please file an issue.

📜 License

This project is licensed under the MIT License. See LICENSE for details.

📝 TODO

Curious about what I plan to do next? Here's the plan:

  • Switch to Mailgun for email delivery
  • Update code so email html is in separate file
  • Design better email digest
  • Move to docker

About

A python script that will send you an email showing all the Pinboard bookmarks that were created on today's date in years past.

Resources

License

Stars

Watchers

Forks

Contributors