# HG changeset patch # User Jeff Hammel # Date 1270484843 25200 # Node ID fc0dabd2269f040c20a15081e3c0456b4b0140c6 # Parent 979315ed0816c64cf8677f4a15c5a1bf735f86df add README diff -r 979315ed0816 -r fc0dabd2269f README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.txt Mon Apr 05 09:27:23 2010 -0700 @@ -0,0 +1,98 @@ +Profile Management with Firefox (and other?) +============================================ + + +Desired Functionality +--------------------- + +See https://wiki.mozilla.org/Auto-tools/Projects/ProfileManager and +https://bugzilla.mozilla.org/show_bug.cgi?id=539524 : + + - backing up profile + + - merging + + +profiles.ini +------------ + +A typical `.mozilla/firefox/profiles.ini` is as follows: + +{{{ +[General] +StartWithLastProfile=0 + +[Profile0] +Name=default +IsRelative=1 +Path=py91jfha.default +Default=1 + +[Profile1] +Name=Lammy +IsRelative=1 +Path=nr0eq10m.Lammy +}}} + +Notes: + + - why use identifiers `[Profile0]`, `[Profile1]`, etc instead of the + actual names ( `[default]`, `[lammy]` )? + + - Instead of `Default=1` or `0`, could indicate the version of + Firefox for which the profile is the default (e.g. `Default=3.6`) + + +Architecture +------------ + +The architecture should satisfy both user-facing applications +(i.e. the Firefox ProfileManager) as well as be friendly and malleable +for testing purposes (e.g. a command line application). All front +ends (GUI, command-line, web???, etc) should use the same underlying +API, which will be front-end agnostic. + +API +--- + +class ProfileManager(object): + + def __init__(self, profiles): + """ + profiles: profiles.ini file + """ + + def clone(self, from, to): + """ + clones the profile `from` and output to `to` + """ + + def backup(self, profile): + """ + backs up the profile named `profile`; + maybe should be named `snapshot` + """ + + def merge(self, *profiles): + """merge a set of profiles (not trivial!)""" + +Command Line Interface +---------------------- + +The command line interface should mirror the API. + +Options: + -c CONFIG, --config=CONFIG specify a profiles.ini file + [default: $HOME/.mozilla/firefox/profiles.ini] + +Examples: + + `profile-manager clone lammy foo # clone the lammy profile to foo` + + `profile-manager backup lammy # make a snapshot of the lammy profile` + + +Questions +--------- + +How to generate the hash key? (e.g. the `py91jfha` in `py91jfha.default`)