ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Binary​Plist

Automatically converts binary property lists to XML when opened and writes them back out to binary when saved.

Details

Installs

  • Total 3K
  • Win 593
  • OS X 2K
  • Linux 105
Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6
Windows 0 2 0 0 0 2 1 1 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 2 2 1 0 0 0 0 0 0 2 2 0 0 0 0 0 0 2 0 1 2 0
OS X 0 0 1 3 0 0 4 1 1 0 2 1 1 2 0 0 1 0 1 2 1 0 1 1 0 5 1 1 1 3 3 2 1 4 3 3 0 0 2 5 3 2 2 3 0 1
Linux 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

BinaryPlist

I'm an Objective-C developer by trade and a Ruby developer at heart, so excuse my poor python skills. This is my take at a plist plugin for Sublime Text 3 that should make working with plists feel a lot more first-class. It provides:

  • Automatic conversion of binary plist to XML. You can then edit the XML file in Sublime and it will automatically convert back to binary when you save.
  • Cross platform support. The solution is pure python. No calls to the command line, no foreign-function shenanigans, just 100% python goodness.
  • Plist syntax highlighting from TextMate.

The python plist support is taken from the Python 3.4 standard library, with a few modifications to support running in the Python 3.3 that ships with Sublime Text 3. This library therefore has a heavy dependency on Python 3.x which is why it'll probably never work with Sublime Text 2. Seriously, just use Sublime Text 3, it's awesome.

Why?

Sublime Text is by far my favourite text editor. It has a fantastic package manager in Package Control which allows you to manage the installation of plugins that extend the functionality of Sublime. Sublime doesn't support binary plists out of the box, but a kind sir by the name of relikd made a plugin that can convert to and from binary plist. I have a couple of problems with his implementation, though:

  1. The UX leaves a lot to be desired. It requires you to manually press some arcane key combination to toggle between binary (useless) and XML (useful). I can't imagine any situation where'd you want to edit the binary in a binary plist by hand, so why open it as binary by default?
  2. Internally, it just calls the plutil command line tool that ships with OS X. This means it requires OS X to work. Ideally, this should be an entirely python native solution, which would work on any platform, on the off-chance you encounter a plist file on a non-Apple computer. Having to start up a command line app doesn't strike me as particularly efficient either.
  3. It doesn't ship with a plist syntax definition. XML plists can of course just use the built-in XML highlighter, but that isn't nearly as strict as plists are, and it doesn't support the “old-style” plist format which you sometimes still see.