From 2c07aeebf1315328eeaf27d4faf45d1f922bc5a8 Mon Sep 17 00:00:00 2001 From: yorikvanhavre Date: Wed, 30 Nov 2011 19:22:17 +0000 Subject: [PATCH] + updated wiki 2 qhelp (and 2 pdf) scripts git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5202 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Tools/offlinedoc/buildqhelp.py | 17 ++++++++++++----- src/Tools/offlinedoc/downloadwiki.py | 15 +++++++++++---- src/Tools/wiki2qhelp.py | 3 ++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/Tools/offlinedoc/buildqhelp.py b/src/Tools/offlinedoc/buildqhelp.py index caf2de6b9..e9b8b9f90 100755 --- a/src/Tools/offlinedoc/buildqhelp.py +++ b/src/Tools/offlinedoc/buildqhelp.py @@ -30,7 +30,7 @@ __url__ = "http://free-cad.sf.net" This script builds qhrlp files from a local copy of the wiki """ -import sys, os, re, tempfile, getopt +import sys, os, re, tempfile, getopt, shutil from urllib2 import urlopen, HTTPError # CONFIGURATION ################################################# @@ -40,6 +40,7 @@ INDEX = "Online_Help_Toc" # the start page from where to crawl the wiki VERBOSE = True # to display what's going on. Otherwise, runs totally silent. QHELPCOMPILER = 'qhelpgenerator' QCOLLECTIOMGENERATOR = 'qcollectiongenerator' +RELEASE = '0.12' # END CONFIGURATION ############################################## @@ -65,6 +66,12 @@ def crawl(): print "Error at compiling" return 1 if VERBOSE: print "All done!" + i=raw_input("Copy the files to their correct location in the source tree? y/n (default=no) ") + if i.upper() in ["Y","YES"]: + shutil.copy("localwiki/freecad.qch","../../Doc/freecad.qch") + shutil.copy("localwiki/freecad.qhc","../../Doc/freecad.qhc") + else: + print 'Files are in localwiki. Test with "assistant -collectionFile localwiki/freecad.qhc"' return 0 def compile(qhpfile): @@ -77,7 +84,7 @@ def compile(qhpfile): def generate(qhcpfile): "generates qassistant-specific settings like icon, title, ..." txt=""" -
FreeCAD 0.11 help files
+
FreeCAD """+RELEASE+""" help files
http://free-cad.sf.net
""" about=open(FOLDER + os.sep + "about.txt","w") @@ -142,15 +149,15 @@ def buildtoc(): org.freecad.usermanual doc diff --git a/src/Tools/offlinedoc/downloadwiki.py b/src/Tools/offlinedoc/downloadwiki.py index b89d3b62e..f2034867e 100755 --- a/src/Tools/offlinedoc/downloadwiki.py +++ b/src/Tools/offlinedoc/downloadwiki.py @@ -49,7 +49,8 @@ LISTFILE = "wikifiles.txt" URL = DEFAULTURL wikiindex = "/index.php?title=" defaultfile = " " -css = """/* Basic CSS for offline wiki rendering */ +css = """ +/* Basic CSS for offline wiki rendering */ body { font-family: Arial,Helvetica,sans-serif; @@ -65,15 +66,15 @@ h1 { background: #46A4D0; color: white; padding: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; + border-radius: 5px; } pre { - border: 1px dashed #333333; + border: 1px solid #888888; text-align: left; background: #EEEEEE; padding: 5px; + border-radius: 5px; } a:link, a:visited { @@ -100,6 +101,12 @@ a:hover { display: none; } +.ct, .ctTitle, .ctOdd, .ctEven th { + text-align: left; + width: 200px; + float: right; + background: #eeeeee; + } """ def crawl(): diff --git a/src/Tools/wiki2qhelp.py b/src/Tools/wiki2qhelp.py index 770e842c0..9df24d341 100755 --- a/src/Tools/wiki2qhelp.py +++ b/src/Tools/wiki2qhelp.py @@ -617,5 +617,6 @@ def main(arg): crawl() if __name__ == "__main__": - main(sys.argv[1:]) + # main(sys.argv[1:]) + print "Warning! This script is obsolete. Use the scripts in the offlinedocs folder..."