You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+53
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,58 @@ Library for converting CSV files into RDF
3
3
4
4
This Rust-based tool converts CSV data into RDF format, utilizing the `oxrdf` crate for RDF graph handling and `csv` for efficient CSV parsing. Generated triples can either be added to an `oxrdf::Graph` or written directly to file.
5
5
6
+
## Using the xml2rdf CLI
7
+
8
+
This library includes a CLI utility for parsing CSV and generating N-Triple RDF using the `convert` subcommand. The binary can be built using `cargo build`.
9
+
10
+
```bash
11
+
$ csv2rdf convert --help
12
+
Convert CSV to RDF format.
13
+
14
+
The `convert`command parses a CSV file, converts it to RDF triples using `csv`for parsing and `oxrdf` to construct the graph, and saves the output.
15
+
16
+
Usage: csv2rdf convert [OPTIONS]
17
+
18
+
Options:
19
+
-n, --namespace <NAMESPACE>
20
+
Namespace for RDF graph generation.
21
+
22
+
A custom namespace to prefix RDF resources created from CSV columns and rows.
23
+
24
+
[default: https://decisym.ai/csv2rdf/data]
25
+
26
+
-i, --input <INPUT>...
27
+
Path to input CSV file(s).
28
+
29
+
Provide the path to one or more CSV files that will be parsed and converted.
30
+
31
+
-o, --output <OUTPUT>
32
+
Path to output file.
33
+
34
+
Optional: Specify the path to save the generated RDF data. If not provided, data will be written to stdout
35
+
36
+
-h, --help
37
+
Print help (see a summary with '-h')
38
+
```
39
+
40
+
## Using the convert library
41
+
42
+
The conversion functionality can be also be called directly in Rust. The library supports writing results to a file or building an in-memory `oxrdf::Graph`.
0 commit comments