Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Leiningen plugin for Grafter Pipelines

License

NotificationsYou must be signed in to change notification settings

Swirrl/lein-grafter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This project is deprecated after grafter.pipelines was removed fromgrafter and grafter.tabular.

It should still be usable in grafter versions prior to 0.8.12.

lein-grafter

Adds some convenient commandline tools for listing and runningpipelines in a grafter project.

Usage

Put the following into the:plugins vector of your grafter projectsproject.clj e.g.

:plugins [[lein-grafter"0.3.0"]]

Once this is done the following command line features will becomeavailable:

Listing Pipelines

Then inside a grafter pipeline that defines some pipelines withdefpipe and/ordefgraft you can list pipelines like this:

$ lein grafter listtest-project.pipeline/convert-persons-data                   data-file                      ;; An example pipeline tabular pipelinetest-project.pipeline/convert-persons-data-to-graph          data-file                      ;; A pipeline generating linked data

Running Tabular Pipelines

You can run the pipelines with the commandlein grafter run. Pipe'sexposed withdefpipe yield tabular output and can be used to convertthe file into csv, xls or xlsx (Excel formats) by for example running.Note how grafter infers the format from the output files fileextension.

$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.csv$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.xlsx$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.xls

Running Linked Data Pipelines (Grafts)

To output linked data (RDF) you must call a graft (a pipeline thatconvertstabular data -> linked data). Like withdefpipe graftsmust be exposed to the plugin withdefgraft.

They can be run in the same way as pipes e.g to output linked data asturtle:

$ lein grafter run test-project.pipeline/convert-persons-data-to-graph ./data/example-data.csv example-output.ttl

... or as n-triples:

$ lein grafter run test-project.pipeline/convert-persons-data-to-graph ./data/example-data.csv example-output.nt

Supported formats for triples and their file extensions are:

  • n-triples.nt
  • turtle.ttl
  • n3.n3
  • rdf xml.rdf

Supported formats for quads and their file extensions are:

  • n-quads.nq
  • trig.trig
  • trix.trix

License

Copyright © 2014 Swirrl IT Ltd

Distributed under the Eclipse Public License either version 1.0 or (atyour option) any later version.

About

A Leiningen plugin for Grafter Pipelines

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp