Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9154cdd4bb | |||
7f9f743f6a |
17
.github/workflows/main.yml
vendored
Normal file
17
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: yesolutions/mirror-action@master
|
||||
with:
|
||||
REMOTE: 'https://git.popov.link/bbb2json.git'
|
||||
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
||||
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
|
@ -6,10 +6,11 @@ use xml::reader::{EventReader, XmlEvent};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ParserResult {
|
||||
pub context: Value,
|
||||
pub external_id: String,
|
||||
pub meeting_id: String,
|
||||
pub meeting_name: String,
|
||||
pub context: Value,
|
||||
pub meeting_url: String,
|
||||
}
|
||||
|
||||
pub fn parser(content: BufReader<File>) -> ParserResult {
|
||||
@ -18,6 +19,7 @@ pub fn parser(content: BufReader<File>) -> ParserResult {
|
||||
external_id: "".to_string(),
|
||||
meeting_id: "".to_string(),
|
||||
meeting_name: "".to_string(),
|
||||
meeting_url: "".to_string(),
|
||||
};
|
||||
|
||||
for element in EventReader::new(content) {
|
||||
@ -35,15 +37,16 @@ pub fn parser(content: BufReader<File>) -> ParserResult {
|
||||
data.context = serde_json::from_str(&attr_value).unwrap();
|
||||
}
|
||||
|
||||
if el_name == "meeting" && attr_name == "externalId" {
|
||||
if el_name == "metadata" && attr_name == "meetingId" {
|
||||
data.external_id = attr_value.clone();
|
||||
}
|
||||
|
||||
if el_name == "meeting" && attr_name == "id" {
|
||||
if el_name == "recording" && attr_name == "meeting_id" {
|
||||
data.meeting_id = attr_value.clone();
|
||||
data.meeting_url = format!("{}{}", "https://bbb.styleschool.ru/playback/presentation/0.9.0/playback.html?meetingId=", attr_value);
|
||||
}
|
||||
|
||||
if el_name == "meeting" && attr_name == "name" {
|
||||
if el_name == "metadata" && attr_name == "meetingName" {
|
||||
data.meeting_name = attr_value.clone();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user