👛 a very simple REST API for saving online articles to read later
Find a file
2024-10-08 02:18:32 -05:00
embed edit homepage warning 2024-06-18 18:44:13 -05:00
extra remove apikey authentication, advise using your own auth instead 2024-06-18 18:35:33 -05:00
.editorconfig embed static files, serve at /* 2023-12-28 16:27:18 -06:00
.gitignore update gitignore 2024-02-04 19:44:10 -06:00
config.go implement --skip-body 2024-10-08 02:18:32 -05:00
flake.lock update dependencies 2024-09-05 16:14:20 -05:00
flake.nix update dependencies 2024-09-05 16:14:20 -05:00
go.mod implement --skip-body 2024-10-08 02:18:32 -05:00
go.sum implement --skip-body 2024-10-08 02:18:32 -05:00
LICENSE.txt start of golang rewrite 2023-12-27 16:49:11 -06:00
main.go implement --skip-body 2024-10-08 02:18:32 -05:00
README.md simplify 2024-10-07 22:51:39 -05:00
TODO.md refactor flags 2024-10-07 23:37:24 -05:00

reticule

reticule is a small, single-user article clipping tool that relies on a feed reader of your choice (like Miniflux, Vore, Newsboat, and others) to view your saved links.

running

from source

  1. clone this repo and cd into it in a terminal
  2. go mod download && go build
  3. see ./reticule -h for how to use it

systemd

  1. compile/download and move the binary to /usr/local/bin/reticule
  2. make a dir called /var/lib/reticule/ to store the database
  3. create a user and group called reticule, making sure it owns both and has permission to execute it
  4. put the following in /etc/systemd/system/reticule.service:
[Unit]
Description=reticule, the link saver
After=network.target

[Service]
ExecStart=/usr/local/bin/reticule -db-path /var/lib/reticule -address 127.0.0.1 -port 8738 -feed-name "WHATEVER-YOU-WANT-HERE"
User=reticule
Group=reticule
Type=exec
Restart=always

[Install]
WantedBy=default.target
RequiredBy=network.target
  1. sudo systemctl daemon-reload && sudo systemctl enable --now reticule

Nix flakes

if you're running NixOS, this flake provides the reticule package and a module. here's an example flake.nix you can copy from:

{
  inputs = {
    reticule.url = "git+https://git.cyberia.club/reese/reticule.git";
  };
  
  outputs = { reticule, ... }@inputs: {
    nixosConfigurations.hostname = nixpkgs.lib.nixosSystem rec {
      modules = [
        reticule.nixosModules.reticule
      ];
    };
  };
}

the possible options can be found in flake.nix.

WARNING: reticule comes with absolutely zero means of authentication on its own. if you want to use it over the internet, use reverse-proxy authentication to protect the /add endpoint at the very least.

browser bookmarklet

create a new bookmark called "save to reticule" and set the URL to the following:

javascript:(()=>{window.open("<SERVER_ADDRESS>/add&url="+encodeURIComponent(location),"_blank","noreferrer,noopener")})()

change <SERVER_ADDRESS> to your server's address.

go to a page you want to save, click the bookmarklet, and voila! it should open a new tab, hopefully telling you that it was saved successfully, which you can then close.

android

  1. install HTTP Shortcuts (F-Droid, Play Store)
  2. save reticule_http_shortcut.json to your device.
  3. in HTTP Shortcuts, open the 3 dot menu in the top right corner, tap "Import/Export", then "Import from file". select the file you downloaded.
  4. back in the main page, open the menu again, then tap "Variables", and edit the value of reticule_instance to point to yours.
  5. try using the share button in an app. a new item "Send to..." with the HTTP Shortcuts icon should appear on the share sheet. you can also save an article by opening the shortcut inside the app itself and pasting the URL.

feed reader setup

there is an RSS feed endpoint at /feed, and an Atom feed at /atom. if it doesn't work in your reader, open an issue and i will try my best to help figure it out!


acknowledgements

the purple coin purse favicon comes from OpenMoji which is licensed under CC BY-SA 4.0.