-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the documentation generation. Add a "presentations" page.
- Loading branch information
Showing
10 changed files
with
251 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
documentation/content/pages/presentations/Presentations.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. -*- mode: rst; explicit-buffer-name: "RDS.rst<pelican>" -*- | ||
.. include:: ../../../etc/definitions.rst | ||
|
||
|
||
:Date: 25, january 2025 | ||
:Authors: Jean-Paul Chaput | ||
:Contact: <[email protected]> | ||
:Version: 0.1 | ||
|
||
|
||
|medskip| | ||
|
||
|
||
============= | ||
Presentations | ||
============= | ||
|
||
|pagestylefancy| | ||
|
||
|
||
.. contents:: | ||
|
||
|newpage| | ||
|
||
|
||
.. include:: PresentationsPage.rst |
17 changes: 17 additions & 0 deletions
17
documentation/content/pages/presentations/PresentationsPage.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. -*- Mode: rst -*- | ||
|newpage| | ||
|
||
|
||
SAL Bootcamp, 2022 | ||
================== | ||
|
||
Presentation made at SAL Bootcamp (Graz). It still reflects the state of | ||
the analog and mixed signal design flow in Coriolis to this day | ||
(January 25, 2025). The mixed flow is at a demonstrator stage. | ||
|
||
`SAL.Bootcamp.pdf <{static}/pdfs/SAL.Bootcamp.pdf>`_ | ||
|
||
|
25 changes: 25 additions & 0 deletions
25
documentation/content/pages/presentations/Presentations_HTML.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. -*- mode: rst; explicit-buffer-name: "Presentations_HTML.rst<pelican>" -*- | ||
============= | ||
Presentations | ||
============= | ||
|
||
|
||
:slug: presentations | ||
:date: 2025-01-25 16:00 | ||
:Authors: Jean-Paul Chaput | ||
:Contact: <[email protected]> | ||
:Version: 0.1 | ||
:status: hidden | ||
|
||
|
||
.. include:: ../../../etc/definitions.rst | ||
|
||
|
||
.. contents:: | ||
:depth: 2 | ||
|
||
|
||
.. include:: PresentationsPage.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,106 @@ | ||
#!/bin/bash | ||
|
||
document=`basename -s .rst $1` | ||
current_source_dir=$2 | ||
stylesheet=$3 | ||
rst2latex=$4 | ||
pdflatex=$5 | ||
echo "Generating: ${document}.pdf from $current_source_dir with stylesheet $stylesheet" | ||
|
||
$rst2latex --use-latex-toc --stylesheet=$stylesheet ${document}.rst ${document}-raw.tex | ||
sed "s%\(include.*\){\(\..*\)}%\1{$current_source_dir/\2}%" \ | ||
's, \\& \\\\multicolumn{2}{l|}{, \\& \\\\multicolumn{2}{p{0.6\\\\DUtablewidth}|}{,' \ | ||
${document}-raw.tex > ${document}.tex | ||
$pdflatex ${document} | ||
|
||
rm -f ${document}.rst \ | ||
${document}-raw.tex \ | ||
${document}.tex \ | ||
printHelp () { | ||
echo "" | ||
echo " Usage: doPdf.sh [--buildDir=<buildDir>]" | ||
echo " [--sourceDir=<sourceDir>]" | ||
echo " [--stylesheet=<stylesheet>]" | ||
echo " [--rst2latex=<rst2latex_bin>]" | ||
echo " [--pdflatex=<pdflatex_bin>]" | ||
echo " <document>" | ||
echo "" | ||
echo " Mandatory argument:" | ||
echo " <document> : There must be one, and exactly one reStructuredText document to" | ||
echo " be processed. With the \".rst\" extension." | ||
echo "" | ||
echo " Options:" | ||
echo " [--buildDir=] : The directory where the pdfs will be created." | ||
echo " Default: the current working directory." | ||
echo " [--sourceDir=] : The top directory where the documentation source is located." | ||
echo " Default: the current working directory." | ||
echo " [--stylesheet=] : The LaTeX style to be used." | ||
echo " Default: no style at all." | ||
echo " [--rst2latex=] : The absolute path to the rst2latex binary." | ||
echo " Default: rst2latex (let the OS find out)." | ||
echo " [--pdflatex=] : The absolute path to the pdflatex binary." | ||
echo " Default: pdflatex (let the OS find out)." | ||
echo "" | ||
|
||
} | ||
|
||
if [ $# -eq 0 ]; then printHelp; exit 0; fi | ||
|
||
|
||
getString () | ||
{ | ||
string=`echo $1 | cut -d '=' -f 2-` | ||
echo $string | ||
} | ||
|
||
|
||
document="" | ||
buildDir="`pwd`" | ||
sourceDir="`pwd`" | ||
stylesheet="None" | ||
rst2latex="rst2latex" | ||
pdflatex="pdflatex" | ||
badAgument="" | ||
while [ $# -gt 0 ]; do | ||
case $1 in | ||
--buildDir=*) buildDir=`getString $1`;; | ||
--sourceDir=*) sourceDir=`getString $1`;; | ||
--stylesheet=*) stylesheet=`getString $1`;; | ||
--rst2latex=*) rst2latex=`getString $1`;; | ||
--pdflatex=*) pdflatex=`getString $1`;; | ||
-*) badArgument="$1";; | ||
*) if [ ! -z "${document}" ]; then | ||
printHelp | ||
echo "[ERROR] doPdf.sh: You must supply only one document." | ||
echo " (\"${document}\" and \"$1\")." | ||
exit 1 | ||
fi | ||
sourceDocumentDir=`dirname $1` | ||
document=`basename -s .rst $1`;; | ||
esac | ||
if [ ! -z "${badArgument}" ]; then | ||
echo "[ERROR] doPdf.sh: Unknown argument \"${badArgument}\"." | ||
printHelp | ||
exit 1 | ||
fi | ||
shift | ||
done | ||
if [ -z "${document}" ]; then | ||
printHelp | ||
exit 0 | ||
fi | ||
|
||
echo "doPdf.sh:" | ||
echo " sourceDir: ${sourceDir}" | ||
echo " sourceDocumentDir: ${sourceDocumentDir}" | ||
echo " document: ${document}" | ||
echo " stylesheet: ${stylesheet}" | ||
echo " buildDir: ${buildDir}" | ||
echo " rst2latex: ${rst2latex}" | ||
echo " pdflatex: ${pdflatex}" | ||
|
||
export TEXINPUTS="${sourceDir}/${sourceDocumentDir}:${sourceDir}//:${TEXINPUTS}" | ||
echo "TEXINPUTS=${TEXINPUTS}" | ||
cd ${sourceDir}/${sourceDocumentDir} | ||
${rst2latex} --use-latex-toc \ | ||
--stylesheet=${stylesheet} \ | ||
${document}.rst \ | ||
${buildDir}/${document}.tex | ||
cd ${buildDir} | ||
sed -i 's,\(include.*\){\(\.\./\)*\(.*\)},\1{\3},' ${document}.tex | ||
sed -i 's,\(include.*\){\(\./images\)\+\(.*\)},\1{images\3},' ${document}.tex | ||
sed -i 's, \\& \\\\multicolumn{2}{l|}{, \\& \\\\multicolumn{2}{p{0.6\\\\DUtablewidth}|}{,' \ | ||
${document}.tex | ||
${pdflatex} ${document} | ||
${pdflatex} ${document} | ||
|
||
rm -f ${document}.tex \ | ||
${document}.log \ | ||
${document}.out \ | ||
${document}.aux \ | ||
${document}.toc | ||
${document}.toc \ | ||
texput.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
pdfcontent = files( | ||
pdfcontent = [ | ||
'content/pages/users-guide/UsersGuide.rst', | ||
'content/pages/python-tutorial/PythonTutorial.rst', | ||
'content/pages/python-cpp/PythonCpp.rst', | ||
'content/pages/design-flow/DesignFlow.rst', | ||
'content/pages/stratus/Stratus.rst', | ||
'content/pages/check-toolkit/CheckToolkit.rst', | ||
'content/pages/rds/RDS.rst', | ||
) | ||
] | ||
|
||
|
||
rstcontent = files( | ||
|
@@ -35,6 +35,8 @@ rstcontent = files( | |
'content/pages/python-tutorial/RealDesigns.rst', | ||
'content/pages/python-tutorial/ToolEngines.rst', | ||
'content/pages/rds/RDS_HTML.rst', | ||
'content/pages/presentations/PresentationsPage.rst', | ||
'content/pages/presentations/Presentations_HTML.rst', | ||
'content/pages/rds/RDSpage.rst', | ||
'content/pages/stratus/Developper.rst', | ||
'content/pages/stratus/DpGen.rst', | ||
|
@@ -91,57 +93,70 @@ plugins = files( | |
|
||
dopdf = find_program('etc/doPdf.sh') | ||
|
||
pdf_gen = generator( | ||
dopdf, | ||
output: '@[email protected]', | ||
arguments: ['@INPUT@', '@CURRENT_SOURCE_DIR@', rst2latex.full_path(), pdflatex.full_path()], | ||
) | ||
|
||
pdfs_list = pdf_gen.process(pdfcontent) | ||
pdfs_dep = declare_dependency(sources: pdfs_list) | ||
pdf_documents = [] | ||
foreach document : pdfcontent | ||
basename = document.split( '/' )[ -1 ].replace( '.rst', '' ) | ||
pdf_documents += custom_target( basename + '_pdf' | ||
, command: [ dopdf | ||
, '--buildDir=@0@'.format( meson.current_build_dir() ) | ||
, '--sourceDir=@0@'.format( meson.current_source_dir() ) | ||
, '--stylesheet=etc/SoC-ReST.tex' | ||
, '--rst2latex=@0@'.format( rst2latex.full_path() ) | ||
, '--pdflatex=@0@'.format( pdflatex.full_path() ) | ||
, document ] | ||
, input: document | ||
, output: basename + '.pdf' | ||
, install: true | ||
, install_dir: pdfdir | ||
) | ||
endforeach | ||
|
||
pdfs = build_target('pelican-pdfs', target_type: 'library', dependencies: pdfs_dep) | ||
|
||
cdata = configuration_data() | ||
cdata.set('SOURCEDIR', meson.current_source_dir()) | ||
cdata.set('SOURCEDIR' , meson.current_source_dir()) | ||
cdata.set('OUTPUT_PATH', meson.current_build_dir()) | ||
cdata.set('SITEURL', docsiteurl ) | ||
pelicanconf = configure_file( | ||
input: 'pelicanconf.py.in', | ||
output: 'pelicanconf.py', | ||
configuration: cdata, | ||
install: false | ||
) | ||
cdata.set('SITEURL' , docsiteurl ) | ||
pelicanconf = configure_file( input: 'pelicanconf.py.in' | ||
, output: 'pelicanconf.py' | ||
, configuration: cdata | ||
, install: false | ||
) | ||
|
||
htmldoc = custom_target( 'htmldoc' | ||
, output: [ 'archives.html' | ||
, 'authors.html' | ||
, 'categories.html' | ||
, 'images' | ||
, 'index.html' | ||
, 'pages' | ||
, 'pdfs' | ||
, 'tags.html' | ||
, 'theme' | ||
] | ||
, depend_files: [ rstcontent, css, plugins, pelicanconf ] | ||
, depends: [ pdf_documents ] | ||
, command: [ pelican | ||
, '-vD' | ||
, '--ignore-cache' | ||
, '-s' | ||
, pelicanconf | ||
, meson.current_source_dir()/'content' | ||
] | ||
, install: true | ||
, install_dir: htmldir | ||
) | ||
|
||
htmldoc = custom_target( | ||
'htmldoc', | ||
output: [ | ||
'archives.html', | ||
'authors.html', | ||
'categories.html', | ||
'images', | ||
'index.html', | ||
'pages', | ||
'pdfs', | ||
'tags.html', | ||
'theme', | ||
], | ||
depend_files: [rstcontent, css, plugins, pelicanconf], | ||
depends: pdfs, | ||
command: [ | ||
pelican, | ||
'-vD', | ||
'--ignore-cache', | ||
'-s', | ||
pelicanconf, | ||
meson.current_source_dir()/'content'], | ||
install: true, | ||
install_dir: htmldir, | ||
) | ||
docs = run_target( 'docs' | ||
, command: 'true' | ||
, depends: [ htmldoc | ||
, crlcore_docs | ||
, analog_docs | ||
, hurricane_docs | ||
, viewer_docs | ||
, oroshi_docs | ||
, unicorn_docs | ||
] | ||
) | ||
|
||
docs = run_target( | ||
'docs', | ||
command: 'true', | ||
depends: [htmldoc, crlcore_docs, analog_docs, hurricane_docs, viewer_docs, oroshi_docs, unicorn_docs], | ||
) | ||
install_data( install_dir: pdfdir | ||
, sources: files('content/pdfs/SAL.Bootcamp.pdf') ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
if get_option('docs') | ||
docdir = join_paths(htmldir, 'doc', 'lefdef' ) | ||
install_subdir( 'lefdefref', install_dir: docdir ) | ||
install_subdir( 'lefapi' , install_dir: docdir ) | ||
install_subdir( 'defapi' , install_dir: docdir ) | ||
install_subdir( 'support' , install_dir: docdir ) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters