Skip to content

ahmadfarhan1981/pinboard-linkding-migrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Pinboard to Linkding migrator

The somewhat superfluous Pinboard to Linkding migrator
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

About The Project

This is a script that takes a json export from pinboard then, using the Linkding REST API, insert them into Linkding

NOBODY technically NEEDS this

I didnt realize that Linkding supports importing of Netscape Bookmark File format. Exporting in that format in pinboard then is the prefered way of migrating from pinboard to Linkding.

By the time i realize this, I was already working on this project, so I decided to finish and publish this, despite the apparent uselessness.

This project is also a way for me to practice language that I don't use at work, so I thought might as well continue and finish this.

(back to top)

Limitations

This is SLOWWWW

The REST API doesnt provide a way to insert multiple bookmarks in a batch, so each bookmark that needs to be inserted is a single REST API call.

My own json file with 2189 bookmarks took about 72 minutes. That is a rate of about 1.99 seconds per bookmarks insert. This is without any kind of parallelization on my side.

(Destructive operation) No checks for inserting URL that already exsits

The REST API have no way to search for bookmarks based on URL. When inserting a URL that already exists, the behaviour of the REST API is to update the existing bookmarks with the info provided in the API call. This is a destructive process, potentially losing your existing notes and the tagging that you applied to the bookmark.

Create time for bookmarks will be at time of import

The create time of the inserted bookmarks will be the time of the import. Currently the workaround is: the actual create time of the bookmarks will be prepended to the description of the bookmarks.

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

  • python

    You need python to run python scripts. Find the appropriate installation instruction for your platform.

    On debian based Linux systems: (or any that uses apt as the package manager)

    apt install python3
  • python virtual environment (optional, but recommended)

    python3 -m pip install --user virtualenv
  • git (optional) Easiest way to get these files is cloning this repo using git. Alternatively you can download the files as a zip and extract it somewhere.

    On debian based Linux system:

    apt install git

Installation

  1. Clone the repo, then go into the directory that we cloned
    git clone https://github.com/ahmadfarhan1981/pinboard-linkding-migrator.git
    cd pinboard-linkding-migrator
  2. Create a virtual environment for the script (optional, but recommended)
    python3 -m venv env
    Then activate the virtual environment
    source env/bin/activate
  3. Install the requirements
    pip install -r requirements.txt
  4. Copy the example .env.example file as /env
    cp .env.example .env
  5. Edit the .env file. At least "PLM_LINKDING_API_KEY" & "PLM_LINKDING_URL" needs to be updated.
    ...
    PLM_LINKDING_API_KEY = [your linkding REST API token. Found in Settings->Intergration]
    PLM_LINKDING_URL = [Your linkding URL without the trailing slash]
    ...
  6. put the pinboard json export file into the same directory with the name "pinboard_export.json" (or update the "PLM_JSON_FILENAME" value in the .env file in step 5 to the name of your file)
  7. Run the script
    python3 ./main.py

(back to top)

Roadmap

I do want to continue extending this. Some of the things I have in mind are listed here, in no particular order.

  • Flask webapp
  • Insert directly into linkding database, if have access
  • More import/export targets other than just pinboard/Linkding
  • Modularization. Supporting mods to add import/export targets
  • docker image for easier install/use

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Ahmad Farhan - [email protected]

Project Link: https://github.com/ahmadfarhan1981/pinboard-linkding-migrator

(back to top)

About

A script to migrate pinboard bookmarks to linkding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages