https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&feed=atom&action=history
CMake:CreateQtAssistantDocs - Revision history
2024-03-29T06:53:41Z
Revision history for this page on the wiki
MediaWiki 1.38.6
https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=62712&oldid=prev
Kwrobot: Replace content with link to new CMake community wiki
2018-04-30T15:40:54Z
<p>Replace content with link to new CMake community wiki</p>
<a href="https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=62712&oldid=62403">Show changes</a>
Kwrobot
https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=62403&oldid=prev
Brad.king at 12:26, 24 April 2018
2018-04-24T12:26:23Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:26, 24 April 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l338">Line 338:</td>
<td colspan="2" class="diff-lineno">Line 338:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* What would be <b>really</b> nice would be to include the nice web design/look/feel from the cmake web site.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* What would be <b>really</b> nice would be to include the nice web design/look/feel from the cmake web site.</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{CMake/Template/Footer}}</ins></div></td></tr>
</table>
Brad.king
https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=14069&oldid=prev
Imikejackson@gmail.com at 15:49, 12 November 2008
2008-11-12T15:49:39Z
<p></p>
<a href="https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=14069&oldid=12879">Show changes</a>
Imikejackson@gmail.com
https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=12879&oldid=prev
Imikejackson@gmail.com at 14:47, 19 August 2008
2008-08-19T14:47:57Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:47, 19 August 2008</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l172">Line 172:</td>
<td colspan="2" class="diff-lineno">Line 172:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* What would be <b>really</b> nice would be to include the nice web design/look/feel from the cmake web site.</ins></div></td></tr>
</table>
Imikejackson@gmail.com
https://public.kitware.com/Wiki/index.php?title=CMake:CreateQtAssistantDocs&diff=12878&oldid=prev
Imikejackson@gmail.com: Bash Shell script to generate a Qt Assistant based set of documentation
2008-08-19T14:46:44Z
<p>Bash Shell script to generate a Qt Assistant based set of documentation</p>
<p><b>New page</b></p><div>In an effort to more easily search the CMake documentation I hacked together a shell script (Sorry windows users, although it _may_ work in MSys) that generates Qt Assistant Documentation that is searchable and indexed. Here is the shell script.<br />
<br />
<pre><br />
#!/bin/bash<br />
# This is a shell script to generate a QtAssistant set of docs from the CMake distribution.<br />
#<br />
# Couple of things to get you started with this file:function file<br />
# 1. Set the CMAKE variable to the cmake executable for the CMAKE cvs if it is not<br />
# the default on your system<br />
# 2. I change the definition of CMAKE to 'cmake' when I generate the "module" list because<br />
# the current CMake cvs seg faults when I use the cmake --help-module-list command<br />
# 3. All the files are generated in the /tmp directory. If you want them somewhere else <br />
# set the 'generationDir' variable<br />
# 4. Launch QtAssistant with the -profile argument, for example on OS X I use<br />
# ./assistant.app/Contents/MacOS/assistant -profile /private/tmp/cmake_assistant_docs/CMakeDocs.adp <br />
# where my pwd is: ${QTDIR}/bin or<br />
# /Users/Shared/Toolkits/Qt-4.3.5-UBLib/bin<br />
# Change the 'qtassistant' variable to point to your QtAssistant executable<br />
<br />
export QTDIR="/Users/Shared/OpenSource/Qt-4.3.5-UBDylib"<br />
qtassistant="${QTDIR}/bin/assistant.app/Contents/MacOS/assistant"<br />
CMAKE="/Users/Shared/OpenSource/cmake-2.6.0/bin/cmake"<br />
<br />
generationDir="/tmp"<br />
assistantDir="${generationDir}/cmake_assistant_docs"<br />
# remove any previous builds of the docs<br />
rm -rf ${assistantDir}<br />
mkdir ${assistantDir}<br />
<br />
adpFile=${assistantDir}/CMakeDocs.adp<br />
tmpHTMLFile="${generationDir}${generationDir}.html"<br />
<br />
#----------------------------------------------------------------<br />
# Start the main index.html file that lists the major doc groups, Commands, Modules, Variables<br />
#----------------------------------------------------------------<br />
mainIndexFileName="index.html"<br />
mainIndexFile=${assistantDir}/${mainIndexFileName}<br />
echo "" > ${mainIndexFile} <br />
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" >> ${mainIndexFile}<br />
echo "\"http://www.w3.org/TR/html4/loose.dtd\">" >> ${mainIndexFile}<br />
echo "<html><head>" >> ${mainIndexFile}<br />
echo "<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> " >> ${mainIndexFile}<br />
echo "<title>CMake Documentation</title>" >> ${mainIndexFile}<br />
echo "</head>" >> ${mainIndexFile}<br />
echo "<body>" >> ${mainIndexFile}<br />
<br />
#----------------------------------------------------------------<br />
# Start the Qt adp file<br />
#----------------------------------------------------------------<br />
echo "" > ${adpFile}<br />
echo "<assistantconfig version=\"3.2.0\">" > ${adpFile}<br />
echo "<profile>" >> ${adpFile}<br />
echo " <property name=\"name\">CMake Documentation</property>" >> ${adpFile}<br />
echo " <property name=\"title\">CMake Docs</property>" >> ${adpFile}<br />
#echo " <property name=\"applicationicon\"></property>" >> ${adpFile}<br />
echo " <property name=\"startpage\">index.html</property>" >> ${adpFile}<br />
echo " <property name=\"aboutmenutext\">About CMake Docs Viewer</property>" >> ${adpFile}<br />
#echo " <property name=\"abouturl\">about.txt</property>" >> ${adpFile}<br />
#echo " <property name=\"cmake_docs\">.</property>" >> ${adpFile}<br />
echo " </profile>" >> ${adpFile}<br />
echo "" >> ${adpFile}<br />
echo " <DCF ref=\"${mainIndexFileName}\" icon=\"\" imagedir=\"\" title=\"CMake Docs Handbook\">" >> ${adpFile}<br />
<br />
<br />
<br />
#################################################################<br />
# Function GenerateDocsForCommand This function will create all the<br />
# individual html files, an index file and the proper section of the .adp file<br />
# $1 The type of docs we are going to generate 'command' 'module' 'variable'<br />
function GenerateDocsForCommand()<br />
{<br />
docDirName="cmake_${1}_docs"<br />
docDir="${assistantDir}/${docDirName}"<br />
mkdir ${docDir}<br />
listFile="${generationDir}/list.txt"<br />
${CMAKE} --help-${1}-list ${listFile}<br />
echo "* Generating HTML files for command '${1}'"<br />
#----------------------------------------------------------------<br />
# Start the Index File for this group of docs<br />
#----------------------------------------------------------------<br />
indexFile=${docDir}/cmake_${1}_index.html<br />
echo "" > ${indexFile} <br />
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" >> ${indexFile}<br />
echo "\"http://www.w3.org/TR/html4/loose.dtd\">" >> ${indexFile}<br />
echo "<html><head>" >> ${indexFile}<br />
echo "<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> " >> ${indexFile}<br />
echo "<title>CMake ${1} Index</title>" >> ${indexFile}<br />
echo "</head>" >> ${indexFile}<br />
echo "<body>" >> ${indexFile}<br />
echo "<p><a href=\"../index.html\">All CMake Documentation</a></p>" >> ${indexFile}<br />
<br />
#----------------------------------------------------------------<br />
# Create a section in the .adp file<br />
#---------------------------------------------------------------- <br />
echo " <section ref=\"${indexFile}\" title=\"CMake ${1}s\">" >> ${adpFile}<br />
<br />
#----------------------------------------------------------------<br />
# Create a section in the top level index file<br />
#----------------------------------------------------------------<br />
echo "<p><a href=\"./${docDirName}/cmake_${1}_index.html\">CMake ${1}s</a></p>" >> ${mainIndexFile}<br />
<br />
#----------------------------------------------------------------<br />
# Generate all the individual documentation html files<br />
#----------------------------------------------------------------<br />
i=0<br />
exec 9<${listFile}<br />
while read -u 9 line<br />
do<br />
if [[ ${i} -gt 0 ]]; then<br />
echo ${i}": ${line}"<br />
# Seems that CMake only puts out the body portion of the html<br />
${CMAKE} --help-${1} "${line}" ${tmpHTMLFile}<br />
sub=`echo ${line} | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'`<br />
htmlFile=`echo ${line} | tr '[' '-' | tr ']' '-' | tr '>' '-' | tr '<' '-' | tr ' ' '_'`<br />
htmlFile=${docDir}/${htmlFile}.html<br />
# Clear the file in case it is left over from previous run<br />
echo "" > ${htmlFile} <br />
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" >> ${htmlFile}<br />
echo "\"http://www.w3.org/TR/html4/loose.dtd\">" >> ${htmlFile}<br />
echo "<html><head>" >> ${htmlFile}<br />
echo "<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> " >> ${htmlFile}<br />
echo "<title>CMake ${1} ${line}</title>" >> ${htmlFile}<br />
echo "</head>" >> ${htmlFile}<br />
echo "<body>" >> ${htmlFile}<br />
echo "<p><a href=\"./cmake_${1}_index.html\">All CMake ${1}s</a></p>" >> ${htmlFile}<br />
cat ${tmpHTMLFile} >> ${htmlFile}<br />
echo "</body></html>" >> ${htmlFile}<br />
<br />
# Add a line to the index file<br />
echo "<p><a href=\"${line}.html\">${line}</a></p>" >> ${indexFile}<br />
<br />
# Add the keyword and section for this piece of documentation to the .adp file<br />
echo " <keyword ref=\"${htmlFile}\">${sub}</keyword>" >> ${adpFile}<br />
echo " <section ref=\"${htmlFile}\" title=\"${sub}\"/>" >> ${adpFile}<br />
<br />
fi<br />
let i=i+1<br />
done<br />
exec 9<&-<br />
<br />
# finish the html code in the index file<br />
echo "</body></html>" >> ${indexFile}<br />
<br />
# Finish the section in the .adp file<br />
echo " </section>" >> ${adpFile}<br />
}<br />
#################################################################<br />
<br />
GenerateDocsForCommand "command"<br />
GenerateDocsForCommand "module"<br />
GenerateDocsForCommand "variable"<br />
<br />
<br />
#----------------------------------------------------------------<br />
# Finish the top level index File<br />
#----------------------------------------------------------------<br />
echo "</body></html>" >> ${mainIndexFile}<br />
<br />
#----------------------------------------------------------------<br />
# Finish the .adp File<br />
#----------------------------------------------------------------<br />
echo " </DCF>" >> ${adpFile}<br />
echo "</assistantconfig>" >> ${adpFile}<br />
<br />
<br />
#----------------------------------------------------------------<br />
# Launch QtAssistant with the proper arguments<br />
# echo "${qtassistant} -profile ${adpFile}"<br />
${qtassistant} -profile ${adpFile} &<br />
<br />
<br />
<br />
</pre></div>
Imikejackson@gmail.com