Colobot Forum - International Colobot Community
[Idea] Convert ingame C-BOT Language reference to HTML - Printable Version

+- Colobot Forum - International Colobot Community (https://colobot.info/forum)
+-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76)
+--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58)
+---- Forum: General (https://colobot.info/forum/forumdisplay.php?fid=59)
+---- Thread: [Idea] Convert ingame C-BOT Language reference to HTML (/showthread.php?tid=948)



[Idea] Convert ingame C-BOT Language reference to HTML - krueger - 10-11-2017

Got an idea to convert language reference and help into HTML and, then, to bookmarked PDF with table of contents to print it as paper manual for my kid. Written simple script, doing the conversion job for aprox. 85%, but stuck on some Colobot tag meanings and sequences, for example - \key and \c... \n sequences.

Is there any description of tags?

And, at all, may be this could be good idea to rewrite ingame browser, reference and mission texts to support HTML in way to be able to automatically build book of C-BOT from that source?


RE: [Idea] Convert ingame C-BOT Language reference to HTML - tomangelo - 10-11-2017

Currently we have something like this http://colobot.info/SatComOnline/master/cbot, it reads directly from data files from repository https://github.com/colobot/colobot-data/tree/master/help, so it's always up-to-date. It was easier to make a HTML parser of current syntax instead of rewriting all these pages and engine parser to HTML.
And about tags for converter you have to ask @krzys_h how it works.


RE: [Idea] Convert ingame C-BOT Language reference to HTML - krueger - 10-12-2017

@krzys_h, could be made the variant of code, converting colobot texts to dir structured or CGI like URL and so transformed links in pages? Like
Code:
<a href="http://colobot.info/master/cbot/en/cbot.html">


so tools like Acrobat DC can get root document and batch convert it with references and links to PDF?


RE: [Idea] Convert ingame C-BOT Language reference to HTML - krzys_h - 10-15-2017

@krueger Not in the current form as the help files are downloaded and converted client-side in JavaScript. A script to convert all the docs into a printable PDF sounds like a good idea though.
You can find a somewhat complete documentation of the help file syntax in the README for translators - https://github.com/colobot/colobot-data/blob/master/README.i18n.md