1- //! # XML2RDF Converter
1+ //! # CSV2RDF Converter
22//!
3- //! This is a Rust-based tool that converts XML data into RDF format. It uses the `xml-rs ` crate
4- //! for XML parsing and the `oxrdf` crate to construct RDF triples and graphs.
3+ //! This is a Rust-based tool that converts CSV data into RDF format. It uses the `csv ` crate
4+ //! for CSV parsing and the `oxrdf` crate to construct RDF triples and graphs.
55//!
66//! ## Features
7- //! - Parses XML input and converts it to RDF triples
7+ //! - Parses CSV input and converts it to RDF triples
88//! - Supports specifying a custom namespace for generated RDF nodes
99//! - Outputs RDF data to a specified file, oxrdf::Graph or stdout
1010//!
1111//! ## Usage
12- //! Run the XML2RDF converter from the command line. For detailed usage information, run:
12+ //! Run the CSV2RDF converter from the command line. For detailed usage information, run:
1313//! ```
14- //! xml2rdf --help
14+ //! csv2rdf --help
1515//! ```
1616//!
1717//! ## Example
18- //! To convert a XML file to RDF format with a specified namespace and output file:
18+ //! To convert a CSV file to RDF format with a specified namespace and output file:
1919//! ```
20- //! xml2rdf convert --namespace http://example.com/ns# --xml data.xml --output-file output.nt
20+ //! csv2rdf convert --namespace http://example.com/ns# --input data.xml --output output.nt
2121//! ```
22- //! This will take `data.xml `, apply the specified namespace, and save the RDF output in `output.nt`.
22+ //! This will take `data.csv `, apply the specified namespace, and save the RDF output in `output.nt`.
2323
2424use clap:: { Parser , Subcommand } ;
2525use csv2rdf:: * ;
2626
27- /// Command-line interface for XML2RDF Converter
27+ /// Command-line interface for CSV2RDF Converter
2828///
29- /// This struct defines the command-line interface (CLI) for interacting with the XML2RDF converter.
29+ /// This struct defines the command-line interface (CLI) for interacting with the CSV2RDF converter.
3030#[ derive( Parser ) ]
31- #[ command( version, about = "Converts XML data into RDF format." ) ]
31+ #[ command( version, about = "Converts CSV data into RDF format." ) ]
3232struct Cli {
3333 /// CLI command selection
3434 #[ command( subcommand) ]
@@ -37,12 +37,12 @@ struct Cli {
3737
3838/// Supported Commands
3939///
40- /// Contains the available commands for the XML2RDF converter.
40+ /// Contains the available commands for the CSV2RDF converter.
4141#[ derive( Subcommand ) ]
4242enum Commands {
43- /// Convert XML to RDF format.
43+ /// Convert CSV to RDF format.
4444 ///
45- /// The `convert` command parses a XML file, converts it to RDF triples using `xml-rs ` for parsing
45+ /// The `convert` command parses a CSV file, converts it to RDF triples using `csv ` for parsing
4646 /// and `oxrdf` to construct the graph, and saves the output.
4747 Convert {
4848 /// Namespace for RDF graph generation.
@@ -51,9 +51,9 @@ enum Commands {
5151 #[ arg( short, long, default_value = "https://decisym.ai/csv2rdf/data" ) ]
5252 namespace : String ,
5353
54- /// Path to input XML file(s).
54+ /// Path to input CSV file(s).
5555 ///
56- /// Provide the path to one or more XML files that will be parsed and converted.
56+ /// Provide the path to one or more CSV files that will be parsed and converted.
5757 #[ arg( short, long, num_args = 1 ..) ]
5858 input : Vec < String > ,
5959
0 commit comments