schomery / policy-control

A browser extension to allow first-party resources with exceptions!
http://add0n.com/policy-control.html
30 stars 11 forks source link

Split up import/export into multiple files (feature request) #12

Closed cryptarch closed 6 years ago

cryptarch commented 6 years ago

Hey,

Thanks for your work on this plugin.

I'm using Git to keep my Policy Control settings synced around between my devices. This works okay, but it's not convenient to have everything in a single monolithic json file.

Do you think there would be any scope to have Policy Control compile its settings by combining all files from some directory when importing, and to split its saved configs out to a different file for each section when exporting?

I could probably set up a separate system using bash scripts or something that will decompose the json file into components after exporting and recombines them before importing, but it seems like a bit of a messy way of doing things.

I haven't done much javascript or any plugin development before, but if you're interested in the possibility of this feature and point me in the right direction, I'd probably be happy to play around with implementing it for you.

schomery commented 6 years ago

This sounds good, however, WebExtensions cannot read or write from directories. It is just too complex to ask users to upload several files. I am keeping this open for ideas

cryptarch commented 6 years ago

Fair enough, thanks anyway.