Giter VIP home page Giter VIP logo

Comments (3)

augustjohnson avatar augustjohnson commented on August 30, 2024

This is a GREAT idea, and definitely needs some design/attention.
What are the use cases here?

I would anticipate that a large 1 time export is more likely than a smaller single-item on-demand export.
This pushes me towards desigining a bulk export feature rather than a new resource.
And if we're doing a bulk export, why not do that at build-time?

That being said, there are some simple use cases that would be one-time exports. The one I have in mind is a button on a monster that's basically "send to Homebrewery" that converts the current item into homebrewery-friendly markdown and pushes it over there. I already have that here though:
open5e/open5e#395

from open5e-api.

Sturlen avatar Sturlen commented on August 30, 2024

And if we're doing a bulk export, why not do that at build-time?

I've been experimenting with this. I create separate json files for each creature during build and host them from the web server as static files. Test is live on https://5e.spetland.no/monsters/a-mi-kuk . Clicking on JSON format at the bottom navigates to the correct json file. Supporting more export formats could be done by converting and storing that format as another option.
image

This does require you to host over a thousand static assets just for the monsters, but so far I've not run into any issues with it. Might need a CDN in the future

from open5e-api.

augustjohnson avatar augustjohnson commented on August 30, 2024

Here's my preferred approach for this:

  • Only export v2 data.
  • Have the tabular data match 1 to 1 with the tables. - I'm pretty sure this can be done on our build agents because they have the sqlite3 cli.
  • Have the data available as an Asset in the release link on github.
  • Have the data automatically added to a given Release.

I'm not sure I know enough about github and releases to automatically do this, but the commands to export should be pretty simple.

from open5e-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.