[quote=âquodlibetâ]@facelessuser If you were to do this, why not add it to PlistJsonConverter? I mean apart from the name absurdity?
None of my business, how you run your plugin empire, of course [/quote]
The thought occurred to me, and it might actually be done that way in the end.
I donât think it will be too tough to do. The whole thing is built around PyYaml. It seems pretty easy to get running, and they provide a python 3 and 2 version. There are still some issues I see. Apparently when converting from plist to a python object that can be fed to the yaml converter, plistlib doesnât use straight up dictionaries, but it uses some class derived from dictionary. I will probably have to iterate through the python object and convert them all over to dictionary classes, but this isnât a big deal. I am confident I can get a plugin going, you can see it is on its way (at least in a one way conversion form plist to yaml). I literally threw this together by dropping the pyyaml lib into PlistJsonConverter, and deriving a couple new classes from the the language convert class, but you can see it is starting to take shape:
[pre=#282828] begin: ^(("â]?)(repository)(\2))(
beginCaptures: !!python/object/new:plistlib._InternalDict
dictitems:
â1â: !!python/object/new:plistlib._InternalDict
dictitems: {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
â2â: !!python/object/new:plistlib._InternalDict
dictitems: {name: punctuation.definition.string.yaml-tmlanguage}
â3â: !!python/object/new:plistlib._InternalDict
dictitems: {name: entity.other.repository.yaml-tmlanguage}
â4â: !!python/object/new:plistlib._InternalDict
dictitems: {name: punctuation.definition.string.yaml-tmlanguage}
â5â: !!python/object/new:plistlib._InternalDict
dictitems: {name: keyword.control.definition.yaml-tmlanguage}
end: ^(?!\s*($|#))(?=\S)
name: meta.repository-block.yaml-tmlanguage
patterns:
- !!python/object/new:plistlib._InternalDict
dictitems: {include: â#commentâ}
- !!python/object/new:plistlib._InternalDict
dictitems: {include: â#repository-keyâ}
- !!python/object/new:plistlib._InternalDict
dictitems: {include: â#patternsâ}[/pre]
I am pretty busy, so donât expect it in the next couple of daysâŚbut keep your eyes out.