Skip to content

Commit

Permalink
✨ generate csv and zip file server side (#3613)
Browse files Browse the repository at this point in the history
This PR adds functionality to generate a CSV file on the server in a CF worker for the data of any chart. It also allows downloading a metadata.json file, a readme.md and a zip file of all three of these things. 

This is in preparation of surfacing these things in the download UI of grapher in the upcoming cycle 2024.6 (#4015). This PR does not make any use of the new CF functions endpoints yet and the download UI is not yet changed. 

This PR implements #3648 

## Testing

To test this, try http get requests against `/grapher/SLUG.zip`, `/grapher/SLUG.csv`, `/grapher/SLUG.metadata.json` at localhost:8788, or at the staging server linked below.

There is also an observable notebook that lets you browse the generated readme files in an easier way: https://observablehq.com/d/d410e9b2d2b7c330
  • Loading branch information
danyx23 authored Oct 10, 2024
2 parents 61de17b + 97595f0 commit 5744b4b
Show file tree
Hide file tree
Showing 15 changed files with 846 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@
"restart": true
},
]
}
}
Loading

0 comments on commit 5744b4b

Please sign in to comment.