SkillAgentSearch skills...

Cattle

Service for converting CSV to the CSVW RDF format using COW

Install / Use

/learn @CLARIAH/Cattle
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

NOTICE: CATTLE used to be a service to run COW on a server. This service has been discontinued, to focus on the development of CoW itself. Please find CoW at https://github.com/clariah/cow/ or install via pip (pip install cow-csvw).

cattle

cattle is a COW Web service

Introduction

cattle is a simple web service to convert CSV files to RDF, using the CSVW compatible library COW

To understand this service please read the COW documentation first. To convert CSVs to Linked Data using this webservice and ruminator, goto http://cattle.datalegend.net

The cattle web service provides the following options (in steps matching the COW 'logic'). You will need to run these commands from a term/shell (in Unix) or the command prompt in Windows.

<!-- ## API command line examples ### Step 1: build a metadata json file Build a metadata.json file containing the conversion script and save it as a file `curl -F "csv=@/home/amp/src/cattle/data/imf.csv" http://cattle.datalegend.net/build > imf.csv-metadata.json` WARNING!: Unlike using COW locally, this will actually OVERWRITE a previous build of your file! ### Step 2: change your metadata file This is something you do locally, so manually edit the `*-metadata.json` file you just created. ### Step 3: convert your csv file using the metadata.json script you created `curl -F "csv=@/home/amp/src/cattle/data/imf.csv" -F "json=@imf.csv-metadata.json" http://cattle.datalegend.net/convert -H'Accept: application/n-quads' > imf.csv.nq` ### Other examples If you just want to print something on your screen and not write them, simply omit the `> ...` part. E.g.: `curl -i -F "csv=@/home/amp/src/cattle/data/imf.csv" http://cattle.datalegend.net/build` `curl -i -F "csv=@/home/amp/src/cattle/data/imf.csv" -F "json=@imf.csv-metadata.json" http://cattle.datalegend.net/convert` `curl -i -F "csv=@/home/amp/src/cattle/data/imf.csv" -F "json=@imf.csv-metadata.json" http://cattle.datalegend.net/convert -H'Accept: application/n-quads'` Please note, that the webservice also allows you to save Linked Data as turtle (contrary to COW): `curl -i -F "csv=@/home/amp/src/cattle/data/imf.csv" -F "json=@imf.csv-metadata.json" http://cattle.datalegend.net/convert -H'Accept: text/turtle'` `curl -F "csv=@/home/amp/src/cattle/data/imf.csv" -F "json=@imf.csv-metadata.json" http://cattle.datalegend.net/convert -H'Accept: text/turtle' > imf.csv.ttl` -->

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated3y ago
Forks2

Languages

JavaScript

Security Score

55/100

Audited on Oct 4, 2022

No findings