added mediawiki config
This commit is contained in:
parent
c8031dfc01
commit
fbe8e4b85d
|
@ -42,7 +42,17 @@ const CONFIG_SPEC: CfgSpec<'static> = CfgSpec {
|
||||||
CfgField::Optional { key: "last-message-id", description: "Message-Id of last initial announcement to send In-Reply-To (if applicable)." }
|
CfgField::Optional { key: "last-message-id", description: "Message-Id of last initial announcement to send In-Reply-To (if applicable)." }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// TODO: Matrix, Wiki
|
CfgGroup { name: "wiki",
|
||||||
|
description: "API Settings for Mediawiki",
|
||||||
|
fields: &[
|
||||||
|
CfgField::Default { key: "http-user", default: "cccb-wiki", description: "Username that would be needed if you would access the wiki with your web browser" },
|
||||||
|
CfgField::Password { key: "http-pass", description: "Password that would be needed if you would access the wiki with your web browser" },
|
||||||
|
CfgField::Default { key: "api-user", default: "PlenumBot@PlenumBot-PW1", description: "API Username that was generated in the mediawiki by the PlenumBot-Account" },
|
||||||
|
CfgField::Password { key: "api-secret", description: "API Secret that was generated in the mediawiki by the PlenumBot-Account. Example: \"PlenumBot-PW1@mgeg89bgit09q8bjblt5tn5ojj2d4gy\"" },
|
||||||
|
CfgField::Default { key: "server-url", default: "https://wiki.berlin.ccc.de/" , description: "Link that is needed for getting the session token" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// TODO: Matrix,
|
||||||
CfgGroup { name: "text",
|
CfgGroup { name: "text",
|
||||||
description: "Various strings used.",
|
description: "Various strings used.",
|
||||||
fields: &[
|
fields: &[
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
|
use reqwest;
|
||||||
|
|
||||||
pub fn pad_ins_wiki(old_pad_content: String) {
|
pub fn pad_ins_wiki(old_pad_content: String) {
|
||||||
convert_markdown_to_mediawiki_and_save_as_txt(old_pad_content);
|
convert_markdown_to_mediawiki_and_save_as_txt(old_pad_content);
|
||||||
|
@ -59,3 +60,8 @@ fn login_to_mediawiki(
|
||||||
*/
|
*/
|
||||||
Ok(String::from("unimplemented"))
|
Ok(String::from("unimplemented"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Authenticate with username and password on http basic auth
|
||||||
|
fn auth() {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue