Giter VIP home page Giter VIP logo

kobo_api's Introduction

kobo_api

This repo will feature sample code/snippets to pull or push data (or form definitions) using the new KoBoToolbox API

purge-all-assets.py

This snippet allows quickly deleting multiple assets from the command line and is useful if the user has many test or draft forms.

get_csv.py

get_csv.py is a command line script written in Python that allows users to

  • Create a new export for a given kobo asset (project)
  • Allows customizing the export with all available options (can be passed as arguments)
  • Get a list of all previous exports
  • Get the URL of the most recent export
  • Uses basic authentication (username and password), which can be entered into the file or saved as an environment variable

Usage instructions

  • Requires Python on your computer/virtual machine.
  • Download the file or clone the repository
  • Edit the four variables specific to your account and project. Note that koboassetid refers to the unique string included in the URL of the project, e.g. https://kobo.humanitarianresponse.info/#/forms/aLLE5AEVsxzwiBCcinzWrF/summary.

The script has four commands:

  • python get_csv.py create to generate the default export (xml values, csv format, all versions included, don't show group hierarchy, separate groups/select_multiple options with /).
    • These defaults can be changed here, or they can be overriden with flags (e.g. create -t csv -l 'English (en_US)' -f true
  • python get_csv.py latest to get a URL to download the most recent export
  • python get_csv.py list to see a list of all previously created exports

For help run python get_csv.py -h

We'd love an R version of this script.

Help needed!

We would love contributions of other scripts for other purposes (R, Python, or other languages) that can be used as standalone scripts for other users.

kobo_api's People

Contributors

jnm avatar noliveleger avatar tinok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.