Tools: Updated wiki download scripts

This commit is contained in:
Yorik van Havre
2019-03-06 17:11:00 -03:00
parent 8a84875e07
commit 8f58abfd49
3 changed files with 30 additions and 4 deletions

View File

@@ -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 ##############################################

View File

@@ -22,6 +22,8 @@
#* *
#***************************************************************************
from __future__ import print_function
__title__="buildwikiindex.py"
__author__ = "Yorik van Havre <yorik@uncreated.net>"
__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:

View File

@@ -22,6 +22,8 @@
#* *
#***************************************************************************
from __future__ import print_function
__title__="downloadwiki"
__author__ = "Yorik van Havre <yorik@uncreated.net>"
__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 ##############################################