add oauth

This commit is contained in:
2026-01-18 14:26:43 +09:00
parent 1fd619e32b
commit f8670aa179
50 changed files with 5132 additions and 330 deletions

View File

@@ -1,5 +1,6 @@
mod commands;
mod lexicons;
mod lms;
use anyhow::Result;
use clap::{Parser, Subcommand};
@@ -72,7 +73,7 @@ enum Commands {
#[command(alias = "s")]
Sync {
/// Output directory
#[arg(short, long, default_value = "content")]
#[arg(short, long, default_value = "public/content")]
output: String,
},
@@ -85,10 +86,25 @@ enum Commands {
#[arg(short, long, default_value = "./src/lexicons")]
output: String,
},
/// Translate content files
Lang {
/// Input file or directory
input: String,
/// Source language
#[arg(short, long, default_value = "ja")]
from: String,
/// Target language
#[arg(short, long, default_value = "en")]
to: String,
},
}
#[tokio::main]
async fn main() -> Result<()> {
// Load .env file if exists
dotenvy::dotenv().ok();
let cli = Cli::parse();
match cli.command {
@@ -113,6 +129,9 @@ async fn main() -> Result<()> {
Commands::Gen { input, output } => {
commands::gen::generate(&input, &output)?;
}
Commands::Lang { input, from, to } => {
commands::lang::translate(&input, &from, &to).await?;
}
}
Ok(())