-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export data as CSV #96
Comments
This is a great idea! Thanks! |
yeah, while I really like having control of my data, it would be nice to be able to sync the invoices through dropbox or similar (hence the need for an export format) relevant: https://twitter.com/levelsio/status/940548460847144960 |
Im new to contributing and have never worked with Electron before so please be gentle 😄 I tried to look into this, using pouchdb-replication-stream and node-memorystream to convert the PouchDB to JSON in memory before writing to a file (Export / backup). Im using There are two pouchDB's ( The Problem occured when I want to import this exported CSV file because I must first convert it to JSON. When using csvjson the input JSON and output JSON are not the same 😞 So the question: Do you know of any |
@AlphaStyle Hey, sorry for the delayed response. Any updates on this so far? |
I have to admit I haven't done much since last time I wrote. As of right now I can export everything to one single CSV file. (The import logic is there, just not working cause of I guess I could try and write my own |
So |
Definitely a good exercise, and you'll help lots of other fellow developers with it 👍 |
@AlphaStyle What about https://www.npmjs.com/package/csv-to-pouch module? |
But you'll only need |
Unfortunately csv-to-pouch won't work for my approach because Manta uses two PouchDB's (Invoices and Contacts) and csv-to-pouch does not return the JSON, only add it directly to PouchDB (please correct me if I am wrong). I am hoping we can continue to have only one exported CSV file to maintain the simplicity for the end-user. Maybe I should provide more information / pictures of my issue so people can know exactly what I am strugling with 😄 I might have it all wrong though, maybe I am over thinking it. PouchDB dump, here you can see an example of the JSON I get from PouchDB dump. In theory all I need is the docs objects because they are the ones with the important content, but as of right now I save EVERYTHING. |
@hql287 Ok, let me just double check it works and then I will PR it :) |
oh dumping the entire pouchdb probably won't work: a csv is more or less an array of JSON objects. So what you really want is only the docs. We don't really about all the metadata (I would even remove the Then the |
👍 This is what I would do, too. |
Im only storing the docs now. Still not working the way I want it :/ Do I need permission to make a pull request or am I doing something realy wrong? |
if you have a fork, no. What does your JSON look like? |
I really wanna do a pull request so you guys can see for yourself 😄 ERROR: Permission to hql287/Manta.git denied to Alphastyle. I have never experienced this 😞 |
Well, then you're in luck today, haha. Kidding aside, here's how you would do it:
|
Don't worry, we all start somewhere. |
I am sorry for super late reply! I did not know about the fork approach. I will read the guide and make a PR 😄 |
I think @mathieudutour has a point. CSV is ok for human readability, and its fine to export it with a click on a button. But additionally some realtime json export to a folder set in the settings of the app, would be what i'm more interested in. So that you can watch the folder for filechanges with whatever syncing tool you'r using :) And automatically importing/syning the files on app start, if they exist. Opinions? |
Sounds interesting. One of the reasons that I chose @AlphaStyle has already been working on this for some time. You might want to take a look here: #143. |
Absolutely! Just wanted some feedback before starting a new feature request :) |
Sure, will get back to this after I'm done with releasing a v1.1.3 |
Is it a bug or a feature request?
Which version are you using?
Which is the version/distribution of the OS?
Win10 64 bits
Describe your issue
First of all, thank for this very promising app.
IMO adding a way to export invoices data in a human-readable format (such as CSV) would make the app more reliable for users, who don't want to loose their data if the app is discontinued one day.
Adding a way to perform this export automatically (each time an invoice is saved, for example), or with a command which could be included in a cron job, would be even better, since it would allow to backup data periodically.
The text was updated successfully, but these errors were encountered: