Created
January 1, 2023 15:39
-
-
Save schlamar/b4747b3d28599cae728e71a2266714ce to your computer and use it in GitHub Desktop.
Import Wallabag to Shiori
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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