33import subprocess
44from pathlib import Path
55
6-
7-
8-
9- cli_path , cli_html = 'docs/7.references/1.cli.md' , 'cli-reference.html'
10- cli_header = """---
6+ cli_path , cli_html = 'docs/7.references/1.cli.md' , 'cli-reference.html'
7+ cli_header = """---
118title: "CLI"
129description: "Command-line interface reference"
1310---
1613
1714"""
1815
19- config_path , config_html = 'docs/7.references/2.config.md' , 'config-reference.html'
20- config_header = """---
16+ config_path , config_html = 'docs/7.references/2.config.md' , 'config-reference.html'
17+ config_header = """---
2118title: "Config"
2219description: "Config file reference"
2320---
2623
2724"""
2825
29- context_path , context_html = 'docs/7.references/3.context.md' , 'context-reference.html'
30- context_header = """---
26+ context_path , context_html = 'docs/7.references/3.context.md' , 'context-reference.html'
27+ context_header = """---
3128title: "Context (ctx)"
3229description: "Context reference"
3330---
4239 check = True ,
4340)
4441
45- for path , html , header in ((cli_path , cli_html , cli_header ), (config_path , config_html , config_header ), (context_path , context_html , context_header )):
42+ for path , html , header in (
43+ (cli_path , cli_html , cli_header ),
44+ (config_path , config_html , config_header ),
45+ (context_path , context_html , context_header ),
46+ ):
4647 to = Path (path )
4748 from_ = Path (f'docs/_build/html/{ html } ' )
4849
4950 out = '\n ' .join (from_ .read_text ().split ('\n ' )[32 :- 63 ])
5051 if 'config' in str (from_ ):
5152 out = out .replace ('dipdup.config.' , '' ).replace ('dipdup.enums.' , '' )
5253
53-
54-
55- to .write_text (header + MARKDOWNLINT_HINT + out )
54+ to .write_text (header + MARKDOWNLINT_HINT + out )
0 commit comments