# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # --- # Copyright (C) 2020 Shubham # # Script to parse index and generate a txt file containing all the keywords # and then generate QtHelp files using the keywords generated import os #index = open('./index.hhk', 'r') # QtHelp files qhp = open('./help.qhp', 'w') qhcp = open('./help.qhcp', 'w') ####################################### #code for generation of QtHelp files## ###################################### # populate qhp file with headers and table of contents qhp.writelines(""" org.kde.python.3.8.4 doc Python Documentation 3.8.4
\n """) ## write code for the keywords section # write the tail qhp.writelines(""" python-3.8.4-docs-html/* python-3.8.4-docs-html/_images/* python-3.8.4-docs-html/_sources/* python-3.8.4-docs-html/_static/* python-3.8.4-docs-html/c-api/* python-3.8.4-docs-html/distributing/* python-3.8.4-docs-html/distutils/* python-3.8.4-docs-html/extending/* python-3.8.4-docs-html/faq/* python-3.8.4-docs-html/howto/* python-3.8.4-docs-html/install/* python-3.8.4-docs-html/installing/* python-3.8.4-docs-html/library/* python-3.8.4-docs-html/reference/* python-3.8.4-docs-html/tutorial/* python-3.8.4-docs-html/using/* python-3.8.4-docs-html/whatsnew/*
""") # populate qhcp file qhcp.writelines(""" help.qhp help.qch help.qch """) ############################################################## #qhp, qhcp input files are generate, now generate output files ############################################################# stream = os.popen('qhelpgenerator help.qhcp -o help.qhc') #index.close() qhp.close() qhcp.close()