fix: doc
This commit is contained in:
parent
973184b011
commit
2844578181
2 changed files with 20 additions and 8 deletions
24
doc.py
24
doc.py
|
|
@ -5,6 +5,10 @@ from rougail.output_doc import RougailOutputDoc
|
|||
from rougail.user_data_bitwarden.config import get_rougail_config as local_get_rougail_config
|
||||
|
||||
|
||||
TO_DOC=False
|
||||
TO_DOC=True
|
||||
|
||||
|
||||
def to_yaml(options):
|
||||
return """%YAML 1.2
|
||||
---
|
||||
|
|
@ -18,13 +22,19 @@ rougailconfig['step.output'] = "doc"
|
|||
# rougailconfig['tiramisu_cache'] = "a.py"
|
||||
rougailconfig['step.structural'] = ["commandline", "string"]
|
||||
rougailconfig['main_namespace'] = None
|
||||
rougailconfig["doc.root"] = "bitwarden"
|
||||
rougailconfig["doc.title_level"] = 2
|
||||
#rougailconfig["doc.root"] = "bitwarden"
|
||||
if TO_DOC:
|
||||
rougailconfig["doc.title_level"] = 0
|
||||
else:
|
||||
rougailconfig["doc.title_level"] = 2
|
||||
rougailconfig["doc.tabulars.with_commandline"] = True
|
||||
rougailconfig["doc.tabulars.with_environment"] = True
|
||||
rougailconfig["doc.tabulars.environment_prefix"] = "ROUGAILCLI"
|
||||
rougailconfig["doc.output_format"] = "github"
|
||||
rougailconfig['doc.tabular_template'] = 'six_columns'
|
||||
if TO_DOC:
|
||||
rougailconfig["doc.output_format"] = "restructuredtext"
|
||||
else:
|
||||
rougailconfig["doc.output_format"] = "github"
|
||||
rougailconfig['doc.tabular_template'] = 'six_columns'
|
||||
rougail_config = to_yaml(get_common_rougail_config(backward_compatibility=backward_compatibility)[2])
|
||||
module_config = to_yaml(local_get_rougail_config(backward_compatibility=False)['options'])
|
||||
rougailconfig['main_structural_strings'] = [rougail_config, module_config]
|
||||
|
|
@ -32,10 +42,12 @@ rougail = Rougail(rougailconfig)
|
|||
config = rougail.run()
|
||||
config.property.read_write()
|
||||
output = RougailOutputDoc(
|
||||
config=config,
|
||||
config=config.option('bitwarden'),
|
||||
rougailconfig=rougailconfig,
|
||||
true_config=config,
|
||||
)
|
||||
print("""---
|
||||
if not TO_DOC:
|
||||
print("""---
|
||||
gitea: none
|
||||
include_toc: true
|
||||
---
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ def get_rougail_config(
|
|||
backward_compatibility=True,
|
||||
) -> dict:
|
||||
options = f"""bitwarden:
|
||||
description: {_("Secrets are in Bitwarden")}
|
||||
description: {_("Load user data secrets from Bitwarden")}
|
||||
help: |-
|
||||
{_("Load the secrets from Bitwarden. The data is retrieved using the official command line \"bw\" or the alternative command \"rbw\" (faster). Before using Rougail, the command must be logged and unlocked.")}
|
||||
{_("Load the secrets from Bitwarden (or a compatible server like Vaultwarden). The data is retrieved using the official command line \"bw\" or the alternative command \"rbw\" (faster). Before using Rougail, the command must be logged and unlocked.")}
|
||||
disabled:
|
||||
jinja: |-
|
||||
{{{{ _.step.user_data is propertyerror or 'bitwarden' not in _.step.user_data }}}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue