this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ensure secrets.json alwasy gitignored, u never kno

+12 -1
+12 -1
backup.py
··· 25 25 26 26 tokens = json.loads((here / "secrets.json").read_text()) 27 27 28 + gitignore = Path(".gitignore") 29 + 30 + # ensure secrets.json is gitignored 31 + if not gitignore.exists() or "\nsecrets.json\n" not in gitignore.read_text(): 32 + gitignore.write_text( 33 + (gitignore.read_text() if gitignore.exists() else "") + "\nsecrets.json\n", 34 + encoding="utf8", 35 + ) 36 + 28 37 29 38 # Initial setup 30 39 spotify = Spotify( ··· 154 163 print(f"⋆𐙚₊˚⊹♡ Creating playlist [bold][magenta]{name}[reset] ⋆౨ৎ˚⟡˖ ࣪") 155 164 try: 156 165 Path(here, name).mkdir(exist_ok=True, parents=True) 157 - Path(here, name, "autofill.yaml").write_text(f"from: {spotifyurl}", encoding="utf8") 166 + Path(here, name, "autofill.yaml").write_text( 167 + f"from: {spotifyurl}", encoding="utf8" 168 + ) 158 169 run(["git", "add", str(Path(here, name))], capture_output=True) 159 170 except Exception as e: 160 171 print(f"\tCouldn't create playlist: {e}")