Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit c5321665 authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

Render inividual board PDF

parent ffb48ecd
Branches
No related merge requests found
Showing
with 52 additions and 30 deletions
File moved
File moved
{% for board, oshw_id in oshw_details %}
{% if board+'/' in pagename %}
{% for board, path, oshw_id in oshw_details %}
{% if path+'/' in pagename %}
<div class="card bg-light mt-4 text-center">
<div class="card-header">
{{board}}
</div>
<div class="card-body">
<p class="card-text text-dark">
<a href="https://certification.oshwa.org/{{ oshw_id|lower }}.html" target="_blank">
<img src="{{docs_url}}/_static/images/oshw/{{board}}_{{oshw_id}}.svg"/>
<img src="{{docs_url}}/_static/images/oshw/{{board}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
</a>
</p>
</div>
......
{% for board_path in boards_path %}
{% if board_path+'/' in pagename %}
<a role="button" href="{{docs_url}}/{{board_path}}.pdf">
<i class="fa-solid fa-download"></i> Download PDF
</a>
{% endif %}
{% endfor %}
......@@ -38,18 +38,18 @@ started.
.. toctree::
:maxdepth: 1
/boards/beagleplay/index
/boards/beaglebone/ai-64/index
/boards/beaglebone/ai/index
/boards/beaglebone/black/index
/boards/beaglebone/blue/index
/boards/beaglebone/index
/boards/beaglev/ahead/index
/boards/beaglev/fire/index
/boards/pocketbeagle/original/index
/boards/beagleconnect/freedom/index
/boards/beagleconnect/index
/boards/beagleboard/index
/boards/capes/index
/boards/terms-and-conditions
beagleplay/index
beaglebone/ai-64/index
beaglebone/ai/index
beaglebone/black/index
beaglebone/blue/index
beaglebone/index
beaglev/ahead/index
beaglev/fire/index
pocketbeagle/original/index
beagleconnect/freedom/index
beagleconnect/index
beagleboard/index
capes/index
terms-and-conditions
......@@ -18,20 +18,30 @@ sys.path.append(str(Path(".").resolve()))
rst_epilog =""
# Add latest images to rst_epilog
rst_epilog_files = ['latest.images', 'production.images']
for rst_epilog_file in rst_epilog_files:
with open(rst_epilog_file) as f:
rst_epilog += f.read()
rst_epilog_path = "_static/epilog/"
for (dirpath, dirnames, filenames) in os.walk(rst_epilog_path):
for filename in filenames:
with open(dirpath + filename) as f:
rst_epilog += f.read()
# Board OSHWA certification information
oshw_logos_path = "_static/images/oshw"
oshw_logos_path = "_static/images/oshw/"
oshw_details = []
for (dirpath, dirnames, filenames) in os.walk(oshw_logos_path):
for filename in filenames:
if filename.endswith('.svg'):
oshw_logo_name = filename.split(".")[0]
oshw_details.append(oshw_logo_name.split('_'))
# Unique boards path information
boards_path = []
for board, path, oshw_id in oshw_details:
for (dirpath, dirnames, filenames) in os.walk("boards"):
if '/'+path+'/' in dirpath+'/':
if path+'/' not in dirpath:
boards_path.append(dirpath)
boards_path = set(boards_path)
# -- Project information --
project = 'BeagleBoard Docs'
copyright = '2024, BeagleBoard.org Foundation'
......@@ -267,11 +277,14 @@ html_context = {
"edit_page_url_template": "{{ my_vcs_site }}{{ file_name }}",
"edit_page_provider_name": "OpenBeagle",
"my_vcs_site": "https://openbeagle.org/docs/docs.beagleboard.io/-/edit/main/",
"oshw_details": oshw_details
"oshw_details": oshw_details,
"boards_path": boards_path
}
# -- Options for LaTeX output --
latex_engine = "xelatex"
latex_logo = "_static/images/logo-latex.pdf"
latex_documents = []
latex_elements = {
"papersize": "a4paper",
"maketitle": open("_static/latex/title.tex").read(),
......@@ -287,8 +300,7 @@ latex_elements = {
)
),
}
latex_engine = "xelatex"
latex_logo = "_static/images/logo-latex.pdf"
latex_documents = [
("index-tex", "beagleboard-docs.tex", "BeagleBoard Docs", author, "manual"),
]
\ No newline at end of file
for board_path in boards_path:
board_tex_name = board_path.split('/')[-1]
latex_documents.append([(board_path, board_tex_name+".tex", "", author, "manual"),])
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment