Skip to content
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

enable downloading log as a CSV #103

Open
jywarren opened this issue Apr 23, 2019 · 5 comments
Open

enable downloading log as a CSV #103

jywarren opened this issue Apr 23, 2019 · 5 comments

Comments

@jywarren
Copy link
Member

jywarren commented Apr 23, 2019

It'd be great to be able to download the log as a CSV! Of course, you can just copy and paste it into a file right now. But still, a one-click button would be nice!

@jywarren jywarren pinned this issue Apr 23, 2019
@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

var csv = connection.history.received.join('\n'); // the CSV data

// old school, but doesn't seem to work for me?

window.open("data:text/csv;charset=utf-8," + escape(csv));

or generate a link: https://stackoverflow.com/questions/17564103/using-javascript-to-download-file-as-a-csv-file

<a href="data:text/csv;charset=utf-8,'+escape(csv)+'" download="webjack.csv">download</a>

We should put the timestamp (and ideally the better-formatted date + time) in the filename; new Date().toJSON().slice(0,10).replace(/-/g,'/'); gets the date, and we can add timestamp after that maybe...

@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

Let's put the button here!

<p class="tools-bottom">
<button class="btn-baud">Change baud</button>
<button class="btn-freq">Change frequencies</button>
</p>

@jywarren jywarren changed the title CSV download of log enable downloading log as a CSV May 5, 2019
@DevanshCodes
Copy link
Member

Hey, if its still open, can I claim it?

@jywarren
Copy link
Member Author

jywarren commented Dec 29, 2019 via email

@sifihog
Copy link

sifihog commented Jan 31, 2020

Hello!
Just wondering if there's been any progress on this? I'd like to submit a pull request if its still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants