AsherGlick / ResourceCalculator

A Video Game Resource Calculator
https://resourcecalculator.com
GNU General Public License v3.0
56 stars 30 forks source link

.xls Support #96

Open DaCrazyRaccoon opened 1 year ago

DaCrazyRaccoon commented 1 year ago

Currently, when using tools like Litematica, it can be challenging to keep track of the instructions and resources needed. To make it easier for users, I propose adding support for Excel spreadsheets to Resource Calculator. Since Litematica can already export in a .xls format It would help a ton to be able to import said spreadsheet to Resource Calculator to automatically get the Instructions on how to get the base ingredients for our schematics.

AsherGlick commented 1 year ago

I like the idea of a generic spreadsheet import/export. Another option could be creating a tool that converts some format into a resource calculator URL would not be too difficult. For litematica specifically someone already created: https://resourcecalculator.com/minecraft/plugins/litematica/ but it will rely on the community to fix any issues that might arise now or in the future.

Excel spreadsheet files (pre 2007.xls or post 2007 .xlsx) are much harder to parse than the .csv format though. So if I end up implementing this it would probably be CSVs not Excel files. If someone else implements an Excel file parser and submits it as a PR, care would need to be taken to make sure that whatever libraries are used do not slow down initial page load or processing time. Meaning that they should probably be loaded only when a user attempts to access the import functionality.

More to consider is the nature of the format of the spreadsheet. Supporting a single format is fine but supporting a large number of different formats will quickly become unmaintainable. Planned for the future is a move away from resource names and to unique IDs, this is to get around the issue of items changing names or sometimes exchanging names with each other. Any data export resource calculator offers would include those IDs, likely in addition to the names at the time.

Your idea of marking completed lines off the instructions is a good QoL idea, it should be a separate github issue though to keep track of it more easily.

DaCrazyRaccoon commented 1 year ago

To be honest, I completely forgot that Litematica can also export in the materials as a .txt file. As for the .xls files I think I meant .csv at first, I just use excel to modify my current lists.

I will also be modifying this issue to remove the marking of lines and will be making it another issue