web-archive
Library for archiving a web page along with its linked resources (images, css, js) for local use.
Example
= "0.2.0"
use ;
// Build a collection of linked resources attached to the page
// async API
let archive = archive.await.unwrap;
// blocking API
let archive = archive.unwrap;
// Embed the resources into the HTML
let page = archive.embed_resources;
println!;
Testing
The main library contains unit tests for the parsing functionality, and dynamic tests against a local webserver are in the dynamic_tests directory. The dynamic tests are built with Rocket which requires Nightly Rust, however the main library builds on Stable.
&&
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.