def write_PDF(DIL, SRC, VERSION, TMP): TMP = TMP / "pdf" TMP.exists or TMP.mkdir() pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) html_files = SRC.glob("*.html") html_files = filter(lambda path: path.name != "index.html", html_files) # Get the logo if present. logo_png = Path("logo_tango.png") if logo_png.exists: logo_png.copy(TMP) logo = "<br/>" * 2 + "<img src='%s'/>" % logo_png.name #logo_svg = open(logo_svg).read() #logo_svg = "<br/>"*2 + logo_svg[logo_svg.index("\n"):] else: logo = '' symlink = "http://dil.googlecode.com/svn/doc/Tango_%s" % VERSION params = { "pdf_title": "Tango %s API" % VERSION, "cover_title": "Tango %s<br/><b>API</b>%s" % (VERSION, logo), "author": "Tango Team", "subject": "Programming API", "keywords": "Tango standard library API documentation", "x_html": "HTML", "nested_toc": True, "symlink": symlink } pdf_gen.run(html_files, SRC / ("Tango.%s.API.pdf" % VERSION), TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): TMP = TMP/"pdf" TMP.mkdir() pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) # Get a list of the HTML files. html_files = SRC.glob("*.html") html_files = filter(lambda path: path.name != "index.html", html_files) # Get the logo if present. logo_file = Path("logo_tango.png") logo = '' if logo_file.exists: logo_file.copy(TMP) logo = "<br/><br/><img src='%s'/>" % logo_file.name # Go to this URL when a D symbol is clicked. #sym_url = "http://dl.dropbox.com/u/17101773/doc/tango.%s/{0}" % VERSION sym_url = "http://www.dsource.org/projects/tango/docs/%s/{0}" % VERSION params = { "pdf_title": "Tango %s API" % VERSION, "cover_title": "Tango %s<br/><b>API</b>%s" % (VERSION, logo), "author": "Tango Team", "subject": "Programming API", "keywords": "Tango standard library API documentation", "x_html": "HTML", "nested_toc": True, "sym_url": sym_url } pdf_file = SRC/("Tango.%s.API.pdf" % VERSION) pdf_gen.run(html_files, pdf_file, TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): TMP = TMP/"pdf" TMP.exists or TMP.mkdir() pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) html_files = SRC.glob("*.html") html_files = filter(lambda path: path.name != "index.html", html_files) # Get the logo if present. logo_png = Path("logo_tango.png") if logo_png.exists: logo_png.copy(TMP) logo = "<br/>"*2 + "<img src='%s'/>" % logo_png.name #logo_svg = open(logo_svg).read() #logo_svg = "<br/>"*2 + logo_svg[logo_svg.index("\n"):] else: logo = '' symlink = "http://dil.googlecode.com/svn/doc/Tango_%s" % VERSION params = { "pdf_title": "Tango %s API" % VERSION, "cover_title": "Tango %s<br/><b>API</b>%s" % (VERSION, logo), "author": "Tango Team", "subject": "Programming API", "keywords": "Tango standard library API documentation", "x_html": "HTML", "nested_toc": True, "symlink": symlink } pdf_gen.run(html_files, SRC/("Tango.%s.API.pdf"%VERSION), TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): TMP = (TMP / "pdf").mkdir() pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) # Get a list of the HTML files. html_files = SRC.glob("*.html") html_files = filter(lambda path: path.name != "index.html", html_files) # Get the logo if present. logo_file = Path("logo_tango.png") logo = '' if logo_file.exists: logo_file.copy(TMP) logo = "<br/><br/><img src='%s'/>" % logo_file.name # Go to this URL when a D symbol is clicked. #sym_url = "http://dl.dropbox.com/u/17101773/doc/tango.%s/{0}" % VERSION sym_url = "http://www.dsource.org/projects/tango/docs/%s/{0}" % VERSION params = { "pdf_title": "Tango %s API" % VERSION, "cover_title": "Tango %s<br/><b>API</b>%s" % (VERSION, logo), "author": "Tango Team", "subject": "Programming API", "keywords": "Tango standard library API documentation", "x_html": "HTML", "nested_toc": True, "sym_url": sym_url } pdf_file = SRC / ("Tango.%s.API.pdf" % VERSION) pdf_gen.run(html_files, pdf_file, TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) html_files = SRC.glob("*.html") sym_url = "http://dl.dropbox.com/u/17101773/doc/dil/{0}" # % VERSION params = { "pdf_title": "DIL %s API" % VERSION, "cover_title": "DIL %s<br/><b>API</b>" % VERSION, "author": "Aziz Köksal", "subject": "Compiler API", "keywords": "DIL D compiler API documentation", "x_html": "XHTML", "nested_toc": True, "sym_url": sym_url } dest = SRC / ("dil.%s.API.pdf" % VERSION) pdf_gen.run(html_files, dest, TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) html_files = SRC.glob("*.html") sym_url = "http://dl.dropbox.com/u/17101773/doc/dil/{0}" # % VERSION params = { "pdf_title": "DIL %s API" % VERSION, "cover_title": "DIL %s<br/><b>API</b>" % VERSION, "author": "Aziz Köksal", "subject": "Compiler API", "keywords": "DIL D compiler API documentation", "x_html": "XHTML", "nested_toc": True, "sym_url": sym_url } dest = SRC/("dil.%s.API.pdf" % VERSION) pdf_gen.run(html_files, dest, TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) for gif in SRC//("erf.gif", "erfc.gif"): gif.copy(TMP) html_files = SRC.glob("*.html") ignore_list = ("phobos.html", "std.c.windows.windows.html") html_files = [f for f in html_files if not any(map(f.endswith, iter(ignore_list)))] symbol_link = "http://dil.googlecode.com/svn/doc/Phobos_%s" % VERSION params = {"pdf_title": "Phobos %s API" % VERSION, "cover_title": "Phobos %s<br/><b>API</b>" % VERSION, "author": "Walter Bright", "subject": "Programming API", "keywords": "Phobos D Standard Library", "nested_toc": True, "symlink": symbol_link} pdf_gen.run(html_files, SRC/("Phobos.%s.API.pdf"%VERSION), TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): # TODO: some links should be rewritten: # E.g.: .) "dil.lexer.Funcs.html#CProperty.Whitespace" -> # "m-dil.lexer.Funcs:CProperty.Whitespace" # .) "dil.lexer.Identifier" -> "m-dil.lexer.Identifier" pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) html_files = SRC.glob("*.html") symlink = "http://dil.googlecode.com/svn/doc/dil_%s" % VERSION params = {"pdf_title": "dil %s API" % VERSION, "cover_title": "dil %s<br/><b>API</b>" % VERSION, "author": u"Aziz Köksal", "subject": "Compiler API", "keywords": "dil D compiler API documentation", "x_html": "XHTML", "nested_toc": True, "symlink": symlink} pdf_gen.run(html_files, SRC/("dil.%s.API.pdf"%VERSION), TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) (SRC / ("erf.gif", "erfc.gif")).copy(TMP) html_files = SRC.glob("*.html") ignore_list = ("phobos.html", "std.c.windows.windows.html", "index.html") html_files = filter(lambda f: f.name not in ignore_list, html_files) sym_url = "http://dl.dropbox.com/u/17101773/doc/phobos.%s/{0}" % VERSION params = { "pdf_title": "Phobos %s API" % VERSION, "cover_title": "Phobos %s<br/><b>API</b>" % VERSION, "author": "Walter Bright", "subject": "Programming API", "keywords": "Phobos D Standard Library", "nested_toc": True, "sym_url": sym_url # TODO: #"first_toc": "", #"before_files": [] } dest = SRC / ("Phobos.%s.API.pdf" % VERSION) pdf_gen.run(html_files, dest, TMP, params)
def write_PDF(DIL, SRC, VERSION, TMP): pdf_gen = PDFGenerator() pdf_gen.fetch_files(DIL, TMP) for gif in SRC//("erf.gif", "erfc.gif"): gif.copy(TMP) html_files = SRC.glob("*.html") ignore_list = ("phobos.html", "std.c.windows.windows.html", "index.html") html_files = filter(lambda f: f.name not in ignore_list, html_files) sym_url = "http://dl.dropbox.com/u/17101773/doc/phobos.%s/{0}" % VERSION params = { "pdf_title": "Phobos %s API" % VERSION, "cover_title": "Phobos %s<br/><b>API</b>" % VERSION, "author": "Walter Bright", "subject": "Programming API", "keywords": "Phobos D Standard Library", "nested_toc": True, "sym_url": sym_url # TODO: #"first_toc": "", #"before_files": [] } dest = SRC/("Phobos.%s.API.pdf"%VERSION) pdf_gen.run(html_files, dest, TMP, params)