dupeguru /

# Created By: Virgil Dupras
# Created On: 2009-12-30
# Copyright 2011 Hardcoded Software (
# This software is licensed under the "BSD" License as described in the "LICENSE" file, 
# which should be included with this package. The terms are also available at 

import sys
from optparse import OptionParser
import json

from hscommon.plat import ISOSX

def main(edition, ui, dev):
    if edition not in {'se', 'me', 'pe'}:
        edition = 'se'
    if ui not in {'cocoa', 'qt'}:
        ui = 'cocoa' if ISOSX else 'qt'
    build_type = 'Dev' if dev else 'Release'
    print("Configuring dupeGuru {0} for UI {1} ({2})".format(edition.upper(), ui, build_type))
    conf = {
        'edition': edition,
        'ui': ui,
        'dev': dev,
    json.dump(conf, open('conf.json', 'w'))

if __name__ == '__main__':
    usage = "usage: %prog [options]"
    parser = OptionParser(usage=usage)
    parser.add_option('--edition', dest='edition',
        help="dupeGuru edition to build (se, me or pe). Default is se.")
    parser.add_option('--ui', dest='ui',
        help="Type of UI to build. 'qt' or 'cocoa'. Default is determined by your system.")
    parser.add_option('--dev', action='store_true', dest='dev', default=False,
        help="If this flag is set, will configure for dev builds.")
    (options, args) = parser.parse_args()
    main(options.edition, options.ui,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.