Comments (8)
I've just released version 1.2.0 which fixes CSV output. Thank you for the bug report!
from icalpal.
Hello!
Could you tell me which options you're using?
I suspect the problem occurs when some rows don't have the same fields as others. I see similar behavior with my own calendar.
from icalpal.
I've been limiting the results to specific calendars, and setting the date format, like so:
icalPal events --from 20240301 --to 20240331 --ic 'Performing Arts' -o csv > test-240402-1.csv --df %Y-%m-%d
Two additional observations:
- Initially I ran an export for several calendars at once. When I run separate exports for each calendar, each seems to have a slightly different set of columns. They're all CALDAV calendars associated with my google account, so I can't think why they'd yield such different results.
- If I try to select only certain columns for export, the additional option has no effect on the output. For example:
icalPal events --from 20240301 --to 20240331 --ic 'Performing Arts' -o csv > test-240402-1.csv --iep sdate, edate --df %Y-%m-%d
. Maybe I'm using that option incorrectly?
from icalpal.
There are a couple changes you need to make to the command.
- When saving to a file, the
> test-240402-1.csv
needs to come last. The shell stops reading arguments when it sees the redirection operator, so any options after that are not getting to icalPal. - Also change
--iep sdate, edate
to--iep sdate,edate
. Remove the space after the comma.
from icalpal.
This is a lot more involved than I anticipated. I assumed a lot more "magic" in Ruby's CSV class than it actually has.
Also, the machine-readable outputs (csv, hash, json, yaml) always print all fields. Many options, including --iep, --eep, and --aep, are ignored. This isn't a problem for hash, json, or yaml; those label every field in every item.
But CSV has one set of labels (the header row) for all items. Any item that has different fields than the first one will look wrong.
It'll take some time to fix. Until then, I suggest using a different format if possible. Or fix the output manually to align the columns.
from icalpal.
Thanks very much for looking into it. I would offer to help work on a fix, but I'd have to start from scratch learning Ruby and I don't have time for that currently. I wonder how tricky it would be to add an xml output option? I'm trying to streamline a workflow using a particular WP import plugin that only accepts csv and xml files. Perhaps there's a utility for easily converting yaml to xml -- I'll go look -- but it would be super to not have to add another step.
from icalpal.
Thanks so much! Sorry for the slow reply. I'll try it out today!
from icalpal.
Works like a charm! Thanks again :-)
from icalpal.
Related Issues (10)
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 icalpal.