-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Wiki Page URL
https://github.com/ArchiveBox/ArchiveBox/wiki/Quickstart#2-get-your-list-of-urls-to-archive
Suggested Edit
document how to pull bookmarks and/or history from the Firefox Sync server.
this enables the user to simply bookmark pages they want to archive on their desktop and mobile browser and they will automatically be archived by archivebox.
here's what worked for me.
determine your Firefox Sync client id:
$ python3 -m pip install PyFxA
$ fxa-client --bearer -u <YOUR EMAIL> \
--account-server https://api.accounts.firefox.com/v1 \
--oauth-server https://oauth.accounts.firefox.com/v1
# ---- BEARER TOKEN INFO ----
# User: <YOUR EMAIL>
# Scopes: profile
# Account: https://api.accounts.firefox.com/v1
# Oauth: https://oauth.accounts.firefox.com/v1
# Client ID: <YOUR CLIENT ID>
# ---------------------------
import all of your bookmarks into archivebox:
$ git clone https://github.com/eNote-GmbH/syncclient
$ cd syncclient
$ python3 -m pip install -e .
$ python3 syncclient/main.py -u <YOUR EMAIL> --client-id <YOUR CLIENT ID> \
get_records bookmarks \
| jq '.[].payload | fromjson | select(.type == "bookmark") | .bmkUri)' \
| archivebox add
this also works with a self hosted Firefox Sync server by setting the env var TOKENSERVER_URL="https://<YOUR SYNC SERVER>/token"
. you can configure this to run on a regular schedule eg. via cron.
with a bit of work, you could make this only archive bookmarks with a specific tag or folder.