diff --git a/conf.py b/conf.py index 0820c8c4a74b0128dd67f113f23fb838a2d92b79..518bba251201e0569d1698e1ed516fcc3171dae6 100644 --- a/conf.py +++ b/conf.py @@ -42,6 +42,8 @@ latex_documents = [] pdf_paths = [] oshw_details = [] board_details = [] +book_details = [] +project_details = [] with open('conf.yml', 'r') as conf_file: conf_data = yaml.safe_load(conf_file) @@ -79,7 +81,39 @@ with open('conf.yml', 'r') as conf_file: oshw_details.append([board, path, oshw_id]) # Board basic details - board_details.append([board, path, page, git, forum]) + board_details.append([name, path, page, git, forum]) + + # Books + if(type == "books"): + for book, data in conf_data["books"].items(): + name = book + path = data['path'] + pdf = data.get('pdf', False) + + #Books PDF build details + 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")) + + # Book basic details + book_details.append([name, path]) + + # Projects + if(type == "projects"): + for book, data in conf_data["projects"].items(): + project = book + path = data['path'] + pdf = data.get('pdf', False) + + #Projects PDF build details + if(pdf and (project 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")) + + # Project basic details + project_details.append([name, path]) # -- General configuration -- @@ -348,6 +382,8 @@ html_context = { "oshw_details": oshw_details, "pdf_paths": pdf_paths, "board_details": board_details, + "book_details": book_details, + "project_details": project_details, "announcement_message": announcement_message, "development_version_message": development_version_message, "forked_version_message": forked_version_message, diff --git a/conf.yml b/conf.yml index fafee26176914c3c58432ddb032a2afe16caa3aa..3c2011e46d2c6c4bd45bd1813b8fe4919ba3f946 100644 --- a/conf.yml +++ b/conf.yml @@ -92,5 +92,25 @@ boards: oshw: PocketBeagle_US000083.svg # Books +books: + BeagleBone-Cookbook: + path: books/beaglebone-cookbook + pdf: True + PRU-Cookbook: + path: books/pru-cookbook + pdf: True # Projects +projects: + BB-Config: + path: projects/bb-config + pdf: True + BeagleConnect: + path: projects/beagleconnect + pdf: True + libRobotControl: + path: projects/librobotcontrol + pdf: True + SimpPRU: + path: projects/simppru + pdf: True \ No newline at end of file