Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Dec 8, 2024
1 parent d3d812e commit 2121fd2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ based on rdfa annotations.

## Examples

### Rust usage:

```rust
use graph_rdfa_processor::RdfaGraph;
let html = r#"
Expand All @@ -19,6 +21,37 @@ use graph_rdfa_processor::RdfaGraph;

```

### Node usage:

`npm i @nbittich/rdfa-wasm`

```js
const { html_to_rdfa } = require("@nbittich/rdfa-wasm");

const example = `
<!doctype html>
<html>
<head>
<title>Test 0224</title>
</head>
<body>
<div about="">
<ol rel="rdf:value" inlist="">
<li>git remote add origin git@github.com:nbittich/node-rdfa-wasm-example.git<a href="foo">Foo</a></li>
<li><a href="bar">Bar</a></li>
</ol>
</div>
</body>
</html>
`;

console.log(html_to_rdfa(example, "http://data.lblod.info", ""));
```

### Web usage (not published on npm yet):

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

0 comments on commit 2121fd2

Please sign in to comment.