Code Monkey home page Code Monkey logo

vquery's Introduction

Veracross Axiom Web Scraper

A command line utility to print/save Veracross reports without logging in to Axiom. This tool allows someone to save a report from Axiom's workspace at a specified interval(see config file sample).

How it works:

Print json output to screen.

vquery -config config.toml -report 12345

Not specifying a report parameter will save the reports specified in config.toml to a destination on disk. The utility will run continuously and refresh the report at the interval specified in the config(in minutes).

vquery -config config.toml

Saving a CSV file

To save as a CSV, you can combine the json output with additional command like tools, like jq and json2csv

Example: The example below will save report #163998 as a csv file, using the person_id, first_name, last_name and email_1 fields in the report.

vquery -config config.toml -report 163998 | jq -c '.[]' | json2csv -k person_id,first_name,last_name,email_1 > people.csv

We can do further work like, sorting the results alphabetically by last_name first.

vquery -config config.toml -report 163998 | jq -c '.[]' |json2csv -k person_id,first_name,last_name,email_1 | sort -k 3,3 -t,

Use as a Go Library

If you'd like to use the code as a Go library to extend this proggram, the documentation is available on godoc

package main

func main() {
    // Create a new http client logged into axiom.
	client, err := axiom.NewClient(username, password, school)
	if err != nil {
		log.Fatal(err)
	}

    // the JSON output of the axiom report will be saved to 
    // the resp.Body
    resp, err := client.Report(reportID)
    if err != nil {
        //handle err
    }
	defer resp.Body.Close()
    // Print response to stdout
    io.Copy(os.Stdout, resp.Body)
}

vquery's People

Contributors

groob avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vquery's Issues

vquery for dummies?

hi,
This looks rather exciting . But I have zero experience with ruby and very little with coding. I wonder if you have an explanation for dummies on how to use this.
I assume it can be run from mac terminal? if so, any extra installs that need to be done? Or any steps which I need to take after downloading it, in order to run it?

My apologies for the dummies questions!

ciao, jeroen

empty files

hi,

I got the utility to work but it creates empty files. Did you encounter that before?

ciao, Jeroen

Output Format

Hi Victor, I downloaded this and managed to get it working. This is a great tool !! and I can see huge potential for it. I use the Veracross API extensively, the only problem can be the lack of control as to what fields come through the feed and the need to get Veracross to add feeds for tables that do not have one. The big advantage of your tool is that it puts all of the functionality in your own hands. The one suggestion I would have to improve this is to be able to output the result as a CSV file or as XML. The Veracross API outputs XML. I utilise the data with Filemaker which has a native XML import facility so XML is really easy to use as is CSV. Unfortunately Filemaker and JSON do not play together easily and while it may be possible to find a way to convert the JSON to XML or CSV it would be great if your tool offered the option to do that natively. Thanks for considering the idea and once again well done for the great work. Danny Dawson. The American School in London

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.