Comments (9)
+1
from csvkit.
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.
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.
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.
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.
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.
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.
@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.
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)
- csvgrep is always returning first line in data file even when it doesn't match anything in pattern file HOT 1
- csvstat: Add option to remove thousands separator HOT 8
- csvlook 1.0.7 now issue "Error sniffing CSV dialect" warning HOT 1
- Convert excel xlsx with merged row cells to csv HOT 2
- in2csv ignores escapechar, doesn't report the problematic location in input HOT 2
- Question: how to work with two headers with csvstack? HOT 1
- csvsql: Add option to use ON CONFLICT DO NOTHING/UPDATE HOT 2
- error with python 3.11 HOT 3
- csvsql does not work with simple csv file HOT 4
- in2csv --date-format not handling xls DD-MMM date formatted column HOT 1
- SQLAlchemy 2.0 breaks sql2csv (maybe other stuff, too?) HOT 5
- CSV based DDL Command HOT 1
- conversion to TSV without double doublequotes (") HOT 12
- csvstat does not accept a date-format argument HOT 1
- FR(csvformat): support NULL line terminator HOT 1
- Dialect Sniffer warning on innocuous operation(s) HOT 3
- csvstat: Calculating mean for columns that have non-numerical exceptions HOT 1
- Can the output of default headers (a,b,c,...) be suppressed when specifying the --no-header-row option? HOT 2
- sql2csv is buffering the output instead of outputting data as it comes HOT 3
- Update documentation to use the built-in function `next()` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csvkit.