From 73f10e9d9e3970635604aa5af9d71fad41062171 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 13 Dec 2023 05:11:58 +0000 Subject: Deployed 135a9eb to dev with MkDocs 1.5.3 and mike 1.1.2 --- dev/CLI/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/CLI/index.html') diff --git a/dev/CLI/index.html b/dev/CLI/index.html index b8faafc1..ce0a8fa2 100644 --- a/dev/CLI/index.html +++ b/dev/CLI/index.html @@ -1,4 +1,4 @@ - CLI Reference - HydroRollCore 核心文档

CLI Reference

```python exec="1" idprefix="" import argparse import re from HydroRollCore import Cli

parser = Cli().parser

MONOSPACED = ("pyproject.toml", "pdm.lock", ".pdm-python", ":pre", ":post", ":all")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r"([\w\d_]+)", r"__\1__", help) # Make env vars monospaced help = re.sub(r"env var: ([A-Z_]+)", r"env var: \1", help) for monospaced in MONOSPACED: help = re.sub(rf"\s(['\"]?{monospaced}['\"]?)", f"{monospaced}", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: """Render the parser help documents as a string.""" result = [f"{'#' * heading_level} {title}\n"] if parser.description and title != "HydroRollCore": result.append("> " + parser.description + "\n")

 1
+ CLI Reference - infini 核心文档      

CLI Reference

```python exec="1" idprefix="" import argparse import re from infini import Cli

parser = Cli().parser

MONOSPACED = ("pyproject.toml", "pdm.lock", ".pdm-python", ":pre", ":post", ":all")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r"([\w\d_]+)", r"__\1__", help) # Make env vars monospaced help = re.sub(r"env var: ([A-Z_]+)", r"env var: \1", help) for monospaced in MONOSPACED: help = re.sub(rf"\s(['\"]?{monospaced}['\"]?)", f"{monospaced}", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: """Render the parser help documents as a string.""" result = [f"{'#' * heading_level} {title}\n"] if parser.description and title != "infini": result.append("> " + parser.description + "\n")

 1
  2
  3
  4
@@ -59,4 +59,4 @@
     result.append("")
 
 return "\n".join(result)
-

print(render_parser(parser, "HydroRollCore")) ```


最后更新: 2023-12-11
创建日期: 2023-12-11
\ No newline at end of file +

print(render_parser(parser, "infini")) ```


最后更新: 2023-12-13
创建日期: 2023-12-13
\ No newline at end of file -- cgit v1.2.3-70-g09d2