se_dump

Crates.iose_dump
lib.rsse_dump
version0.1.0
sourcesrc
created_at2023-01-06 12:37:11.327245
updated_at2023-01-06 12:37:11.327245
descriptionSome structs to facilitate parsing of StackExchange dumps into easy-to-use values
homepage
repositoryhttps://gitlab.com/reinis-mazeiks/se_dump
max_upload_size
id752272
size15,048
Reinis Mazeiks (rMazeiks)

documentation

README

Parse Stack Exchange Dumps

Some structs to facilitate parsing of StackExchange dumps into easy-to-use values.

use std::fs::File;
use std::io::BufReader;
use std::path::Path;
use quick_xml::de::from_reader;
use se_dump::post::{PostId, Posts, PostType};

let reader = BufReader::new(File::open(Path::new("sample_data/Posts.xml")).unwrap());
let posts: Posts = from_reader(reader).unwrap();
assert_eq!(posts.posts[0].id, PostId(2115));
assert_eq!(posts.posts[0].post_type, PostType::Answer);

Incomplete

Currently, only Post and PostLink structs are provided22

Commit count: 12

cargo fmt