-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plist write #12
Comments
this might be a viable option: https://github.com/nearinfinity/node-bplist-creator I'm thinking about including this along with node-bplist-parser |
ascii plist writing has been merged in! Will be pushing a release to npm soon. Binary plist support is planned for inclusion soon, see issue #2 |
Awesome sauce :) |
Finally got around to trying to use this now, but had a quick look and can't see it anywhere in the docs or code.. |
@wamatt I probably chose imprecise language here, what I was really indicating is that node-plist can now write xml plists via the build() function. It's in the readme. |
Ahh ok, yeah I see I was confused too. Damn, was hoping to find something that allows search,insert,delete,update of keys, but 'spose that's quite a bit more work. |
It would be more work to add those but I agree they would be nice to have. In my code I end up reading, modifying json, and then serializing right back to storage, so being able to treat a plist like a proper data object would be nice. Maybe add this as an enhancement ticket? Feel free to propose an API. I can't promise I'll have time to work on this at the moment but I think it would be nice to track the feature request. Maybe someone will step up and submit a pull request. :) |
Yeah I was thinking about doing that serialize -> modify -> serialize, but I'm nervous about how safe that is. Might change something unexpectedly in the formatting. Would you use that on system files ? :) |
It depends on the api design. Do you set it up so that insert(..), update(..), remove(...), etc immediately make changes? or instead do you have some kind of save(...) method that needs to be called? Either way, it doesn't solve the problem of multiple processes editing a plist simultaneously. |
True! Hadn't thought of that :p |
Hi, Are these methods like insert() , delete() or update() already available ? If so can i get some example to use it ? It will be great help for me. Also i saw in this thread that the plist can be read as json and then do the modification to this json, can u share this example ? i am newbee to scripting . Regards, |
Anyone know if this module or any other fork supports writing to a Plist? Binary plist in particular. I wan't to update some properties in a
~/Library/Preferences
plist file.The text was updated successfully, but these errors were encountered: