Barebones server that listens for clips to save text and images from the web. Includes a set of clients to send clips from various apps:
Firefox is the best supported client. If you are offline,
hili queues the
snippets to send when a connection returns (you need to leave the tab open
until they are successfully sent; there's a little indicator that lets you know
how many snippets are queued).
To install (Firefox), open
about:debugging and choose "Load Temporary
Add-on", then select the
manifest.json file. This is temporary (but useful
for development); the add-on will be gone next time you run Firefox.
To install it more permanently:
If you're running Firefox Developer Edition, you should be able to:
- Zip up the
- Go to
Install Add-on From File, and select the zipped extension
Otherwise, the process is more involved:
- Go to
https://addons.mozilla.org/en-US/developers/addon/api/key/(create a Firefox account if necessary) and generate credentials
npm install -g web-ext
- Navigate to the
extensionsfolder and run:
web-ext sign --api-key=<JWT issuer> --api-secret=<JWT secret>
- This will create an
- Go to
Install Add-on From File, and select the
You can also install it from here: https://addons.mozilla.org/en-US/firefox/addon/hili/
Note this no longer works because the latest Firefox for Android removes support for sideloading extensions (Fenix):
To install on mobile, the easiest way is to visit this url from your phone:
If using the latest version of Firefox Nightly for Android (Fenix), you must first enable General Extension Support. You can then use this collection id:
14770219 and user id:
hili or add it to your own collection.
server.py launches a simple HTTP server that accepts any data at
localhost:<PORT>/ and saves it to a specified file.
Basic usage is:
python server.py <SAVE FILE> <UPLOAD DIRECTORY> [-p <PORT>] [-k <AUTH_KEY>]
python server.py ~/notes/annos.json ~/notes/saved_files -p 8888 (
localhost:8888 is the default endpoint).
You can specify an authentication key with
-k. Only requests with this key will be accepted by the server; use the settings page to configure
hili to use this key (see below in
You can visit this server (e.g.
localhost:8888) to view your highlights.
You can also replace this server with whatever server you want, using
server.py as a starting point. In the extension options you can specify any endpoint to send the selections to.
Once the extension is installed:
- Run the server, e.g.
python server.py ~/notes/annos.json ~/notes/saved_files
- Highlight some text on a page, and click the "Highlight" button that appears
I suggest running the server on system startup as a background process. E.g. you could add
cd ~/hili; python server.py ~/notes/annos.json ~/notes/saved_files to your
~/.xinitrc or equivalent file.
You can also view your highlights by visiting the server address, e.g.
You can configure the url that
hili sends to, and an optional secret key (see the
Server section above), from the settings page.
If you want something to happen whenever a new highlight is received, you can do something like:
#!/bin/bash ANNOS_PATH=~/notes/web/annos.json tail -n 0 -f $ANNOS_PATH | while read line; do # do something here, e.g. pass $line to another script echo $line done