changeset 2:fc0dabd2269f

add README
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 05 Apr 2010 09:27:23 -0700
parents 979315ed0816
children 4d1cd60dd2a1
files README.txt
diffstat 1 files changed, 98 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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`)