This commit is contained in:
14
met_extractor.py
Executable file
14
met_extractor.py
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import json
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print(
|
||||
"Usage: met_etractor.py <playlist.json> <key>"
|
||||
)
|
||||
print("Example: met_extractor.py /tmp/my_playlist.json key")
|
||||
sys.exit(1)
|
||||
|
||||
with open(sys.argv[1], "r", encoding="utf-8") as f:
|
||||
met = json.load(f)
|
||||
print(json.dumps(met.get(sys.argv[2], {})))
|
||||
Reference in New Issue
Block a user