diff --git a/src/Tools/offlinedoc/buildqhelp.py b/src/Tools/offlinedoc/buildqhelp.py index e09a7190d2..ba4ed56000 100755 --- a/src/Tools/offlinedoc/buildqhelp.py +++ b/src/Tools/offlinedoc/buildqhelp.py @@ -40,7 +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.17' +RELEASE = '0.18' # END CONFIGURATION ############################################## diff --git a/src/Tools/offlinedoc/buildwikiindex.py b/src/Tools/offlinedoc/buildwikiindex.py index a3ea893055..44b755dc89 100755 --- a/src/Tools/offlinedoc/buildwikiindex.py +++ b/src/Tools/offlinedoc/buildwikiindex.py @@ -22,6 +22,8 @@ #* * #*************************************************************************** +from __future__ import print_function + __title__="buildwikiindex.py" __author__ = "Yorik van Havre " __url__ = "http://www.freecadweb.org" @@ -38,7 +40,17 @@ from urllib2 import urlopen, HTTPError URL = "https://www.freecadweb.org/wiki" #default URL if no URL is passed INDEX = "Online_Help_Toc" # the start page from where to crawl the wiki -NORETRIEVE = ['Manual','Developer_hub','Power_users_hub','Users_hub','Source_documentation', 'User_hub','Main_Page','About_this_site','Interesting_links','Syndication_feeds','FreeCAD:General_disclaimer','FreeCAD:About','FreeCAD:Privacy_policy','WikiPages'] # pages that won't be fetched (kept online) +NORETRIEVE = ['Manual','Developer_hub','Power_users_hub','Users_hub','Source_documentation', + 'User_hub','Main_Page','About_this_site','Interesting_links','Syndication_feeds', + 'FreeCAD:General_disclaimer','FreeCAD:About','FreeCAD:Privacy_policy','WikiPages'] # pages that won't be fetched (kept online) +NORETRIEVE += ['Constraint_Concentric','Constraint_EqualLength','Constraint_ExternalAngle', + 'Constraint_Horizontal','Constraint_HorizontalDistance','Constraint_Internal_Alignment', + 'Constraint_InternalAngle','Constraint_Length','Constraint_Lock','Constraint_Parallel', + 'Constraint_Perpendicular','Constraint_PointOnEnd','Constraint_PointOnMidPoint', + 'Constraint_PointOnObject','Constraint_PointOnPoint','Constraint_PointOnStart', + 'Constraint_PointToObject','Constraint_Radius','Constraint_SnellsLaw', + 'Constraint_Symmetric','Constraint_Tangent','Constraint_TangentToEnd', + 'Constraint_TangentToStart','Constraint_Vertical'] # pages that have been renamed but still dangle around... GETTRANSLATIONS = False # Set true if you want to get the translations too. MAXFAIL = 3 # max number of retries if download fails VERBOSE = True # to display what's going on. Otherwise, runs totally silent. @@ -140,6 +152,8 @@ def getlinks(html): rg = re.findall('href="\/wiki\/(.*?)"',l) if "images" in rg: rg = None + if "mediawiki" in rg: + rg = None if rg: rg = rg[0] if not "Command_Reference" in rg: diff --git a/src/Tools/offlinedoc/downloadwiki.py b/src/Tools/offlinedoc/downloadwiki.py index 95fc813f19..7a63870eb3 100755 --- a/src/Tools/offlinedoc/downloadwiki.py +++ b/src/Tools/offlinedoc/downloadwiki.py @@ -22,6 +22,8 @@ #* * #*************************************************************************** +from __future__ import print_function + __title__="downloadwiki" __author__ = "Yorik van Havre " __url__ = "http://www.freecadweb.org" @@ -37,10 +39,20 @@ from urllib2 import urlopen, HTTPError DEFAULTURL = "https://www.freecadweb.org" #default URL if no URL is passed INDEX = "Online_Help_Toc" # the start page from where to crawl the wiki -NORETRIEVE = ['Manual','Developer_hub','Power_users_hub','Users_hub','Source_documentation', 'User_hub','Main_Page','About_this_site','FreeCAD:General_disclaimer','FreeCAD:About','FreeCAD:Privacy_policy','Introduction_to_python'] # pages that won't be fetched (kept online) -GETTRANSLATIONS = False # Set true if you want to get the translations too. +NORETRIEVE = ['Manual','Developer_hub','Power_users_hub','Users_hub','Source_documentation', + 'User_hub','Main_Page','About_this_site','Interesting_links','Syndication_feeds', + 'FreeCAD:General_disclaimer','FreeCAD:About','FreeCAD:Privacy_policy','WikiPages'] # pages that won't be fetched (kept online) +NORETRIEVE += ['Constraint_Concentric','Constraint_EqualLength','Constraint_ExternalAngle', + 'Constraint_Horizontal','Constraint_HorizontalDistance','Constraint_Internal_Alignment', + 'Constraint_InternalAngle','Constraint_Length','Constraint_Lock','Constraint_Parallel', + 'Constraint_Perpendicular','Constraint_PointOnEnd','Constraint_PointOnMidPoint', + 'Constraint_PointOnObject','Constraint_PointOnPoint','Constraint_PointOnStart', + 'Constraint_PointToObject','Constraint_Radius','Constraint_SnellsLaw', + 'Constraint_Symmetric','Constraint_Tangent','Constraint_TangentToEnd', + 'Constraint_TangentToStart','Constraint_Vertical'] # pages that have been renamed but still dangle around...GETTRANSLATIONS = False # Set true if you want to get the translations too. MAXFAIL = 3 # max number of retries if download fails VERBOSE = True # to display what's going on. Otherwise, runs totally silent. +GETTRANSLATIONS = False # Set true if you want to get the translations too. # END CONFIGURATION ##############################################