mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-21 17:34:37 +02:00
feat: add multi-account ability
This commit is contained in:
@@ -65,7 +65,7 @@ pub fn build_basic_status(tweet: &Tweet) -> String {
|
||||
/// Generic register function
|
||||
/// As this function is supposed to be run only once, it will panic for every error it encounters
|
||||
/// Most of this function is a direct copy/paste of the official `elefren` crate
|
||||
pub fn register(host: &str) {
|
||||
pub fn register(host: &str, screen_name: &str) {
|
||||
let mut builder = App::builder();
|
||||
builder
|
||||
.client_name(Cow::from(env!("CARGO_PKG_NAME").to_string()))
|
||||
@@ -100,7 +100,12 @@ pub fn register(host: &str) {
|
||||
let toml = toml::to_string(&*mastodon).unwrap();
|
||||
|
||||
println!(
|
||||
"Please insert the following block at the end of your configuration file:\n[mastodon]\n{}",
|
||||
"Please insert the following block at the end of your configuration file:
|
||||
\n[mastodon.{}]
|
||||
\ntwitter_screen_name = \"{}\"
|
||||
\n{}",
|
||||
screen_name.to_lowercase(),
|
||||
screen_name,
|
||||
toml
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user