Giter Site home page Giter Site logo

gut's Introduction

gut is a way to use publicly hosted web services to convert data between different formats

A gut web service (essentially a WebHook) has the following attributes:

  • accepts POST data containing a file or other data (such as CSV)
  • turns the incoming data into some other data format (e.g. an array of JSON objects)
  • sends the converted data back to the URL specified by the incoming requests HTTP "X-callback" header

That's it!

An example:

I'm writing a web app concerning public/open data and I want to allow people to upload CSV spreadsheets. Instead of writing a CSV parser from scratch i'm just going to use a gut-compatible CSV-to-JSON server that some nice person wrote.

Given I have the following file, cats.csv:

name,appearance
chewbacca,hairy
bill,nonplussed
bubbles,relaxed

I can convert my file to JSON using curl:

curl -X POST someniceperson.com/csvconverter5000 -H "X-callback: http://cat-information.com" --data-binary @cats.csv

My server (cat-information.com) will receive the following HTTP POST:

POST / HTTP/1.1
host: cat-information.com
content-type: application/json
content-length: 186
Connection: close

{"headers":[{"name":"name"},{"name":"appearance"}],"rows":[{"name":"chewbacca","appearance":"hairy"},{"name":"bill","appearance":"nonplussed"},{"name":"bubbles","appearance":"relaxed"}]}

Currently a CSV to JSON, and Spreadsheet to {JSON,CSV} gut services are implemented, but you are encouraged to fork and add your own simple gut servers for common open data transformation formats. Check the wiki for the current list.

Want to contribute? Please consider adding more gutters:

  • ESRI Shapefiles and File GeoDatabases (.shp)
  • MSOffice (.doc, .docx etc)
  • SQL dumps (.sql)
  • Address geocoder to lat/lng ("123 fake street")

BSD LICENSE

gut's People

Contributors

max-mapper avatar lukec avatar bmount avatar

Watchers

JT5D avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.