AnssiR66 / AlanStdLib

The Standard Library for ALAN Interactive Fiction Language
Other
6 stars 2 forks source link

Include ALAN Assets directly in ISO Encoding #126

Closed tajmone closed 3 years ago

tajmone commented 3 years ago

WIP temp branch: dev-2.2.0-drop-utf8-conv (deleted)

Drop the UTF-8 conversion of ALAN sources and transcripts before their inclusion in ADoc sources:

Transcripts NOTE — We still need the sanitizer script that nicely reformats transcripts into AsciiDoc (player input styles); so we need to decide whether to apply these fixes directly to the original .a3log or if keep using a derivate file (currently using the .a3ADocLog extension inside _assets/utf8/**).


Currently all documents in this project that rely on the include:: directives to import external Alan sources and transcripts need to first convert them from ISO-8859-1 to UTF-8.

In 2019 I had submitted a feature request to enable support for other encodings, which was implemented and made its way into stable releases — but hasn't yet been documented! It's usage is as follows:

include::./somefile.alan[encoding=iso-8859-1]

By skipping the UTF-8 conversion step we'll greatly improve the build speed of the whole project.

See how this was done in the Alan-Docs repository:

References

tajmone commented 3 years ago

@AnssiR66,

this was a rather big change in the toolchain, both in terms of speed improvements in building the docs as well as reducing the toolchain complexity and all the clutter of the intermediate files.

Although I didn't plan to start working again on the StdLib before mid January, I wanted to get this sorted out in view of the changes planned in #103 (i.e. moving the toolchain to a Git submodule that can be shared by all ALAN-related projects, which would reduce drastically future maintenance work).

These changes have been on my TODO list for quite a while, so I finally took a day off to fix it both here and on the Alan-Docs repository:

Now that I can finally see it at work, it's definitely a huge improvement, especially in terms of build speed, but also in terms of less scripts and complexity to deal with (which is going to make the next steps toward #103 much easier).

I hope you and @thoni56 are enjoying the season holidays, and wish you a happy 2021!

AnssiR66 commented 3 years ago

@tajmone Thanks for taking care of the issue. All the best for 2021 as well!

thoni56 commented 3 years ago

Ditto to you guys too!