Move to self-hosted Gitea, clean up stuff.
This commit is contained in:
parent
af3cdaab6c
commit
18c8284ba9
|
@ -1,17 +0,0 @@
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
|
|
||||||
rust-latest:
|
|
||||||
stage: build
|
|
||||||
image: rust:latest
|
|
||||||
script:
|
|
||||||
- cargo build --verbose
|
|
||||||
- cargo test --verbose
|
|
||||||
|
|
||||||
rust-nightly:
|
|
||||||
stage: build
|
|
||||||
image: rustlang/rust:nightly
|
|
||||||
script:
|
|
||||||
- cargo build --verbose
|
|
||||||
- cargo test --verbose
|
|
||||||
allow_failure: true
|
|
|
@ -3,11 +3,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "opml"
|
name = "opml"
|
||||||
authors = ["Holllo <helllo@holllo.cc>"]
|
authors = ["Holllo <helllo@holllo.cc>"]
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
description = "An OPML parser for Rust."
|
description = "An OPML parser for Rust."
|
||||||
repository = "https://gitlab.com/holllo/opml-rs"
|
repository = "https://git.holllo.cc/holllo/opml"
|
||||||
readme = "ReadMe.md"
|
readme = "README.md"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
keywords = ["xml", "opml"]
|
keywords = ["xml", "opml"]
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Holllo <helllo@holllo.cc>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -1,7 +0,0 @@
|
||||||
Copyright 2020 Holllo <helllo@holllo.cc>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
# OPML
|
||||||
|
|
||||||
|
> An OPML parser for Rust.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use opml::OPML;
|
||||||
|
|
||||||
|
let xml = r#"<opml version="2.0"><body><outline text="Outline"/></body></opml>"#;
|
||||||
|
let parsed = OPML::new(xml).unwrap();
|
||||||
|
|
||||||
|
println!("{:#?}", parsed);
|
||||||
|
```
|
||||||
|
|
||||||
|
Check out [the documentation](https://docs.rs/opml/) for further details.
|
||||||
|
|
||||||
|
## CLI
|
||||||
|
|
||||||
|
Looking for a command-line utility to parse OPML documents? Check out [the `opml-cli`](https://git.holllo.cc/Holllo/opml-cli/), a small wrapper around this crate that will let you do just that.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Open-sourced with either the
|
||||||
|
|
||||||
|
* [Apache License, Version 2.0](https://git.holllo.cc/Holllo/opml/src/branch/main/LICENSE-Apache) (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* [MIT license](https://git.holllo.cc/Holllo/opml/src/branch/main/LICENSE-MIT) (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
at your option.
|
||||||
|
|
||||||
|
The samples [located in `tests/spec_samples`](https://git.holllo.cc/Holllo/opml/src/branch/main/tests/spec_samples) were [taken from the OPML 2.0 spec](http://dev.opml.org/spec2.html#examples) and are subject to [their own license](https://git.holllo.cc/Holllo/opml/src/branch/main/tests/spec_samples/LICENSE).
|
37
ReadMe.md
37
ReadMe.md
|
@ -1,37 +0,0 @@
|
||||||
# OPML
|
|
||||||
|
|
||||||
> An OPML parser for Rust.
|
|
||||||
|
|
||||||
## Contents
|
|
||||||
|
|
||||||
* [Examples](examples/)
|
|
||||||
* [Expertise Welcome](#expertise-welcome)
|
|
||||||
* [License](#license)
|
|
||||||
|
|
||||||
## Expertise Welcome
|
|
||||||
|
|
||||||
This is the first crate I'm publishing to crates.io and the first proper library I've made for Rust. Any help or tips with how to improve the API, documentation, usability, testing or anything else is very welcome. Feel free to create [an issue](https://gitlab.com/holllo/opml-rs/issues/) or contact me via email at helllo@holllo.cc.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
```rust
|
|
||||||
use opml::OPML;
|
|
||||||
|
|
||||||
let xml = r#"<opml version="2.0"><head/><body><outline text="Outline"/></body></opml>"#;
|
|
||||||
let parsed = OPML::new(xml).unwrap();
|
|
||||||
|
|
||||||
println!("{:#?}", parsed);
|
|
||||||
```
|
|
||||||
|
|
||||||
Check out [the documentation](https://docs.rs/opml/) for further details.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Open-sourced with either the
|
|
||||||
|
|
||||||
* [Apache License, Version 2.0](License-Apache) (http://www.apache.org/licenses/LICENSE-2.0)
|
|
||||||
* [MIT license](License-MIT) (http://opensource.org/licenses/MIT)
|
|
||||||
|
|
||||||
at your option.
|
|
||||||
|
|
||||||
The samples [located in `tests/spec_samples`](tests/spec_samples) were [taken from the OPML 2.0 spec](http://dev.opml.org/spec2.html#examples) and are subject to [their own license](tests/spec_samples/License).
|
|
|
@ -45,21 +45,22 @@
|
||||||
//! let expected = r#"<opml version="2.0"><head><title>Rust Feeds</title></head><body><outline text="Rust Blog" xmlUrl="https://blog.rust-lang.org/feed.xml"/><outline text="Inside Rust" xmlUrl="https://blog.rust-lang.org/inside-rust/feed.xml"/></body></opml>"#;
|
//! let expected = r#"<opml version="2.0"><head><title>Rust Feeds</title></head><body><outline text="Rust Blog" xmlUrl="https://blog.rust-lang.org/feed.xml"/><outline text="Inside Rust" xmlUrl="https://blog.rust-lang.org/inside-rust/feed.xml"/></body></opml>"#;
|
||||||
//! println!("{}", xml);
|
//! println!("{}", xml);
|
||||||
//! assert_eq!(xml, expected);
|
//! assert_eq!(xml, expected);
|
||||||
//!
|
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
//! ## CLI
|
||||||
|
//!
|
||||||
|
//! Looking for a command-line utility to parse OPML documents? Check out [the `opml-cli`](https://git.holllo.cc/Holllo/opml-cli/), a small wrapper around this crate that will let you do just that.
|
||||||
|
//!
|
||||||
//! ## License
|
//! ## License
|
||||||
//!
|
//!
|
||||||
//! Open-sourced with either the
|
//! Open-sourced with either the
|
||||||
//!
|
//!
|
||||||
//! * [Apache License, Version 2.0](https://gitlab.com/holllo/opml-rs/-/blob/master/License-Apache) (http://www.apache.org/licenses/LICENSE-2.0)
|
//! * [Apache License, Version 2.0](https://git.holllo.cc/Holllo/opml/src/branch/main/LICENSE-Apache) (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
//! * [MIT license](https://gitlab.com/holllo/opml-rs/-/blob/master/License-MIT) (http://opensource.org/licenses/MIT)
|
//! * [MIT license](https://git.holllo.cc/Holllo/opml/src/branch/main/LICENSE-MIT) (http://opensource.org/licenses/MIT)
|
||||||
//!
|
//!
|
||||||
//! at your option.
|
//! at your option.
|
||||||
//!
|
//!
|
||||||
//! The samples [located in `tests/spec_samples`](https://gitlab.com/holllo/opml-rs/-/blob/master/tests/spec_samples) were [taken from the OPML 2.0 spec](http://dev.opml.org/spec2.html#examples) and are subject to [their own license](https://gitlab.com/holllo/opml-rs/-/blob/master/tests/spec_samples/License).
|
//! The samples [located in `tests/spec_samples`](https://git.holllo.cc/Holllo/opml/src/branch/main/tests/spec_samples) were [taken from the OPML 2.0 spec](http://dev.opml.org/spec2.html#examples) and are subject to [their own license](https://git.holllo.cc/Holllo/opml/src/branch/main/tests/spec_samples/LICENSE).
|
||||||
|
|
||||||
// TODO: Maybe use a date-time type for all the date-time places?
|
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
@ -87,7 +88,6 @@ impl OPML {
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
///
|
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use opml::{OPML, Outline};
|
/// use opml::{OPML, Outline};
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue