Ejemplo n.º 1
0
def build_help(edition):
    print("Generating Help")
    current_path = op.abspath('.')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help'.format(edition))
    changelog_path = op.join(current_path, 'help',
                             'changelog_{}'.format(edition))
    tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
    appname = {
        'se': 'dupeGuru',
        'me': 'dupeGuru Music Edition',
        'pe': 'dupeGuru Picture Edition'
    }[edition]
    homepage = 'http://www.hardcoded.net/dupeguru{}/'.format(
        '_' + edition if edition != 'se' else '')
    confrepl = {
        'edition': edition,
        'appname': appname,
        'homepage': homepage,
        'language': 'en'
    }
    changelogtmpl = op.join(current_path, 'help', 'changelog.tmpl')
    conftmpl = op.join(current_path, 'help', 'conf.tmpl')
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl,
                  confrepl, conftmpl, changelogtmpl)
Ejemplo n.º 2
0
def build_help():
    print("Generating Help")
    current_platform = 'osx' if ISOSX else 'win'
    current_path = op.abspath('.')
    confpath = op.join(current_path, 'help', 'conf.tmpl')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    credits_path = op.join(current_path, 'help', 'credits.rst')
    credits_tmpl = op.join(help_basepath, 'credits.tmpl')
    credits_out = op.join(help_basepath, 'credits.rst')
    filereplace(credits_tmpl,
                credits_out,
                credits=open(credits_path, 'rt', encoding='utf-8').read())
    image_src = op.join(current_path, 'help',
                        'image_{}'.format(current_platform))
    image_dst = op.join(current_path, 'help', 'en', 'image')
    if not op.exists(image_dst):
        try:
            os.symlink(image_src, image_dst)
        except (NotImplementedError,
                OSError):  # Windows crappy symlink support
            shutil.copytree(image_src, image_dst)
    tixurl = "https://github.com/hsoft/moneyguru/issues/{}"
    confrepl = {'platform': current_platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl,
                  confrepl, confpath)
Ejemplo n.º 3
0
def build_help():
    print("Generating Help")
    current_path = op.abspath('.')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
    confrepl = {'language': 'en'}
    changelogtmpl = op.join(current_path, 'help', 'changelog.tmpl')
    conftmpl = op.join(current_path, 'help', 'conf.tmpl')
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, conftmpl, changelogtmpl)
Ejemplo n.º 4
0
def build_help():
    print("Generating Help")
    current_path = op.abspath('.')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
    confrepl = {'language': 'en'}
    changelogtmpl = op.join(current_path, 'help', 'changelog.tmpl')
    conftmpl = op.join(current_path, 'help', 'conf.tmpl')
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, conftmpl, changelogtmpl)
Ejemplo n.º 5
0
def build_help():
    print("Generating Help")
    platform = 'osx' if ISOSX else 'win'
    current_path = op.abspath('.')
    confpath = op.join(current_path, 'help', 'conf.tmpl')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    tixurl = "http://bitbucket.org/hsoft/pdfmasher/issue/{0}"
    confrepl = {'platform': platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, confpath)
Ejemplo n.º 6
0
def build_help():
    print("Generating Help")
    platform = 'osx' if ISOSX else 'win'
    current_path = op.abspath('.')
    confpath = op.join(current_path, 'help', 'conf.tmpl')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    tixurl = "http://bitbucket.org/hsoft/pdfmasher/issue/{0}"
    confrepl = {'platform': platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl,
                  confrepl, confpath)
Ejemplo n.º 7
0
def build_help(edition):
    print("Generating Help")
    current_path = op.abspath('.')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help'.format(edition))
    changelog_path = op.join(current_path, 'help', 'changelog_{}'.format(edition))
    tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
    appname = {'se': 'dupeGuru', 'me': 'dupeGuru Music Edition', 'pe': 'dupeGuru Picture Edition'}[edition]
    homepage = 'http://www.hardcoded.net/dupeguru{}/'.format('_' + edition if edition != 'se' else '')
    confrepl = {'edition': edition, 'appname': appname, 'homepage': homepage, 'language': 'en'}
    changelogtmpl = op.join(current_path, 'help', 'changelog.tmpl')
    conftmpl = op.join(current_path, 'help', 'conf.tmpl')
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, conftmpl, changelogtmpl)
Ejemplo n.º 8
0
def build_help():
    print("Generating Help")
    current_platform = 'osx' if ISOSX else 'win'
    current_path = op.abspath('.')
    confpath = op.join(current_path, 'help', 'conf.tmpl')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    image_src = op.join(current_path, 'help', 'image_{}'.format(current_platform))
    image_dst = op.join(current_path, 'help', 'en', 'image')
    if not op.exists(image_dst):
        try:
            os.symlink(image_src, image_dst)
        except (NotImplementedError, OSError): # Windows crappy symlink support
            shutil.copytree(image_src, image_dst)
    tixurl = "https://github.com/hsoft/moneyguru/issues/{}"
    confrepl = {'platform': current_platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, confpath)
Ejemplo n.º 9
0
def build_help(dev):
    if dev:
        print("Generating devdocs")
        print_and_do('sphinx-build devdoc devdoc_html')
    print("Generating Help")
    current_platform = 'osx' if ISOSX else 'win'
    current_path = op.abspath('.')
    confpath = op.join(current_path, 'help', 'conf.tmpl')
    help_basepath = op.join(current_path, 'help', 'en')
    help_destpath = op.join(current_path, 'build', 'help')
    changelog_path = op.join(current_path, 'help', 'changelog')
    image_src = op.join(current_path, 'help', 'image_{}'.format(current_platform))
    image_dst = op.join(current_path, 'help', 'en', 'image')
    if not op.exists(image_dst):
        os.symlink(image_src, image_dst)
    tixurl = "https://hardcoded.lighthouseapp.com/projects/31473-moneyguru/tickets/{0}"
    confrepl = {'platform': current_platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, confpath)
Ejemplo n.º 10
0
def build_help():
    print("Generating Help")
    current_path = op.abspath(".")
    help_basepath = op.join(current_path, "help", "en")
    help_destpath = op.join(current_path, "build", "help")
    changelog_path = op.join(current_path, "help", "changelog")
    tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
    confrepl = {"language": "en"}
    changelogtmpl = op.join(current_path, "help", "changelog.tmpl")
    conftmpl = op.join(current_path, "help", "conf.tmpl")
    sphinxgen.gen(
        help_basepath,
        help_destpath,
        changelog_path,
        tixurl,
        confrepl,
        conftmpl,
        changelogtmpl,
    )
Ejemplo n.º 11
0
def build_one_help(language):
    print("Generating Help in {}".format(language))
    current_path = Path(".").absolute()
    changelog_path = current_path.joinpath("help", "changelog")
    tixurl = "https://github.com/arsenetar/dupeguru/issues/{}"
    changelogtmpl = current_path.joinpath("help", "changelog.tmpl")
    conftmpl = current_path.joinpath("help", "conf.tmpl")
    help_basepath = current_path.joinpath("help", language)
    help_destpath = current_path.joinpath("build", "help", language)
    confrepl = {"language": language}
    sphinxgen.gen(
        help_basepath,
        help_destpath,
        changelog_path,
        tixurl,
        confrepl,
        conftmpl,
        changelogtmpl,
    )
Ejemplo n.º 12
0
def build_help():
    print("Generating Help")
    current_platform = "osx" if ISOSX else "win"
    current_path = op.abspath(".")
    confpath = op.join(current_path, "help", "conf.tmpl")
    help_basepath = op.join(current_path, "help", "en")
    help_destpath = op.join(current_path, "build", "help")
    changelog_path = op.join(current_path, "help", "changelog")
    credits_path = op.join(current_path, "help", "credits.rst")
    credits_tmpl = op.join(help_basepath, "credits.tmpl")
    credits_out = op.join(help_basepath, "credits.rst")
    filereplace(credits_tmpl, credits_out, credits=open(credits_path, "rt", encoding="utf-8").read())
    image_src = op.join(current_path, "help", "image_{}".format(current_platform))
    image_dst = op.join(current_path, "help", "en", "image")
    if not op.exists(image_dst):
        try:
            os.symlink(image_src, image_dst)
        except (NotImplementedError, OSError):  # Windows crappy symlink support
            shutil.copytree(image_src, image_dst)
    tixurl = "https://github.com/hsoft/moneyguru/issues/{}"
    confrepl = {"platform": current_platform}
    sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, confpath)