Skip to content

mechiru/adstxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adstxt

ci Rust Documentation Latest Version

This library provides a parser for ads.txt v1.0.2.

Example

# 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)],
    }
);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Languages