Skip to content

Instantly share code, notes, and snippets.

@schlamar
Created January 1, 2023 15:39
Show Gist options
  • Save schlamar/b4747b3d28599cae728e71a2266714ce to your computer and use it in GitHub Desktop.
Save schlamar/b4747b3d28599cae728e71a2266714ce to your computer and use it in GitHub Desktop.
Import Wallabag to Shiori
import json
import subprocess
def main():
with open("wallabag-all.json") as fobj:
data = json.load(fobj)
for entry in reversed(data):
cmd = ["docker", "compose", "exec", "shiori", "shiori", "add", "-a",
entry["url"], "-i", entry["title"]]
if entry["tags"]:
cmd.append("-t")
cmd.append(",".join(entry["tags"]))
subprocess.check_call(cmd)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment