Giter Club home page Giter Club logo

Comments (9)

palewire avatar palewire commented on May 31, 2024

+1

from csvkit.

acompa avatar acompa commented on May 31, 2024

This one would be big. First thought: add a '-g' arg to the csvkit utilities, then use Google's googlecl tools to access the CSV file. Every csvkit utility takes a file argument, so I wonder if this is the best route.

Maybe a "csvgdoc" utility that wraps googlecl into csvkit? I'm not sure about this--it might be better to let the user find googlecl on their own (or with a note in the documentation).

from csvkit.

onyxfish avatar onyxfish commented on May 31, 2024

I think what I would like to do is support URLs wherever we support
filenames on the command line and then automatically fetch content the
CSV when a url is provided. This would allow us to support CSVs that
aren't stored locally as well. I believe there is already a python
library that does most of this, though my Google-fu is mostly failing
me.

Of course, this would only allow for fetching published GDocs files,
which might not be a reasonable limitation. Also, I'm not sure how
(syntactically) we would andle writing to Google Docs, but that may be
outside the scope of the csvkit anyway. (I suppose we could have a
csvgdoc that pipes data up to google docs, but I'm not sure I want to
go down the road of supporting infinite outputs each with their own
utility.)

Thoughts?

On Wed, May 4, 2011 at 9:33 AM, acompa
[email protected]
wrote:

This one would be big. First thought: add a '-g' arg to one csvkit utility, then use Google's googlecl tools to access the CSV file.

Every csvkit utility takes a file argument, so I wonder if this is the best route. Maybe a "csvgdoc" utility that wraps googlecl into csvkit? I'm not sure about this.

Reply to this email directly or view it on GitHub:
#48 (comment)

Christopher Groskopf
@onyxfish
News Applications Developer
Chicago Tribune

from csvkit.

acompa avatar acompa commented on May 31, 2024

I couldn't tell you if that kind of module exists...

If we support URLs I could definitely write something that visits a URL, saves the CSV file, then works with it. Does that create a potential security risk, though?

-Alex

from csvkit.

haridsv avatar haridsv commented on May 31, 2024

I was working on something similar as a standalone package called logtogss and have something working here: https://github.com/haridsv/logss

I started with an existing project and added better support for column detection and mapping on the google spreadsheet side.

from csvkit.

sbma44 avatar sbma44 commented on May 31, 2024

I'm taking a pass at the writing-to-Sheets side of this; will hopefully have a PR soon, might need some help getting proper tests up in tox

from csvkit.

eyeseast avatar eyeseast commented on May 31, 2024

I like the idea of making it easier to work with Google, but if we're just talking about supporting fetching CSV data from URLs, is this any different from just using curl?

curl http://example.com/somefile.csv | csvcut -c 1,2,3 | csvstat

from csvkit.

sbma44 avatar sbma44 commented on May 31, 2024

@eyeseast I'm focusing on putting data into Google Sheets from the command line, not retrieving it from there (though that would be doable as well)

from csvkit.

jpmckinney avatar jpmckinney commented on May 31, 2024

Re: reading CSVs from web, @eyeseast is right to suggest just using Unix piping with a utility like curl.

Re: writing CSVs to the web, I think that should also just be the responsibility of some utility that takes a CSV as STDIN and writes it to whatever services it supports. I don't think csvkit should know about authentication with Google Spreadsheets or whatever else. For example, s3cmd allows uploading to S3 from STDIN. A Google Spreadsheets command-line tool can follow the same design.

from csvkit.

Related Issues (20)

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.