daem-on / wtherion

A web-based Therion map editor
https://daem-on.github.io/wtherion/
MIT License
17 stars 2 forks source link

The format of data files is not the plain text #25

Open martinsluka opened 6 months ago

martinsluka commented 6 months ago

The format of data files is not the plain text as in Therion. It has many reasons in Therion.

daem-on commented 6 months ago

Hello, thanks for creating this issue.

All files that you can produce with wtherion are text files. Depending on what you mean by "plain text", they are not plain text files, meaning they have a set format that can be parsed by machines. Therion's .th and .th2 files also have a set format, so by that definition they are not "plain text".

There are two ways you can produce files in wtherion:

The .th2 format is certainly more human-readable than JSON, but you can edit both of them with a simple text editor (like XTherion's text editor interface).

Here's which buttons correspond to saves and exports in wtherion:

image

If you want a .th2 file you should click Export. This is basically the same as saving in XTherion.

Here's an example of your biely_dom_3 file as a save, and as an export:

biely_dom_3.zip

The .json file is the save, the .th2 file is an export.

Hope this clears things up.

martinsluka commented 6 months ago

There is the problem. Exported .th2 is different from original .th2. Check attached screenshot.

Martin

28. 4. 2024 v 20:12, Zih Csongor @.***>:

Hello, thanks for creating this issue.

All files that you can produce with wtherion are text files. Depending on what you mean by "plain text", they are not plain text files, meaning they have a set format that can be parsed by machines. Therion's .th and .th2 files also have a set format, so by that definition they are not "plain text".

There are two ways you can produce files in wtherion:

saves, which are text files in the JSON format, and exports, which are text files in the .th2 format The .th2 format is certainly more human-readable than JSON, but you can edit both of them with a simple text editor (like XTherion's text editor interface).

Here's which buttons correspond to saves and exports in wtherion:

image.png (view on web) https://github.com/daem-on/wtherion/assets/6278171/106ded9f-22ab-4702-a83f-873e3fc9d7fa If you want a .th2 file you should click Export. This is basically the same as saving in XTherion.

Here's an example of your biely_dom_3 file as a save, and as an export:

biely_dom_3.zip https://github.com/daem-on/wtherion/files/15143127/biely_dom_3.zip The .json file is the save, the .th2 file is an export.

Hope this clears things up.

— Reply to this email directly, view it on GitHub https://github.com/daem-on/wtherion/issues/25#issuecomment-2081583853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW2U7WFXIQGQI7IISJ4S6DY7U3ZVAVCNFSM6AAAAABG42DQ4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGU4DGOBVGM. You are receiving this because you authored the thread.

daem-on commented 6 months ago

Yes, if you import .th2 files and export them, it's not guaranteed that you will get the same file, although they will be in the same format and they will be text files. It's also guaranteed that they will have the same content (semantically).

I can't see the screenshot you've attached, I think because you sent it as an e-mail, please try uploading it on GitHub. If the screenshot shows an actual difference in content and not just formatting, that's an error in wtherion that can be fixed.

I've also implemented an option in wtherion to have the exported .th2 files be closer to XTherion output (indentation, number formatting), which you can use if you also work with XTherion and want minimal changes between them. You can enable this option in File > Configuration > Export Format.

Hope this helps.

martinsluka commented 6 months ago

This could be a problem in large projects, when several people work on it and share data by VCS as Git. But thank you for improved export of  .th2 files. MartinOdesláno z iPhonu29. 4. 2024 v 9:28, Zih Csongor @.***>: Yes, if you import .th2 files and export them, it's not guaranteed that you will get the same file, although they will be in the same format and they will be text files. It's also guaranteed that they will have the same content (semantically). I can't see the screenshot you've attached, I think because you sent it as an e-mail, please try uploading it on GitHub. If the screenshot shows an actual difference in content and not just formatting, that's an error in wtherion that can be fixed. I've also implemented an option in wtherion to have the exported .th2 files be closer to XTherion output (indentation, number formatting), which you can use if you also work with XTherion and want minimal changes between them. You can enable this option in File > Configuration > Export Format. Hope this helps.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>