From 91a5ac3622145e547ca7dbfc943316ce87ee2fa3 Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sat, 20 Feb 2016 21:25:03 -0800 Subject: [PATCH 1/6] Adding configs --- configs/channels.ini | 20 ++++++++++++++++++++ configs/cygwin.ini | 34 ++++++++++++++++++++++++++++++++++ configs/darwin.ini | 33 +++++++++++++++++++++++++++++++++ configs/linux-gnu.ini | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 configs/channels.ini create mode 100644 configs/cygwin.ini create mode 100644 configs/darwin.ini create mode 100644 configs/linux-gnu.ini diff --git a/configs/channels.ini b/configs/channels.ini new file mode 100644 index 0000000..9c16d79 --- /dev/null +++ b/configs/channels.ini @@ -0,0 +1,20 @@ +[gr] +version=latest +type=release +branch= + +[beta] +version=latest-beta +type=candidate +branch= + +[aurora] +version= +type=daily +branch=mozilla-aurora + +[nightly] +version= +type=daily +branch=mozilla-central + diff --git a/configs/cygwin.ini b/configs/cygwin.ini new file mode 100644 index 0000000..719bd94 --- /dev/null +++ b/configs/cygwin.ini @@ -0,0 +1,34 @@ +# https://archive.mozilla.org/pub/firefox/releases/latest/README.txt + +[DEFAULT] +# install paths +PATH_PROGRAM_FILES = /cygdrive/c/Program Files +PATH_FIREFOX_BIN = firefox.exe +# env vars +PATH_FIREFOX_BIN_ENV = %(PATH_FIREFOX_APP)s/%(PATH_FIREFOX_BIN)s +PATH_FIREFOX_PROFILES_ENV = %(APPDATA)s\Mozilla\Firefox\Profiles +PATH_SIKULIX_BIN_ENV = /cygdrive/c/sikulix + +[nightly] +# download configs +DOWNLOAD_FILENAME = FirefoxNightly.exe +# install configs +PATH_FIREFOX_APP = %(PATH_PROGRAM_FILES)s/Nightly + +[aurora] +# download configs +DOWNLOAD_FILENAME = FirefoxDevEdition.exe +# install configs +PATH_FIREFOX_APP = %(PATH_PROGRAM_FILES)s/Firefox Developer Edition + +[beta] +# download configs +DOWNLOAD_FILENAME = FirefoxBeta.exe +# install configs +PATH_FIREFOX_APP = %(PATH_PROGRAM_FILES)s/Mozilla Firefox Beta + +[gr] +# download configs +DOWNLOAD_FILENAME = FirefoxRelease.exe +# install configs +PATH_FIREFOX_APP = %(PATH_PROGRAM_FILES)s/Mozilla Firefox diff --git a/configs/darwin.ini b/configs/darwin.ini new file mode 100644 index 0000000..3dfd16e --- /dev/null +++ b/configs/darwin.ini @@ -0,0 +1,33 @@ +# https://archive.mozilla.org/pub/firefox/releases/latest/README.txt + +[DEFAULT] +# install paths +PATH_FIREFOX_BIN = Contents/MacOS/firefox +# env vars +PATH_FIREFOX_BIN_ENV = %(PATH_FIREFOX_APP)s/%(PATH_FIREFOX_BIN)s +PATH_FIREFOX_PROFILES_ENV = $HOME/Library/Application Support/Firefox/ +PATH_SIKULIX_BIN_ENV = /Applications/Sikuli/runsikulix + +[nightly] +# download configs +DOWNLOAD_FILENAME = FirefoxNightly.dmg +# install configs +PATH_FIREFOX_APP = /Applications/Firefox Nightly.app + +[aurora] +# download configs +DOWNLOAD_FILENAME = FirefoxDevEdition.dmg +# install configs +PATH_FIREFOX_APP = /Applications/Firefox Developer Edition.app + +[beta] +# download configs +DOWNLOAD_FILENAME = FirefoxBeta.dmg +# install configs +PATH_FIREFOX_APP = /Applications/FirefoxBeta.app + +[gr] +# download configs +DOWNLOAD_FILENAME = FirefoxRelease.dmg +# install configs +PATH_FIREFOX_APP = /Applications/Firefox.app diff --git a/configs/linux-gnu.ini b/configs/linux-gnu.ini new file mode 100644 index 0000000..0e632c4 --- /dev/null +++ b/configs/linux-gnu.ini @@ -0,0 +1,33 @@ +# https://archive.mozilla.org/pub/firefox/releases/latest/README.txt + +[DEFAULT] +# install paths +PATH_FIREFOX_BIN = firefox +# env vars +PATH_FIREFOX_BIN_ENV = %(PATH_FIREFOX_APP)s/%(PATH_FIREFOX_BIN)s +PATH_FIREFOX_PROFILES_ENV = $HOME/.mozilla +PATH_SIKULIX_BIN_ENV = $HOME/Sikuli/runsikulix + +[nightly] +# download configs +DOWNLOAD_FILENAME = firefox-nightly.tar.bz2 +# install configs +PATH_FIREFOX_APP = $HOME/bin/firefox-nightly + +[aurora] +# download configs +DOWNLOAD_FILENAME = firefox-dev-edition.tar.bz2 +# install configs +PATH_FIREFOX_APP = $HOME/bin/firefox-developer-edition + +[beta] +# download configs +DOWNLOAD_FILENAME = firefox-beta.tar.bz2 +# install configs +PATH_FIREFOX_APP = $HOME/bin/firefox-beta + +[gr] +# download configs +DOWNLOAD_FILENAME = firefox-release.tar.bz2 +# install configs +PATH_FIREFOX_APP = $HOME/bin/firefox-release From 007fefcf6efa4ff60c6fb35c757d5c3a6773ea8d Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sat, 20 Feb 2016 22:03:34 -0800 Subject: [PATCH 2/6] Combine command classes into cmd.py, pep8 tweaks, README. --- .gitignore | 4 +- Makefile | 2 +- README.md | 16 +++++++- configs/channels.ini | 1 - fftool/cmd.py | 87 +++++++++++++++++++++++++++++++++++++++++ fftool/cmd_download.py | 24 ------------ fftool/cmd_install.py | 20 ---------- fftool/cmd_profile.py | 28 ------------- fftool/cmd_uninstall.py | 20 ---------- fftool/firefox_tool.py | 45 --------------------- fftool/main.py | 38 +++++++++--------- setup.py | 2 +- 12 files changed, 126 insertions(+), 161 deletions(-) create mode 100644 fftool/cmd.py delete mode 100644 fftool/cmd_download.py delete mode 100644 fftool/cmd_install.py delete mode 100644 fftool/cmd_profile.py delete mode 100644 fftool/cmd_uninstall.py delete mode 100644 fftool/firefox_tool.py diff --git a/.gitignore b/.gitignore index eafdd16..6319e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ _temp venv -*.pyc \ No newline at end of file +*.pyc +*.egg-info/ +*.egg diff --git a/Makefile b/Makefile index 6e93c5c..f569e74 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ test: tox clean: - rm -rf venv *egg* dist ./docs/_build .tox + rm -rf venv *egg* dist ./docs/_build .tox _temp find . -name '*.pyc' -delete find . -name '__pycache__' -type d -exec rm -fr {} \; diff --git a/README.md b/README.md index a85a8de..b4a79c2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,16 @@ # ff-tool -Python CLI tool for downloading desktop Firefox version, managing profiles and test prefs +ff-tool is a Python CLI tool for downloading desktop Firefox versions, managing profiles and test prefs. +It is largely a glorified convenience wrapper we'ver written around these amazing tools/libraries: -# Work in progress... DO NOT USE +* [mozdownload](https://github.com/mozilla/mozdownload) +* [mozprofile](https://github.com/mozilla/mozprofile) + + +## Example(s) +``` +$ ff -h +$ ff download -h +$ ff download -c nightly +``` + +# This tool is work in progress... DO NOT USE diff --git a/configs/channels.ini b/configs/channels.ini index 9c16d79..0180c5f 100644 --- a/configs/channels.ini +++ b/configs/channels.ini @@ -17,4 +17,3 @@ branch=mozilla-aurora version= type=daily branch=mozilla-central - diff --git a/fftool/cmd.py b/fftool/cmd.py new file mode 100644 index 0000000..cdd5c56 --- /dev/null +++ b/fftool/cmd.py @@ -0,0 +1,87 @@ +"""module providing ff-tool command menus""" + +from firefox_download import download + +class CMDDownload(): + + def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): + download = subparsers.add_parser('download', help=' command help') + download.add_argument( + '-c', + '--channel', + choices=CHANNELS, + default=DEFAULT_CHANNEL, + type=str, + help='Download a specific Firefox channel via mozdownload.' + ) + download.set_defaults(func=self.cmd) + + def cmd(self, args): + print('Downloading Firefox... [channel: {0}]'.format(args.channel)) + + download(args.channel) + + +class CMDProfile(): + + def __init__(self, subparsers): + profile = subparsers.add_parser('profile', help=' command help') + profile.add_argument( + '-c', + '--create', + type=str, + help='Create a new Firefox profile with the specified name.' + ) + profile.add_argument( + '-d', + '--delete', + type=str, + help='Delete the specified Firefox profile.' + ) + profile.set_defaults(func=self.cmd) + + def cmd(self, args): + if args.create: + print('Creating Firefox profile... [name: {0}]'.format(args.create)) + + if args.delete: + print('Deleting Firefox profile... [name: {0}]'.format(args.delete)) + + +class CMDInstall(): + + def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): + install = subparsers.add_parser('install', help=' command help') + install.add_argument( + '-c', + '--channel', + choices=CHANNELS, + default=DEFAULT_CHANNEL, + type=str, + help='Install a specific Firefox channel.' + ) + install.set_defaults(func=self.cmd) + + + def cmd(self, args): + print('Installing Firefox... [channel: {0}]'.format(args.channel)) + + + +class CMDUninstall(): + + def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): + uninstall = subparsers.add_parser('uninstall', help=' command help') + uninstall.add_argument( + '-c', + '--channel', + choices=CHANNELS, + default=DEFAULT_CHANNEL, + type=str, + help='Uninstall a specific Firefox channel.' + ) + uninstall.set_defaults(func=self.cmd) + + + def cmd(self, args): + print('Uninstalling Firefox... [channel: {0}]'.format(args.channel)) diff --git a/fftool/cmd_download.py b/fftool/cmd_download.py deleted file mode 100644 index 24f9e71..0000000 --- a/fftool/cmd_download.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -ff-tool specific arguments... -""" - -from firefox_download import download - - -class cmd_download(): - def cmd(self, args): - print('Downloading Firefox... [channel: {0}]'.format(args.channel)) - - download(args.channel) - - def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - download = subparsers.add_parser('download', help=' command help') - download.add_argument( - '-c', - '--channel', - choices=CHANNELS, - default=DEFAULT_CHANNEL, - type=str, - help='Download a specific Firefox channel via mozdownload.' - ) - download.set_defaults(func=self.cmd) diff --git a/fftool/cmd_install.py b/fftool/cmd_install.py deleted file mode 100644 index 42fce78..0000000 --- a/fftool/cmd_install.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -ff-tool specific arguments... -""" - - -class cmd_install(): - def cmd(self, args): - print('Installing Firefox... [channel: {0}]'.format(args.channel)) - - def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - install = subparsers.add_parser('install', help=' command help') - install.add_argument( - '-c', - '--channel', - choices=CHANNELS, - default=DEFAULT_CHANNEL, - type=str, - help='Install a specific Firefox channel.' - ) - install.set_defaults(func=self.cmd) diff --git a/fftool/cmd_profile.py b/fftool/cmd_profile.py deleted file mode 100644 index 6f2f9a8..0000000 --- a/fftool/cmd_profile.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -ff-tool specific arguments... -""" - - -class cmd_profile(): - def cmd(self, args): - if args.create: - print('Creating Firefox profile... [name: {0}]'.format(args.create)) - - if args.delete: - print('Deleting Firefox profile... [name: {0}]'.format(args.delete)) - - def __init__(self, subparsers): - profile = subparsers.add_parser('profile', help=' command help') - profile.add_argument( - '-c', - '--create', - type=str, - help='Create a new Firefox profile with the specified name.' - ) - profile.add_argument( - '-d', - '--delete', - type=str, - help='Delete the specified Firefox profile.' - ) - profile.set_defaults(func=self.cmd) diff --git a/fftool/cmd_uninstall.py b/fftool/cmd_uninstall.py deleted file mode 100644 index 9c29a22..0000000 --- a/fftool/cmd_uninstall.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -ff-tool specific arguments... -""" - - -class cmd_uninstall(): - def cmd(self, args): - print('Uninstalling Firefox... [channel: {0}]'.format(args.channel)) - - def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - uninstall = subparsers.add_parser('uninstall', help=' command help') - uninstall.add_argument( - '-c', - '--channel', - choices=CHANNELS, - default=DEFAULT_CHANNEL, - type=str, - help='Uninstall a specific Firefox channel.' - ) - uninstall.set_defaults(func=self.cmd) diff --git a/fftool/firefox_tool.py b/fftool/firefox_tool.py deleted file mode 100644 index aafb738..0000000 --- a/fftool/firefox_tool.py +++ /dev/null @@ -1,45 +0,0 @@ -"""firefox test tool helper script""" - -import configargparse - - -def _parse_args(): - """Parses out args for CLI""" - parser = configargparse.ArgumentParser( - description='cross-platform CLI tool for installing firefox and managing profiles') - parser.add_argument('-i', '--install', - help='install firefox version (release, beta, aurora, nightly', - default='nightly', - type=str) - parser.add_argument('-u', '--uninstall', - help='install firefox version (release, beta, aurora, nightly, ALL', - type=str) - parser.add_argument('-p', '--create-profile', - help='create new profile (indicate name)', - type=str) - parser.add_argument('-d', '--delete-profile', - help='delete profile (indicate name)', - type=str) - parser.add_argument('-s', '--set-profile-path', - help='-s ', - default='', - type=str) - - args = parser.parse_args() - return args, parser - - -def main(): - """Main entrypoint for CLI""" - - args, parser = _parse_args() - - print('INSTALL: {0}'.format(args.install)) - print('UNINSTALL: {0}'.format(args.uninstall)) - print('CREATE PROFILE: {0}'.format(args.create_profile)) - print('DELETE PROFILE: {0}'.format(args.delete_profile)) - print('SET PROFILE PATH: {0}'.format(args.set_profile_path)) - - -if __name__ == '__main__': - main() diff --git a/fftool/main.py b/fftool/main.py index 6368fb4..4e36a66 100755 --- a/fftool/main.py +++ b/fftool/main.py @@ -2,10 +2,7 @@ import argparse -from cmd_download import cmd_download -from cmd_install import cmd_install -from cmd_profile import cmd_profile -from cmd_uninstall import cmd_uninstall +from cmd import CMDDownload, CMDInstall, CMDUninstall, CMDProfile CHANNELS = ['gr', 'release', 'stable', 'beta', @@ -30,21 +27,26 @@ def get_channel(channel): return channel -parser = argparse.ArgumentParser(prog='ff') -subparsers = parser.add_subparsers(help='commands', dest='command') +def main(): + parser = argparse.ArgumentParser(prog='ff') + subparsers = parser.add_subparsers(help='commands', dest='command') -""" -Global arguments... -""" -# parser.add_argument('--foo', action='store_true', help='foo help') + """ + Global arguments... + """ + # parser.add_argument('--foo', action='store_true', help='foo help') -download = cmd_download(subparsers, CHANNELS, DEFAULT_CHANNEL) -install = cmd_install(subparsers, CHANNELS, DEFAULT_CHANNEL) -profile = cmd_profile(subparsers) -uninstall = cmd_uninstall(subparsers, CHANNELS, DEFAULT_CHANNEL) + download = CMDDownload(subparsers, CHANNELS, DEFAULT_CHANNEL) + install = CMDInstall(subparsers, CHANNELS, DEFAULT_CHANNEL) + profile = CMDProfile(subparsers) + uninstall = CMDUninstall(subparsers, CHANNELS, DEFAULT_CHANNEL) -options = parser.parse_args() -if "channel" in options: - options.channel = get_channel(options.channel) + options = parser.parse_args() + if "channel" in options: + options.channel = get_channel(options.channel) -options.func(options) + options.func(options) + + +if __name__ == '__main__': + main() diff --git a/setup.py b/setup.py index f02dcdc..dff7f1e 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ setup(name='ff-tool', zip_safe=False, entry_points=''' [console_scripts] - fftool = fftool.main:menu + ff = fftool.main:main ''', **extra_options ) From 47db6624f0080b7466b36a8fdbd8cfd2927ee3c6 Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sat, 20 Feb 2016 22:09:47 -0800 Subject: [PATCH 3/6] README --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b4a79c2..5e326df 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,33 @@ # ff-tool -ff-tool is a Python CLI tool for downloading desktop Firefox versions, managing profiles and test prefs. -It is largely a glorified convenience wrapper we'ver written around these amazing tools/libraries: +ff-tool is a Python CLI tool for downloading desktop Firefox versions, +as well as managing profiles and test prefs. It is largely a glorified +convenience wrapper we'ver written around these amazing tools/libraries: * [mozdownload](https://github.com/mozilla/mozdownload) * [mozprofile](https://github.com/mozilla/mozprofile) +# NOTE: This tool is work in progress... DO NOT USE + + +# Installation + +## Pre-requisites +* ff-tool requires you have python and virtualenv installed. + +## Build +``` +$ make build +$ source ./venv/bin/activate +``` + +## Cleanup +``` +$ deactivate +$ make clean +``` + +# Run ## Example(s) ``` $ ff -h @@ -13,4 +35,3 @@ $ ff download -h $ ff download -c nightly ``` -# This tool is work in progress... DO NOT USE From 9d658f6ccf219bbb2cf49b2e62c6a2e24da4522c Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sat, 20 Feb 2016 22:12:36 -0800 Subject: [PATCH 4/6] README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e326df..3800ed2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ convenience wrapper we'ver written around these amazing tools/libraries: * [mozprofile](https://github.com/mozilla/mozprofile) -# NOTE: This tool is work in progress... DO NOT USE +:bangbang: _NOTE: This tool is work in progress... DO NOT USE_ :bangbang: # Installation From a32a1d759973908f7a5b3abc0108d13616b0b9ec Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sat, 20 Feb 2016 22:36:39 -0800 Subject: [PATCH 5/6] flake8 --- .gitignore | 1 + fftool/cmd.py | 21 ++++++++++++--------- fftool/firefox_install.py | 14 +++++++++----- fftool/firefox_profile.py | 2 +- fftool/firefox_profile_handler.py | 2 +- fftool/firefox_uninstall.py | 2 +- fftool/main.py | 8 ++++---- requirements.txt | 4 +++- 8 files changed, 32 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 6319e0d..6c0f02f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ venv *.pyc *.egg-info/ *.egg +.tox/ diff --git a/fftool/cmd.py b/fftool/cmd.py index cdd5c56..fb16c26 100644 --- a/fftool/cmd.py +++ b/fftool/cmd.py @@ -2,10 +2,13 @@ from firefox_download import download + class CMDDownload(): def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - download = subparsers.add_parser('download', help=' command help') + download = subparsers.add_parser( + 'download', + help=' command help') download.add_argument( '-c', '--channel', @@ -25,7 +28,8 @@ class CMDDownload(): class CMDProfile(): def __init__(self, subparsers): - profile = subparsers.add_parser('profile', help=' command help') + profile = subparsers.add_parser( + 'profile', help=' command help') profile.add_argument( '-c', '--create', @@ -42,16 +46,17 @@ class CMDProfile(): def cmd(self, args): if args.create: - print('Creating Firefox profile... [name: {0}]'.format(args.create)) + print('Creating Firefox profile... [name: {0}]'.format(args.create)) # NOQA if args.delete: - print('Deleting Firefox profile... [name: {0}]'.format(args.delete)) + print('Deleting Firefox profile... [name: {0}]'.format(args.delete)) # NOQA class CMDInstall(): def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - install = subparsers.add_parser('install', help=' command help') + install = subparsers.add_parser( + 'install', help=' command help') install.add_argument( '-c', '--channel', @@ -62,16 +67,15 @@ class CMDInstall(): ) install.set_defaults(func=self.cmd) - def cmd(self, args): print('Installing Firefox... [channel: {0}]'.format(args.channel)) - class CMDUninstall(): def __init__(self, subparsers, CHANNELS, DEFAULT_CHANNEL): - uninstall = subparsers.add_parser('uninstall', help=' command help') + uninstall = subparsers.add_parser( + 'uninstall', help=' command help') uninstall.add_argument( '-c', '--channel', @@ -82,6 +86,5 @@ class CMDUninstall(): ) uninstall.set_defaults(func=self.cmd) - def cmd(self, args): print('Uninstalling Firefox... [channel: {0}]'.format(args.channel)) diff --git a/fftool/firefox_install.py b/fftool/firefox_install.py index 8dbfe62..e650a47 100755 --- a/fftool/firefox_install.py +++ b/fftool/firefox_install.py @@ -41,15 +41,16 @@ class FirefoxInstall(object): if IniHandler.is_linux(): # TODO: Move to /opt/* and chmod file? - # `tar -jxf firefox-beta.tar.gz -C ./beta --strip-components=1`? - local('tar -jxf {0} && mv firefox {1}'.format(installer, install_dir)) + # `tar -jxf firefox-beta.tar.gz -C ./beta --strip-components=1`? # NOQA + local('tar -jxf {0} && mv firefox {1}'.format(installer, install_dir)) # NOQA elif IniHandler.is_windows(): local('{0} -ms'.format(installer)) if channel == 'beta': - # Since Beta and General Release channels install to the same directory, - # install Beta first then rename the directory. + # Since Beta and General Release channels install + # to the same directory, install Beta first then + # rename the directory. gr_install_dir = self.config.get('gr', 'PATH_FIREFOX_APP') local('mv "{0}" "{1}"'.format(gr_install_dir, install_dir)) @@ -60,7 +61,10 @@ class FirefoxInstall(object): else: print(('[{0}] was cached, skipping install.'.format(channel))) - local('"{0}" --version # {1}'.format(self.config.get(channel, 'PATH_FIREFOX_BIN_ENV'), channel)) + cmd = self.config.get(channel, 'PATH_FIREFOX_BIN_ENV') + # local('"{0}" --version # {1}'.format(self.config.get(channel, + # 'PATH_FIREFOX_BIN_ENV'), channel)) + local('"{0}" --version # {1}'.format(cmd, channel)) def main(): diff --git a/fftool/firefox_profile.py b/fftool/firefox_profile.py index 427f196..5a01ef7 100644 --- a/fftool/firefox_profile.py +++ b/fftool/firefox_profile.py @@ -30,7 +30,7 @@ config = configparser.ConfigParser() def _parse_args(): """Parses out args for CLI""" parser = configargparse.ArgumentParser( - description='CLI tool for creating Firefox profiles via mozprofile CLI') + description='CLI tool for creating Firefox profiles') parser.add_argument('-a', '--application', required=True, help='Application to test. Example: "loop-server"') diff --git a/fftool/firefox_profile_handler.py b/fftool/firefox_profile_handler.py index c197a83..d1b34a6 100755 --- a/fftool/firefox_profile_handler.py +++ b/fftool/firefox_profile_handler.py @@ -23,7 +23,7 @@ class FirefoxProfileHandler(object): def switch_prefs(self, profile_name, user_prefs, channel='nightly'): channel_firefox_bin = self.config.get(channel, 'PATH_FIREFOX_BIN_ENV') - print(('{0} -CreateProfile {1}'.format(channel_firefox_bin, profile_name))) + print(('{0} -CreateProfile {1}'.format(channel_firefox_bin, profile_name))) # NOQA print('copy prefs.js to dir') def delete_all_profiles(self): diff --git a/fftool/firefox_uninstall.py b/fftool/firefox_uninstall.py index 204a33b..a0a3afe 100755 --- a/fftool/firefox_uninstall.py +++ b/fftool/firefox_uninstall.py @@ -44,7 +44,7 @@ class FirefoxUninstall(object): # If we're on Windows/Cygwin, use the uninstaller. if self.config.is_windows(): - local("\"{0}/uninstall/helper.exe\" -ms".format(path_firefox_app)) + local("\"{0}/uninstall/helper.exe\" -ms".format(path_firefox_app)) # NOQA # Otherwise just rimraf the Firefox folder. else: diff --git a/fftool/main.py b/fftool/main.py index 4e36a66..b03917d 100755 --- a/fftool/main.py +++ b/fftool/main.py @@ -36,10 +36,10 @@ def main(): """ # parser.add_argument('--foo', action='store_true', help='foo help') - download = CMDDownload(subparsers, CHANNELS, DEFAULT_CHANNEL) - install = CMDInstall(subparsers, CHANNELS, DEFAULT_CHANNEL) - profile = CMDProfile(subparsers) - uninstall = CMDUninstall(subparsers, CHANNELS, DEFAULT_CHANNEL) + CMDDownload(subparsers, CHANNELS, DEFAULT_CHANNEL) + CMDInstall(subparsers, CHANNELS, DEFAULT_CHANNEL) + CMDProfile(subparsers) + CMDUninstall(subparsers, CHANNELS, DEFAULT_CHANNEL) options = parser.parse_args() if "channel" in options: diff --git a/requirements.txt b/requirements.txt index 21d5387..cfcf13f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ Fabric3 configargparse configparser -mozdownload +mozdownload==1.20.2 +tox==2.3.1 +flake8==2.5.4 From d4002b37a26a3e611aa4615741870f36148e66d9 Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Sun, 21 Feb 2016 12:56:30 -0800 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3800ed2..a30f88f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ff-tool ff-tool is a Python CLI tool for downloading desktop Firefox versions, as well as managing profiles and test prefs. It is largely a glorified -convenience wrapper we'ver written around these amazing tools/libraries: +convenience wrapper we've written around these amazing tools/libraries: * [mozdownload](https://github.com/mozilla/mozdownload) * [mozprofile](https://github.com/mozilla/mozprofile)