Skip to content

Installing csv2rdf4lod automation

timrdf edited this page Aug 4, 2011 · 105 revisions

After installing, be sure to check out A quick and easy conversion by stepping through the Conversion process phases.

What you need

  • Unix-flavor operating system (including Mac OS X Terminal.app or cygwin)
  • Familiarity with command line

Get the code

You can use git to get the code, or you can grab the tarball or zip. We recommend using git, since it more cleanly handles updating (and un-updating). The tarball and zip do provide a crude self-update mechanism (update-csv2rdf4lod-bin.sh), but it is not as eloquent. If you're worried about not knowing git, don't worry -- you only need to know two of its commands (clone and pull).

bash-3.2$ cd ~/Desktop

bash-3.2$ git clone git://github.com/timrdf/csv2rdf4lod-automation.git
Cloning into csv2rdf4lod-automation...
remote: Counting objects: 420, done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 420 (delta 223), reused 300 (delta 159)
Receiving objects: 100% (420/420), 4.57 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (223/223), done.

Install

Go into the directory that git set up and run install.sh:

bash-3.2$ cd ~/Desktop/csv2rdf4lod-automation/
bash-3.2$ ./install.sh 
install.sh:
   has set $CSV2RDF4LOD_HOME to /Users/timrdf/Desktop/csv2rdf4lod-automation in my-csv2rdf4lod-source-me.sh
   created my-csv2rdf4lod-source-me.sh.

What to do next:
   'source my-csv2rdf4lod-source-me.sh' to set environment variables.
    sourcing my-csv2rdf4lod-source-me.sh must be done each time you log in, so consider adding it to your ~/.bashrc.

install.sh will tell you what it did and what you should do next:

bash-3.2$ source my-csv2rdf4lod-source-me.sh
--
CSV2RDF4LOD_HOME                                         /Users/timrdf/Desktop/csv2rdf4lod-automation
CSV2RDF4LOD_BASE_URI                                     http://logd.tw.rpi.edu
CSV2RDF4LOD_BASE_URI_OVERRIDE                            (not required, $CSV2RDF4LOD_BASE_URI will be used.)
...

use cr-vars.sh to see the environment variables that CSV2RDF4LOD uses to control execution flow.

(NOTE: csv2rdf4lod-automation currently provides environment variables as bash; if you'd like support for another shell, vote for the issue on github)

As you're starting, you only need to worry about the environment variable CSV2RDF4LOD_BASE_URI -- change it to your data-hosting site:

bash-3.2$ vi my-csv2rdf4lod-source-me.sh
export CSV2RDF4LOD_BASE_URI="http://your.org"
:wq

(for a description of Base URI and why it is needed, see conversion process phase: name)

After setting CSV2RDF4LOD_BASE_URI in my-csv2rdf4lod-source-me.sh, you don't need to change any more, since install.sh set CSV2RDF4LOD_HOME for you and the rest have good defaults and can be tweaked later as you get more comfortable with converting and publishing.

Make sure you source csv2rdf4lod-automation/my-csv2rdf4lod-source-me.sh in any shell invocation that you try to use csv2rdf4lod-automation -- the environment variables need to be set up.

For some added features, you can walk through Installing csv2rdf4lod automation - complete, but it is not required to get started converting.

Want credit?

To get some credit for your efforts converting and enhancing data, add the URIs for your machine and yourself. This is optional but highly recommended - you could get cited in the future!

export CSV2RDF4LOD_CONVERT_MACHINE_URI="http://your.edu/web/inside/machine/gemini#"
...
export CSV2RDF4LOD_CONVERT_PERSON_URI="http://tw.rpi.edu/instances/notTimLebo"

To see where these values are used, see CSV2RDF4LOD_CONVERT_PERSON_URI.

What's next?

Historical note

(for alternative external descriptions, see csv2rdf4lod Tutorials)

Clone this wiki locally