sitemapo

Build Status Crate Docs Crate Version Crate Coverage

Also check out other xwde projects here.

The implementation of the Sitemap (or URL inclusion) protocol in the Rust programming language with the support of txt, xml formats and video, image, news extensions (according to the Google's spec).

Features

Examples

```rust use std::io::BufReader; use url::Url; use sitemapo::{Parser, TxtParser};

fn main() { let url = "https://example.com/file1.html"; let buf = BufReader::new(url.as_bytes()); let mut parser = TxtParser::new(buf).unwrap();

let rec = parser.read().unwrap();
let buf = parser.close().unwrap();

} ```

```rust use url::Url; use sitemapo::{Builder, XmlBuilder}; use sitemapo::record::EntryRecord;

fn main() { let buf = Vec::new(); let mut builder = XmlBuilder::new(buf).unwrap();

let url = Url::parse("https://example.com/").unwrap();
let rec = EntryRecord::new(url);
builder.write(&rec).unwrap();
let buf = builder.close().unwrap();

} ```

Links