Crates.io | adstxt |
lib.rs | adstxt |
version | 0.1.1 |
source | src |
created_at | 2020-07-22 03:42:49.466392 |
updated_at | 2024-03-08 07:49:14.956272 |
description | This library provides a parser for ads.txt. |
homepage | |
repository | https://github.com/mechiru/adstxt |
max_upload_size | |
id | 267878 |
size | 35,721 |
This library provides a parser for ads.txt v1.0.2.
# use adstxt::*;
assert_eq!(
AdsTxt::parse(
"# comment
placeholder.example.com, placeholder, DIRECT, placeholder # Comment
contact=adops@example.com
unknown"
),
AdsTxt {
records: vec![(
Record {
domain: "placeholder.example.com",
account_id: "placeholder",
relation: Relation::Direct,
authority_id: Some("placeholder"),
},
None
)],
variables: vec![(Variable { name: "contact", value: "adops@example.com" }, None)],
}
);
Licensed under either of Apache License, Version 2.0 or MIT license at your option.