seri/gettc

HTML processing for ascii "images"

Closed this issue · 2 comments

There are quite a few topcoder problem descriptions that contain ascii "images", that is, 2D images made of purely ascii symbols. Some examples are "ChessCover" (ID 202), "Checkers" (ID 204) etc. For these cases, those ascii images are distorted in the HTML files converted by gettc.

I guess using ascii symbols to display 2D images in HTML files is awkward anyway. So never mind if it's not easy to handle such cases. Thanks!

I found that what topcoder did was to quote the whole problem description using HTML tag "<pre>" (verbatim). So it is very difficult for a script to tell wether the HTML includes a 2D ASCII image or not. On the other hand, if gettc does the same, the resulting HTML won't be portable enough to fit on small screens on smartphones or 6" ereaders. Therefore this issue is really a design issue (or feature?) of topcoder, and we can't do much about it. Fortunately, problems with 2D ASCII images are only a small fraction of topcoder archive, and we can always go back to the original topcoder website to read the correctly displayed version. Thus I have closed this issue. Thanks!

seri commented

Yes, it's exactly like you observed. I suppose TopCoder once did pre but they then upgraded the system.
Anyway, you can always open the markdown file in the same directory as the html file with a fix-width font, possibly in the same editor that you use to write the solution code.