aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-11-27 11:29:40 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-11-27 11:29:40 +0100
commitaa959c51884c10e1943fd915b651a4ab36d63139 (patch)
treea0ed84229142f1bbfc407cce28f4812bceab1724 /src/ee/tools
parent1c3b5f628b310c64f0da36247f5044d69b97d772 (diff)
downloadee-python-aa959c51884c10e1943fd915b651a4ab36d63139.tar.gz
ee-python-aa959c51884c10e1943fd915b651a4ab36d63139.tar.bz2
ee-python-aa959c51884c10e1943fd915b651a4ab36d63139.tar.xz
ee-python-aa959c51884c10e1943fd915b651a4ab36d63139.zip
part-validate-parts report: Creating internal links.HEADmaster
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/part_validate_parts.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ee/tools/part_validate_parts.py b/src/ee/tools/part_validate_parts.py
index cebe70f..1e34326 100644
--- a/src/ee/tools/part_validate_parts.py
+++ b/src/ee/tools/part_validate_parts.py
@@ -113,10 +113,8 @@ def validate(f, ctx: Context, bom_part: Part, sch_part: Part):
if m:
messages.append(m)
- title = "Checking {}".format(sch_part.printable_reference)
- print(title, file=f)
- print("{}".format("=" * len(title)), file=f)
- print("", file=f)
+ title = "Checks for {}".format(sch_part.printable_reference)
+ print(".. _{}:\n\n{}\n{}\n".format(sch_part.printable_reference, title, "=" * len(title)), file=f)
for msg in messages.errors:
print("* ERROR: {}".format(msg), file=f)
@@ -165,11 +163,11 @@ def work(bom_path: Path, sch_path: Path, report_path: Path, part_dbs: List[Path]
print("", file=f)
for message, messages_ in groupby(sorted(messages.messages, key=lambda m: m[2]), lambda m: m[2]):
messages = list(messages_)
- print(message, file=f)
- print("{}".format("-" * len(message)), file=f)
+ print("{}\n{}\n".format(message, "-" * len(message)), file=f)
for m in messages:
- print(" * {}".format(m[0].printable_reference), file=f)
+ ref = m[0].printable_reference
+ print(" * `{} <{}_>`_".format(ref, ref), file=f)
print("", file=f)