Created
July 21, 2017 05:18
-
-
Save g8up/574ada2dfb4b66a6a9edaac2c8678fcd to your computer and use it in GitHub Desktop.
convert plist to json
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
# @file plist2json.py | |
# @desc convert plist to json | |
# @usage >python plist2json.py FILE_NAME | |
# @test under python v2.7 | |
# @author g8up | |
# @date 2017.7.21 | |
import sys | |
import json | |
from plistlib import readPlist | |
def main (): | |
for filename in sys.argv [1:]: | |
plist = open(filename) | |
plist_object = readPlist(plist) | |
json_serialized = json.dumps(plist_object) | |
print json_serialized | |
if __name__ == "__main__": | |
main () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sublimeText's config files may be a .plist file( xml)