NOTE: The app currently only supports for Go-Shiori installation with PostgreSQL database.
This project integrates ArchiveBox and Go-Shiori by creating a lightweight Docker container that watches a PostgreSQL database for new entries in the bookmarks table used by Go-Shiori. When new entries are added, the container fetches the URLs and adds them to ArchiveBox for archiving.
For best experience, it is recommended to try install the Go-Shiori Web Extension in your browser and configure the key binding to easily store your bookmark.
- Docker
- Docker Compose
git clone https://github.com/harmonify/shiori-watcher.git
cd shiori-watcherCopy the .env.example file and make adjustments
cp .env.example .envRefer to the Configuration section to configure the watcher service.
Build and start the Docker containers using Docker Compose:
docker compose up --buildThis will start the following services:
- PostgreSQL: PostgreSQL database for storing bookmarks.
- ArchiveBox: Service for archiving URLs.
- Go-Shiori: Bookmark manager.
- Watcher: Service that watches the bookmarks table and triggers ArchiveBox for new URLs.
The watcher service uses the following environment variables for configuration:
DATA_DIR: Directory for storing temporary URL files (default:/data).LOGS_DIR: Directory for storing log files (default:/logs).DB_NAME: Name of the PostgreSQL database (default:mydb).DB_USER: PostgreSQL user (default:myuser).DB_PASSWORD: PostgreSQL password (default:mypassword).DB_HOST: PostgreSQL host (default:postgres).DB_PORT: PostgreSQL port (default:5432).ARCHIVEBOX_CONTAINER_NAME: Name of the ArchiveBox container (default:archivebox).ARCHIVEBOX_PUID: PUID of the ArchiveBox containerARCHIVEBOX_PGID: PGID of the ArchiveBox containerARCHIVEBOX_CMD_OPTIONS: Raw string provided into ArchiveBox CLI inside of its containerAPPRISE_URLS: Space separated push notification service URLs. See https://github.com/caronc/apprise/wiki for more information.
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push your branch to GitHub.
- Open a pull request describing your changes.
To set up a development environment:
-
Clone the repository:
git clone https://github.com/harmonify/shiori-watcher.git cd shiori-watcher -
Install dependencies:
pip install -r requirements.txt
-
Run the watcher script locally:
python main.py
Ensure you have a PostgreSQL instance running and accessible with the required database and table set up by Go-Shiori.
This project is licensed under the MIT License. See the LICENSE file for details.