Nordcast is a new podcast streaming app by koyu.space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

migrate.py 613B

12345678910111213
  1. #!/usr/bin/python3
  2. import os
  3. import redis
  4. files = os.listdir("authtokens/")
  5. r = redis.StrictRedis(host='localhost', port=6379, db=0)
  6. for f in files:
  7. os.rename("authtokens/"+f, "authtokens/"+f.replace(".secret", ".koyu.space.secret"))
  8. uuid = str(r.get("nordcast/uuids/" + f.replace(".secret", ""))).replace("b'", "").replace("'", "")
  9. r.set("nordcast/uuids/" + f.replace(".secret", "") + "$$koyu.space", uuid)
  10. podlist = str(r.get("nordcast/podlist/" + f.replace(".secret", ""))).replace("b'", "").replace("'", "")
  11. r.set("nordcast/podlist/" + f.replace(".secret", "") + "$$koyu.space", podlist)