Skip to content

pbarry/wallabag_import_pocket_tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wallabag_import_pocket_tags

A Go script to copy tags from an export of Pocket articles to your Wallabag articles. This program assumes you have already used the standard wallabag import from Pocket, which does not copy tags.

To get the URLs to match as well as possible, it performs basic URL manipulation like removing query strings, http vs https, and / suffixes. It also follows the Pocket URLs to check for HTTP redirects that may have been created since the article was saved to Pocket (Pocket seems to only save the original URL you added).

It's not perfect, but for me it achieved a ~95% success rate. The articles that failed to match were largely ones whose old URLs no longer work at all. All the unmatched entries (from Pocket and from Wallabag) are listed in debug output files - .unmatchedPocketEntries and .unmatchedWallabagEntries.

Usage:

  1. Use Wallabag's Pocket import
  2. Download your Pocket articles via Pocket's export tool
  3. Create a new API client on your Wallabag instance, for example at https://app.wallabag.it/developer/client/create
  4. Copy those credentials along with your Wallabag server URL & login credentials into a config.json file, as in this example: https://github.com/Strubbl/wallabago/blob/master/example/config.json
  5. go run main.go
  6. The script is safe to run multiple times.
    • Wallabag doesn't get confused if you keep trying to add the same tags to the same entries.
    • The Wallabag entries that are downloaded are cached in .wallabag_bin_items for speed of re-execution and so you don't overload the server. You can delete that file to force a re-download.

Notes:

  • Your Pocket export is expected to be named ril_export.html. If not, use the -pocketfile= parameter.
  • You don't want to bother copying tags for all the articles you've already archived in Wallabag. If you want to tag ALL your Wallabag entries, use -archives=2

With thanks to

Wallabago - Go wrapper for the Wallabag API

About

A Go script to copy tags from an export of Pocket articles to your Wallabag articles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages