A VS Code extension for converting between CSV on the Web (CSVW) and RDF formats. This extension provides an intuitive interface for bidirectional conversion between tabular data and RDF, following W3C CSVW specifications.
๐ Features
Bidirectional Conversion: Convert between CSVW and RDF formats seamlessly
Visual Tree Interface: Manage multiple conversions through an organized tree view
Auto-conversion: Automatic conversion on file saves for rapid development
CSVW Specification Compliance: Full support for W3C CSVW metadata specifications
Multiple Input Support: Handle multiple CSV files within a single conversion
Template IRI Support: Toggle template IRI generation for RDF output
Minimal Mode: Streamlined output options for cleaner results
Workspace Integration: Seamless integration with VS Code workspace folders
๐ฆ Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Search for "CSVW RDF Converter"
Click Install
Reload VS Code if prompted
๐ฏ Getting Started
Opening the Extension
After installation, you'll see a new activity bar icon (๐) on the left side of VS Code. Click it to open the CSVW RDF Converter panel.
Creating Your First Conversion
Method 1: From Current File
Open a CSV or RDF file in VS Code
Click the Convert Current Window button in the editor toolbar or on the gear button at the top right
Enter a name for your conversion
The extension will automatically set up the conversion structure
Method 2: Manual Creation
Click the Add Conversion button (โ) in the extension panel
Enter a name for your conversion
Default rdf and csv inputs files are created
๐๏ธ Understanding the Conversion Structure
Each conversion creates a folder structure in your workspace:
Open Conversion Fields: Click the folder icon next to your conversion
Edit Input Files: Modify your CSV data and descriptor metadata
Save Files: The extension automatically converts on saving the input files
View Results: RDF output appears in the outputs folder
RDF to CSVW Conversion
Open Conversion Fields: Access your conversion workspace
Edit RDF Input: Modify the rdfInput.ttl file
Configure Descriptor: Set up CSVW metadata for desired CSV structure
Save and Convert: Automatic conversion generates CSV files
Advanced Features
Multiple CSV Files
Use Add Another Input to include multiple CSV files in one conversion
Each file is processed according to the descriptor configuration
Template IRIs
Toggle Template IRIs to control IRI generation patterns
Useful for creating consistent URI schemes across datasets
Minimal Mode
Enable Minimal Mode for cleaner, more compact RDF output
Reduces verbosity while maintaining semantic accuracy
๐๏ธ Extension Commands
Tree View Commands
Command
Icon
Description
Add Conversion
โ
Create a new conversion workspace
Open Conversion Fields
๐
Open all files related to a conversion
Close Conversion Fields
โ๏ธ
Close all conversion-related tabs
Delete Conversion
๐๏ธ
Permanently remove a conversion and its files
Conversion Commands
Command
Icon
Description
Convert CSVW to RDF
โก๏ธ
Manual trigger for CSVโRDF conversion
Convert RDF to CSVW
โฌ ๏ธ
Manual trigger for RDFโCSV conversion
Validate Specific
โ
Validate current conversion setup
Utility Commands
Command
Icon
Description
Convert Current Window
โ๏ธ
Create conversion from active file
Add Another Input
โ
Add additional CSV input file
Toggle Template IRIs
๐
Enable/disable template IRI generation
Toggle Minimal Mode
๐ฒ
Enable/disable minimal output mode
Clear Red Underlines
๐งน
Clear validation error indicators
Due to the nature of vscode extensions, sometimes not all windows are closed correctly.
For example when you rename your csv table in the descriptor,
new file with this name is created, but sometimes the old one doesn't close.
๐ Working with CSVW Descriptors
The descriptor.jsonld file is the heart of CSVW conversion.
Read about it here: https://www.w3.org/ns/csvw