|
@@ -48,11 +48,24 @@ def search_pages(
|
|
|
)
|
|
)
|
|
|
def save_page(
|
|
def save_page(
|
|
|
page: Annotated[str, Field(description="Identifiant de la page wiki (ex. wiki:syntax).")],
|
|
page: Annotated[str, Field(description="Identifiant de la page wiki (ex. wiki:syntax).")],
|
|
|
- text: Annotated[str, Field(description="Texte wiki à enregistrer. Un texte vide supprime une page existante.")],
|
|
|
|
|
|
|
+ text: Annotated[
|
|
|
|
|
+ str,
|
|
|
|
|
+ Field(
|
|
|
|
|
+ description=(
|
|
|
|
|
+ "Texte en syntaxe DokuWiki (pas de Markdown). Titre principal et sections en niveau 1 "
|
|
|
|
|
+ "(====== Titre ======, puis ====== - Section ======), sous-sections en ===== puis ====. "
|
|
|
|
|
+ "Un texte vide supprime une page existante."
|
|
|
|
|
+ )
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
summary: Annotated[str, Field(description="Résumé de la modification.")] = "",
|
|
summary: Annotated[str, Field(description="Résumé de la modification.")] = "",
|
|
|
isminor: Annotated[bool, Field(description="Indique s'il s'agit d'une modification mineure.")] = False,
|
|
isminor: Annotated[bool, Field(description="Indique s'il s'agit d'une modification mineure.")] = False,
|
|
|
) -> Any:
|
|
) -> Any:
|
|
|
- """Enregistre le texte wiki sur la page. Crée la page si besoin. Un texte vide supprime une page existante."""
|
|
|
|
|
|
|
+ """Enregistre le texte wiki sur la page. Crée la page si besoin. Un texte vide supprime une page existante.
|
|
|
|
|
+
|
|
|
|
|
+ Respecter les conventions de rédaction du serveur : syntaxe DokuWiki, titre principal nommant le
|
|
|
|
|
+ projet, sections en niveau 1 numérotées (" - "), pas de niveau 2 juste après le titre principal.
|
|
|
|
|
+ """
|
|
|
result = _rpc(
|
|
result = _rpc(
|
|
|
"core.savePage",
|
|
"core.savePage",
|
|
|
{"page": page, "text": text, "summary": summary, "isminor": bool(isminor)},
|
|
{"page": page, "text": text, "summary": summary, "isminor": bool(isminor)},
|
|
@@ -70,11 +83,23 @@ def save_page(
|
|
|
)
|
|
)
|
|
|
def append_page(
|
|
def append_page(
|
|
|
page: Annotated[str, Field(description="Identifiant de la page wiki (ex. wiki:syntax).")],
|
|
page: Annotated[str, Field(description="Identifiant de la page wiki (ex. wiki:syntax).")],
|
|
|
- text: Annotated[str, Field(description="Texte wiki à ajouter à la fin de la page.")],
|
|
|
|
|
|
|
+ text: Annotated[
|
|
|
|
|
+ str,
|
|
|
|
|
+ Field(
|
|
|
|
|
+ description=(
|
|
|
|
|
+ "Texte en syntaxe DokuWiki (pas de Markdown) à ajouter à la fin de la page. "
|
|
|
|
|
+ "Une nouvelle section se déclare en niveau 1 numéroté : ====== - Section ======."
|
|
|
|
|
+ )
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
summary: Annotated[str, Field(description="Résumé de la modification.")] = "",
|
|
summary: Annotated[str, Field(description="Résumé de la modification.")] = "",
|
|
|
isminor: Annotated[bool, Field(description="Indique s'il s'agit d'une modification mineure.")] = False,
|
|
isminor: Annotated[bool, Field(description="Indique s'il s'agit d'une modification mineure.")] = False,
|
|
|
) -> Any:
|
|
) -> Any:
|
|
|
- """Ajoute du texte à la fin d'une page DokuWiki. Crée la page si elle n'existe pas."""
|
|
|
|
|
|
|
+ """Ajoute du texte à la fin d'une page DokuWiki. Crée la page si elle n'existe pas.
|
|
|
|
|
+
|
|
|
|
|
+ Respecter les conventions de rédaction du serveur : syntaxe DokuWiki, sections en niveau 1
|
|
|
|
|
+ numérotées (" - "), sous-sections en ===== puis ====.
|
|
|
|
|
+ """
|
|
|
result = _rpc(
|
|
result = _rpc(
|
|
|
"core.appendPage",
|
|
"core.appendPage",
|
|
|
{"page": page, "text": text, "summary": summary, "isminor": bool(isminor)},
|
|
{"page": page, "text": text, "summary": summary, "isminor": bool(isminor)},
|