Skip to content

Script: source me.sh

Tim L edited this page Aug 8, 2013 · 38 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)

Simple use

Created once during installation, my-csv2rdf4lod-source-me.sh sets the CSV2RDF4LOD environment variables used to control how csv2rdf4lod-automation invokes conversions. As described in the [installation documentation](Installing csv2rdf4lod automation), most default settings are adequate and very few need to be changed. Adding source /path/to/my-csv2rdf4lod-source-me.sh to your .bashrc will ensure that the environment variables are always available. You can edit my-csv2rdf4lod-source-me.sh to suit your regular needs, or you can manually change the environment variables within an individual shell using Unix's export command.

Seeing the current environment variables

The script [cr-vars.sh](https://github.com/timrdf/csv2rdf4lod-automation/wiki/Script: cr vars.sh) will list the values for each environment variable and provide an indication about how it will be treated (e.g., not required, or will default to: false).

Minimal environment variables setup

If for some reason you want to set up the environment variables yourself (instead of using the my-csv2rdf4lod-source-me.sh created during installation), include the following in your ~/.bashrc.

export CSV2RDF4LOD_HOME=/opt/csv2rdf4lod-automation
export      PATH=$PATH`$CSV2RDF4LOD_HOME/bin/util/cr-situate-paths.sh`
export CLASSPATH=$CLASSPATH`$CSV2RDF4LOD_HOME/bin/util/cr-situate-classpaths.sh`
export CSV2RDF4LOD_BASE_URI="http://logd.tw.rpi.edu"
export CSV2RDF4LOD_CONVERT_PERSON_URI="http://your.name/myuri#"

Project-specific environment variables

When invoking the conversion trigger from the conversion cockpit, the variables in csv2rdf4lod-source-me.sh will be set to apply to this specific project.

$ cr-pwd.sh 
source/data-rpi-edu/research-centers/version/2011-Oct-18

$ cr-pwd-type.sh 
cr:conversion-cockpit

$ cr-vars.sh | grep COMPRESS
CSV2RDF4LOD_PUBLISH_COMPRESS  true         # This will be overridden by ../csv2rdf4lod-source-me.sh 

$ cat ../csv2rdf4lod-source-me.sh 
CSV2RDF4LOD_CONVERT_OMIT_RAW_LAYER="true"
CSV2RDF4LOD_PUBLISH_COMPRESS="false"       # This will be used when converting

my-csv2rdf4lod-source-me.sh should go under version control with the rest of your project, along with the [data root](csv2rdf4lod data root) and skeleton.

Historical naming

source-me.sh was renamed to my-csv2rdf4lod-source-me.sh to help make it clear that it sets up csv2rdf4lod for your system.

Comments in source-me.sh

The following comments are placed in csv2rdf4lod-source-me.sh scripts to provide links to appropriate documentation. RDF can be extracted from these using tic turtle in comments.

#3> <#> a <http://purl.org/twc/vocab/conversion/CSV2RDF4LOD_environment_variables> ;
#3>     rdfs:seeAlso 
#3>     <https://github.com/timrdf/csv2rdf4lod-automation/wiki/CSV2RDF4LOD-environment-variables-%28considerations-for-a-distributed-workflow%29>,
#3>     <https://github.com/timrdf/csv2rdf4lod-automation/wiki/Script:-source-me.sh> .

What is next

Clone this wiki locally