Skip to content

Documentation: document how to pull bookmarks from Firefox Sync #648

@khimaros

Description

@khimaros

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy