mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 02:33:01 +02:00
feat: Generate admin command documentation
The first part of getting admin command docs on the website. There's also the beginnings of manpage generation here, although it's kinda sus and I'm not sure how it's supposed to work. I'll leave that to anyone who wants to package it. We introduce the beginings of the xtask pattern here - we do a lot of file generation, I thought it would be best to avoid doing that on every compilation. It also helps avoid lots of runtime deps. We'll need to document generating this stuff & probably add pre-commit hooks for it, though.
This commit is contained in:
parent
18d12a7756
commit
d98ce2c7b9
41 changed files with 2977 additions and 33 deletions
|
@ -8,7 +8,7 @@ use ruma::{OwnedRoomAliasId, OwnedRoomId};
|
|||
use crate::Context;
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub(crate) enum RoomAliasCommand {
|
||||
pub enum RoomAliasCommand {
|
||||
/// - Make an alias point to a room.
|
||||
Set {
|
||||
#[arg(short, long)]
|
||||
|
|
|
@ -6,7 +6,7 @@ use ruma::OwnedRoomId;
|
|||
use crate::{Context, PAGE_SIZE, get_room_info};
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub(crate) enum RoomDirectoryCommand {
|
||||
pub enum RoomDirectoryCommand {
|
||||
/// - Publish a room to the room directory
|
||||
Publish {
|
||||
/// The room id of the room to publish
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::{admin_command, admin_command_dispatch};
|
|||
|
||||
#[admin_command_dispatch]
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub(crate) enum RoomInfoCommand {
|
||||
pub enum RoomInfoCommand {
|
||||
/// - List joined members in a room
|
||||
ListJoinedMembers {
|
||||
room_id: OwnedRoomId,
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::admin_command_dispatch;
|
|||
|
||||
#[admin_command_dispatch]
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub(super) enum RoomCommand {
|
||||
pub enum RoomCommand {
|
||||
/// - List all rooms the server knows about
|
||||
#[clap(alias = "list")]
|
||||
ListRooms {
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::{admin_command, admin_command_dispatch, get_room_info};
|
|||
|
||||
#[admin_command_dispatch]
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub(crate) enum RoomModerationCommand {
|
||||
pub enum RoomModerationCommand {
|
||||
/// - Bans a room from local users joining and evicts all our local users
|
||||
/// (including server
|
||||
/// admins)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue