mirror of
https://framagit.org/veretcle/oolatoocs.git
synced 2025-07-21 13:24:18 +02:00
feat: add the ability to rewrite an edited toot
This commit is contained in:
20
src/main.rs
20
src/main.rs
@@ -49,6 +49,21 @@ fn main() {
|
||||
.display_order(1),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
Command::new("migrate")
|
||||
.version(env!("CARGO_PKG_VERSION"))
|
||||
.about("Command to register to Mastodon Instance")
|
||||
.arg(
|
||||
Arg::new("config")
|
||||
.short('c')
|
||||
.long("config")
|
||||
.value_name("CONFIG_FILE")
|
||||
.help(format!("TOML config file for {}", env!("CARGO_PKG_NAME")))
|
||||
.num_args(1)
|
||||
.default_value(DEFAULT_CONFIG_PATH)
|
||||
.display_order(1),
|
||||
),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
env_logger::init();
|
||||
@@ -63,6 +78,11 @@ fn main() {
|
||||
register(sub_m.get_one::<String>("host").unwrap());
|
||||
return;
|
||||
}
|
||||
Some(("migrate", sub_m)) => {
|
||||
let config = parse_toml(sub_m.get_one::<String>("config").unwrap());
|
||||
migrate_db(&config.oolatoocs.db_path).unwrap();
|
||||
return;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user