Giter VIP home page Giter VIP logo

shiori-watcher's Introduction

Bookmark Watcher with ArchiveBox and Go-Shiori

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.

Notes

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.

Prerequisites

  • Docker
  • Docker Compose

Usage

Step 1: Clone the Repository

git clone https://github.com/harmonify/shiori-watcher.git
cd shiori-watcher

Step 2: Set up .env file

Copy the .env.example file and make adjustments

cp .env.example .env

Refer to the Configuration section to configure the watcher service.

Step 3: Build and Run the Docker Containers

Build and start the Docker containers using Docker Compose:

docker compose up --build

This 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.

Configuration

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 container
  • ARCHIVEBOX_PGID: PGID of the ArchiveBox container
  • ARCHIVEBOX_CMD_OPTIONS: Raw string provided into ArchiveBox CLI inside of its container
  • APPRISE_URLS: Space separated push notification service URLs. See https://github.com/caronc/apprise/wiki for more information.

Contributing

Contributions are welcome! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push your branch to GitHub.
  4. Open a pull request describing your changes.

Development Setup

To set up a development environment:

  1. Clone the repository:

    git clone https://github.com/harmonify/shiori-watcher.git
    cd shiori-watcher
  2. Install dependencies:

    pip install -r requirements.txt
  3. 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.

License

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

shiori-watcher's People

Contributors

harmonify avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.