mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-28 06:39:49 +00:00
docs: add refs to port titles, fix readme files
This commit is contained in:
parent
41026ca603
commit
42c38c4a96
@ -6,8 +6,8 @@ import fnmatch
|
||||
|
||||
blacklist = []
|
||||
|
||||
example_item = """
|
||||
- [PORT_TITLE](#sec:PORT_LABELPort): PORT_PATH"""
|
||||
port_item = """
|
||||
- [PORT_TITLE](#sec:PORT_LABELPort)"""
|
||||
|
||||
def get_readme_title(example_path):
|
||||
title = ''
|
||||
@ -39,11 +39,11 @@ def process_readmes(intro_file, ports_folder, ports_file):
|
||||
for readme_dir, readme_file in matches.items():
|
||||
with open(readme_file, 'rb') as fin:
|
||||
for line in fin:
|
||||
#increase level of indetation
|
||||
parts = re.match('(#\s+)(.*)\n',line)
|
||||
if parts:
|
||||
title = parts.group(2)
|
||||
ports.write(example_item.replace("PORT_TITLE", title).replace("PORT_PATH", readme_file).replace("PORT_LABEL", readme_dir))
|
||||
# find title, add reference
|
||||
title_parts = re.match('(#\s+)(.*)\n',line)
|
||||
if title_parts:
|
||||
title = title_parts.group(2)
|
||||
ports.write(port_item.replace("PORT_TITLE", title).replace("PORT_LABEL", readme_dir))
|
||||
break
|
||||
fin.close()
|
||||
ports.write("\n\n")
|
||||
@ -52,11 +52,17 @@ def process_readmes(intro_file, ports_folder, ports_file):
|
||||
with open(readme_file, 'rb') as fin:
|
||||
for line in fin:
|
||||
#increase level of indetation
|
||||
parts = re.match('#(.*\n)',line)
|
||||
parts = re.match('#(.*)\n',line)
|
||||
title_parts = re.match('(#\s+)(.*)\n',line)
|
||||
if parts:
|
||||
ports.write("#" + line + "{#sec:"+ readme_dir + "Port}")
|
||||
if title_parts:
|
||||
ports.write("#" + title_parts.group(2) + " {" + "#sec:" + readme_dir + "Port}\n" )
|
||||
else:
|
||||
ports.write("#" + line)
|
||||
else:
|
||||
ports.write(line)
|
||||
|
||||
|
||||
fin.close()
|
||||
ports.close()
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
This port allows to use the ATWILC3000 connected via UART with BTstack running on a POSIX host system, see test setup below (which lacks a proper RESET button).
|
||||
|
||||
# Compilation
|
||||
## Compilation
|
||||
|
||||
$ make
|
||||
|
||||
The Makefile downloads the wilc3000_bt_firmware.bin firmware from the [GitHub atwilc3000/firmware](https://github.com/atwilc3000/firmware) repo.
|
||||
|
||||
# Usage
|
||||
## Usage
|
||||
|
||||
Just run any of the provided examples, e.g.
|
||||
|
||||
|
@ -8,7 +8,7 @@ To create all example projects in the example folder, you can run:
|
||||
|
||||
$ make
|
||||
|
||||
# Compile Example
|
||||
## Compile Example
|
||||
|
||||
In one of the example folders:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user