xsr
xsr copied to clipboard
Use an external template file for HTML
The lot heredoc look ugly
Alternative: Use a HTML DOM library
So
- The code woul be much clean
- It would be easier to costumize
I've tried to solve this issue. I've come up with a few notices:
- The localization of the program interface and the output file should be split. What if the user wants to translate the recording into different languages, for ex. to make a tutorial?
- It's really hard to do it by hand. I prefer using Mustache (since it's my best idea currently), and it looks like that requires JSON (works with JSON), so again, #77 first.
I think it's time to merge localization, because it looks like we should suspend working on that area. But not to close!
@lezsakdomi I have an idea that I'm going to try sometime which might work without any external libraries. I'm not entirely sure yet, but I want something like an HTML document which has metadata after the DOCTYPE telling xsr where to store html data.
Sorry, it was long ago. Now I think, this break that the script is self-contained. Do not rely on any costum external files, or write nice code and use libraries. Maybe it's better to have a rewrite of this script later, which follow the latter philosophy. Or maybe store those templates in external files, but create a Makefile which compiles them into the main executable.
Follow the same philosophy in #80
I recommend closing this branch and issue. Do you agree, @nonnymoose ?