Forum | Documentation | Website | Blog

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

Fix parsing & add all boards info

parent 55cd8362
Branches
Tags
1 merge request!89Docs updates - chapter restructuring, images, and more
{% for board, path, oshw_id in oshw_details %}
{% if path in pagename %}
{% if path+'/' in pagename %}
<div class="card bg-light mt-4 text-center">
<div class="card-header">
{{board}}
......
......@@ -32,15 +32,16 @@ for (dirpath, dirnames, filenames) in os.walk(rst_epilog_path):
# Configure PDF build and sidebar links
latex_documents = []
pdf_paths = []
pdf_list = []
oshw_details = []
with open('conf.yml', 'r') as conf_file:
conf_data = yaml.safe_load(conf_file)
pdf_build_all = True
pdf_build = []
if(conf_data["pdf_build"] != "all"):
for name in conf_data["pdf_build"].split(","):
pdf_list.append(name.lstrip())
pdf_build.append(name.lstrip())
pdf_build_all = False
for type, data in conf_data.items():
......@@ -52,7 +53,7 @@ with open('conf.yml', 'r') as conf_file:
pdf = data.get('pdf', False)
# PDF build details
if(pdf and (name in pdf_list or pdf_build_all)):
if(pdf and (name in pdf_build or pdf_build_all)):
pdf_paths.append(path)
tex_name = '-'.join(path.split('/')[1:])
latex_documents.append((path+"/index", tex_name+".tex", "", author, "manual"))
......
# YAML file to configure PDF build and sidebar links
# YAML file to configure PDF builds and sidebar links
# PDF buils configuration
# PDF builds configuration
#
# all: If you want to build PDFs of all the listed boards, books, projects, etc.
#
# name1,name2,name3: If you want to build PDF for specific boards, books, projects, etc.
# name1, name2, name3: If you want to build PDF for specific boards, books, projects, etc.
# Example: pdf_build: BeagleBone Black, BeagleBone AI-64
pdf_build: all
# Boards
# Boards
#
# Example:
# boards:
# name:
# path: <board path for index.rst>
# pdf: True/False
# oshw: <comma seprated file names from _static/images/oshw folder>
# path: First level board documentation path for board 'index.rst'
# pdf: True/False (optional, False if this 'pdf:' option is not added)
# oshw: Comma seprated file names from '_static/images/oshw' folder
boards:
BeagleBone Black:
......@@ -26,10 +26,43 @@ boards:
BeagleBone AI-64:
path: boards/beaglebone/ai-64
pdf: True
oshw: BeagleBone AI-64_US002120.svg
BeagleBone AI:
path: boards/beaglebone/ai
pdf: True
oshw: BeagleBone AI_US000169.svg
BeagleBone Blue:
path: boards/beaglebone/blue
pdf: True
oshw: BeagleBone Blue_US000064.svg
BeagleConnect Freedom:
path: boards/beagleconnect/freedom
pdf: True
oshw: BeagleConnect Freedom_US002175.svg
BeaglePlay:
path: boards/beagleplay
pdf: True
oshw: BeaglePlay_US002174.svg
BeagleV-Ahead:
path: boards/beaglev/ahead
pdf: True
oshw: BeagleV-Ahead_US002535.svg
BeagleV-Fire:
path: boards/beaglev/fire
pdf: True
oshw: BeagleV Fire_US002572.svg
BeagleY-AI:
path: boards/beagley/ai
pdf: True
oshw: BeagleY-AI_US002616.svg
PocketBeagle:
path: boards/pocketbeagle
pdf: True
oshw: PocketBeagle_US000083.svg
# Books
books:
BeagleBone Cookbook:
path: books/beaglebone-cookbook
# Projects
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