graph-rdfa-processor

Crates.iograph-rdfa-processor
lib.rsgraph-rdfa-processor
version
sourcesrc
created_at2023-10-29 21:47:56.870779
updated_at2024-12-08 13:48:40.982366
descriptionGraph RDFa processor
homepage
repositoryhttps://github.com/nbittich/graph-rdfa-processor
max_upload_size
id1017777
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Nordine Bittich (nbittich)

documentation

https://github.com/nbittich/graph-rdfa-processor

README

RDFa processor library (WIP)

Rust and wasm library to extract rdf statements (in n-triples format) from an html file based on rdfa annotations.

Examples

use graph_rdfa_processor::RdfaGraph;
    let html = r#"
    <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://www.example.org/#somebody" rel="foaf:knows">
        <p about="http://danbri.org/foaf.rdf#danbri" typeof="foaf:Person" property="foaf:name">Dan Brickley</p>
	  </div>
    "#;
    let base = "http://example.com";
    let well_known_prefix = Some("http://example.org/.well_known");

    RdfaGraph::parse_str(html, base, well_known_prefix).unwrap()

 <script type="module">
    import init, {html_to_rdfa} from "./rdfa-wasm/pkg/rdfa_wasm.js";

    async function run() {
      await init();
      let html =`
        <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://www.example.org/#somebody" rel="foaf:knows">
            <p about="http://danbri.org/foaf.rdf#danbri" typeof="foaf:Person" property="foaf:name">Dan Brickley</p>
	      </div>
      `;
      let base = "http://example.com";
      let well_known_prefix = "http://example.org/.well_known";
      let res = html_to_rdfa(html, base, well_known_prefix);

    }
    run();
  </script>

Commit count: 161

cargo fmt