Batch MS DOS ASCII to Web Converter Script 2

Categories: ASCII, text art, Tools
Tags: No Tags
Comments: 1 Comment
Published on: January 25, 2010

This is an update to my?? little script that converts MS DOS ASCII files, such as NFO’s?? or FILE_ID.DIZ text files (Code Page 437, USA) to ASCII files with HTML encoded Unicode characters and also to Unicode text for the use in MS Windows. The HTML encoded ASCII files can be used to display the ASCII art, specifically the “High ASCII” or block ASCII art on a web site. The script is written in VBScript, but the release package also includes a Windows executable, which is the VBScript converted via VBSEdit by Adersoft.

I used the same script to prepare the ASCIIs in my text art galleries on my web site, such as:

just to name a few.

You can download the script here: ?? ROY-BATCHCONVERT-ASCII2WEB2.ZIP (700KB)

The Release NFO File :)



      ??????????????????                                        ???????????????     ???????????????                 ??????                               
  ??????????????????????????????????????????               ???        ??????     ?????????????????????????????????????????????????????????????????????       ?????????????????????????????????                                      
    ????????????    ???????????????           ????????????    ??????????????????  ??????????????????????????? ???????????? ????????????    ????????????    ?????????????????????  ??????????????????                                         
    ????????????     ???????????????         ???????????????   ????????????????????? ?????????????????????   ????????????????????????       ????????????  ???????????????    ??????  ???  ???                                          
    ????????????    ??????????????????  ????????????????????? ????????????   ????????????????????? ???????????????     ???????????? ?????????      ??????????????? ???????????????     ???   ???  ???                                           
    ????????????  ????????????????????? ???????????????  ?????????????????????   ??????????????????   ???????????????    ???   ????????????????????????  ??????????????? ????????????      ?????????????????? ???                                           
   ?????? ???????????????????????????  ????????????   ???????????????????????????  ???????????????  ????????? ????????????????????????  ???????????????  ??????????????????????????? ????????????            ??????  
   ???    ???  ?????? ????????? ??????    ?????????????????????????????? ??????????????? ??????  ??????    ??????????????? ?????????       ??????????????? ????????????      ???       
  ??????    ??????  ???   ?????? ??????  ????????????????????? ??????????????????????????? ??????   ???      ?????????????????????        ??? ?????? ???????????????     ?????????     
  ???      ??? ??????   ?????? ??????????????????????????????     ??????????????????  ???????????????      ???????????? ??????       ??????  ???  ????????????     ???????????? 
 ?????????????????????????????????     ??? ??????????????????????????? ?????????     ????????????  ???????????????   ???????????????  ??????       ???   ???   ??????????????????  ???????????? 
         ??????      ???    ???????????? ??????   ?????????   ????????????   ??????????????????????????????   ??????     ??????    ???     ?????????????????????????????? 
       ??????        ??????      ??????        ?????????????????????                ???    ??????      ???        ????????????????????? 
      ???           ???     ??????           ????????????                      ???????????????????????????              ??? 
     ???            ???       ????????????     ???????????????                                          Roy                  
      ??????????????????????????????  ???           ???????????????                            ???????????????????????????  ????????????   ??????                                                                                                
                ?????????                                           ???????????? ?????????  ???????????????????????? ????????? ?????? ????????????                                                                                                                                                                                                                                                        
                                                             ?????????   ???   ?????????   ???????????? ?????????????????? ?????????  
                                                          ????????? ??????   ???  ?????????    ???????????? ??????  ???  ?????????  
                                                          ??????????????????   ????????? ???     ???????????? ??????     ?????????  
                                                           ?????? ???????????? ????????? ???????????????????????????  ??????     ?????????  
                                                              ????????????????????????  ?????????????????????  ?????????     ???????????? 
                                                                   ???       ??????    ???       ???    
                         Roy/SAC presents

    ??? ??? ?????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????  ?????????????????????????????? ?????? ??? ???
    ???                 Batch ASCII to Web File Converter 2                       ???
    ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
     ?????????                                                                     ?????????
       ??????          Packaged and Released on January 25, 2010                 ??????
        ???                                                                   ???
      ??????                                                                     ??????
     ???                                                                         ???
      ????????                                                                   ????????
                                                ???
                                               ??????  ????????
     ??????????????????????????????? ??????????????????????????????????????????????????       ?????????????????????????????????????????????????????????     ??? ??? ?????? ???????????????????????
     ??????????????????                       ???????? ????????     ??????????????? ?? ??? ???????????????????????????      ???  ??????????????????
       ?????? ??????     Release Notes    ...       ??? ?????????????????? ?????????????????????????????? ??? ????????     ?????? ??????
        ???   ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????  ????????????????????????????????????????????????????????????   ???
      ??????                                      ????????????         ???                 ??????
     ???                                        ?????????                              ???
      ????????                                      ??????                           ????????

              A little script that converts MS DOS ASCII files, such as NFO's
              or FILE_ID.DIZ text files (Code Page 437, USA) to ASCII  
              but HTML encoded files that can be used to display the ASCII
              art, specifically the "High ASCII" or block ASCII art on a
              web site or to Unicode Text files for the use in Windows Apps. 


     ??????????????????????????? ??? ???????????? ???????????????????????????   ???????????????????????????  ??? ????????? ??? ????????? ??????????????? ??? ???????????????????????????
     ??R??E??L??.??  ??? ???????????? ??????????????????????????? ????????????????????????????????? ??? ????????? ??? ????????? ???????????? ???  ??2??0??1??0??
     ????????????????????????????????? ??? ????????? ????????? ??????????????? ??? ????????? ??? ????????? ?????? ???????????????????????? ????????? ??? ?????????????????????????????????
                    ?????? ????????? ??? ????????? ??? ?????????????????????????????????  ???????????????????????? ??????
                       ?????????   ????????? ???  ???????????????????????????  ????????????????????????


              For example the small logo above (which is in DOS ASCII Format)
              would be converted to the following;


       ??????????????????????????? 
       ??? ???????????? ???????????????
       ????????????   ??????????????????
       ?????????  ??? ????????? ??? ??????
       ??? ??????????????? ??? ?????????
       ??????????????????     ??R??E??L
       ??.??  ??? ???????????? ?????????
       ?????????????????? ????????????
       ????????????????????? ??? ??????
       ??? ??? ????????? ???????????? ???  
       ??2??0??1??0?? ...


              Note: I manually added line breaks and spaces to the example for 
              NFO layout reasons and it is also not the entire logo.
              I included the files roy.asc and roy.web as examples also.
              The file Roy.TXT contains the same example for the conversion to 
              Unicode text result.


              The Web Encoded ASCII does not include 
 Tags for the line???breaks
              You have to add those manually or do what I do on my web site and
              enclose the code in <pre> </pre> tags, which preserves the line???breaks
              within the enclosed text.

              Since the result is Unicode and not DOS ASCII anymore, you can
              use any monospace font to display the ASCII somewhat correctly.
              You won't get a 100% acurate result anyway, because the old
              MS DOS font set is not part of Windows anymore. What you can get
              is only a close aproximation. I use on my web site the font
              "Lucida Console", which seems to be installed on many machines.
              If the Windows of the user who visits your page with the ASCII for 
              example does not have that font installed, Windows will automatically
              pick another font that comes close. I use the following CSS formatting
              for the PRE tags where I show ASCIIs.  

              pre {
                 background???color:#000;
                 color:#FFF;
                 display:block;
                 font???family:"Lucida Console", monospace;
                 font???size:9pt;
                 line???height:12px;
                 padding:10px;
                 text???align:left;
               }

               If the PRE Tag is also used for something else on your web site
               then you can also define it for a specific class selector like


              pre.asciiart {
              ...
              }

              You would then also have to extend the PRE HTML tag like this:

              <pre class=asciiart>
              ...
              </pre> 

              The script is designed to convert all files with a specified 
              extension (.ASC by default) to web ready files with a new 
              extension (.WEB by default, but you could also make it .HTML or
              whatever). 

              There are two additional options, where I recommend
              to use the defaults (which is "yes"). 

              The first option is "HTML Encode?", which means that all non???US???ASCII 
              characters (the 7 bit ASCII codes) will be converted to HTML codes 
              like . Also standard ASCII characters that could be misinterpreted 
              by HTML or DHTML and XML are also encoded, like the " becomes ", 
              & becomes &, < becomes < and > becomes > etc.
              If you select "No", the ASCII will be converted to Windows Unicode (UTF???8)
              instead. 


              The second one is "Sanitize?"
              What that does, is removing ASCII characters with an ASCII code
              smaller than 32, which are special control characters that cannot
              be printed anyway, with 3 exceptions, chr(10) = line???feed, 
              chr(13) = cariage???return and chr(9) = tab. LF and CR remain unchanged.
              Tab characters will be converted to 8 spaces, which is the default
              MS DOS tab???stop. You might not want to select "Yes", if you convert
              ASCII files to Windows Unicode, but you could, if you like.


              Part of this package is the image "Batch???ASCII2WebOrUniCode???Steps.jpg",
              which shows screenshots of all the steps where the script goes through.

              Enjoy!
              Carsten aka Roy/SAC

              p.s. This script is freeware. Do with it whatever you like, except
              selling it. You can use it free, copy it, share it, even modify it
              if you like to. You are using it at your own risk. You cannot make me
              liable for any damage or loss of data that might results directly
              or indirectly because of the use of my script. 

              p.s.2 I also included a very early beta of a HTA version of the tool
              with an interface. The conversion from Unicode to ASCII is not supported
              by the HTA application yet and the file selector uses MS Word and might
              not work, if you don't have Office installed. Since the latest security
              updates for Windows XP as well as Vista and Windows 7, the drag and drop
              feature also stopped working unfortunately.

      ????????'                                                                 `????????
     ???                                                                         ???
      ??????                                                                     ??????
        ??????                                                                 ??????
          ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
                                                ???
                                               ??????  ????????
     ??????????????????????????????? ??????????????????????????????????????????????????       ?????????????????????????????????????????????????????????     ??? ??? ?????? ???????????????????????
     ??????????????????                       ???????? ????????     ??????????????? ?? ??? ???????????????????????????      ???  ??????????????????
       ?????? ??????     Installation    ...       ??? ?????????????????? ?????????????????????????????? ??? ????????     ?????? ??????
        ???   ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????  ????????????????????????????????????????????????????????????   ???
      ??????                                      ????????????         ???                 ??????
     ???                                        ?????????                              ???
      ????????                                      ??????                           ????????

          You can either execute the VBS script file (which is the source code
          and should be executed by WSCRIPT.EXE, which comes with Windows) or
          run the EXE file. The EXE is just the VBScript converted to an 
          executable via VBSEdit by Adersoft.

              Also check out my little intro "RoySAC.exe" :)

      ????????'                                                                 `????????
     ???                                                                         ???
      ??????                                                                     ??????
        ??????                                                                 ??????
          ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
                                                ???
                                               ??????  ????????
     ??????????????????????????????? ??????????????????????????????????????????????????       ?????????????????????????????????????????????????????????     ??? ??? ?????? ???????????????????????
     ??????????????????                       ???????? ????????     ??????????????? ?? ??? ???????????????????????????      ???  ??????????????????
       ?????? ??????     Greeting ...              ??? ?????????????????? ?????????????????????????????? ??? ????????     ?????? ??????
        ???   ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????  ????????????????????????????????????????????????????????????   ???
      ??????                                      ????????????         ???                 ??????
     ???                                        ?????????                              ???
      ????????                                      ??????                           ????????
                                                ???
           Defacto2.net, Scene.org, Textfiles.com, Pouet.net
           Demoscene.tv, GfxZone, Intro Inferno, C64.org, OSDM, 
           AMP, Edge, Sizteen Colors, Flashtro, Old???Skool.net,
           Untergrund.net, Bitfellas, Exotica and everybody else who 
           works on preserving the rich history of the scene and makes 
           it accessible for future generations to enjoy.

           Group Greetings:
           Blocktronix (thanks for keeping the ANSI scene alive and kickin)
           CPI (Oldskool forver!)
           Andomeda Software Development (Your demos rock! Period!)

           Personal Greetings to:
           Madmax/CPI, Peace/Testaware, Smash/Fairlight, Shamen/Dytec,
           DaLezy, Dipswitch, Mandibular Joint Dysfunction, RaD Man/ACiD,
           Jason Scott/Textfiles.com, Ben Garrett/Defacto2, my blog readers, 
           Lord Scarlet/SixteenColors, Zerovision/Blocktronics and everybody
           else I know and forgot to mention :)

            For a full list of greetings, check out my Intro, which is 
            included with this release.

      ????????'                                                                 `????????
     ???                                                                         ???
      ??????                                                                     ??????
        ??????                                                                 ??????
          ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
                                               ???
                                              ??????  ????????
    ??????????????????????????????? ??????????????????????????????????????????????????       ?????????????????????????????????????????????????????????     ??? ??? ?????? ???????????????????????
    ??????????????????                       ???????? ????????     ??????????????? ?? ??? ???????????????????????????      ???  ??????????????????
      ?????? ??????     Other Stuff ...           ??? ?????????????????? ?????????????????????????????? ??? ????????     ?????? ??????
       ???   ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????  ????????????????????????????????????????????????????????????   ???
     ??????                                      ????????????         ???                 ??????
    ???                                        ?????????                              ???
     ????????                                      ??????                           ????????
                                               ???                              

           Check out the intro in this release "RoySACIntro.exe" :)

           and don't forget visiting http://www.RoySAC.com
           and to check out my blog at http://www.roysac.com/blog

           Additional URLs you might want to check out

           Over 300 demos, cracktros and other scene related videos
           http://www.youtube.com/sacreleases

           Scene Images of all sorts
           http://www.flickr.com/photos/cumbrowski/collections/72157611288618058/
           http://www.flickr.com/photos/cumbrowski/collections/72157612320706642/

           My Mediafire.com file share with tons of files to download!
           http://www.mediafire.com/?sharekey=b570d9e07985879c7069484bded33bcd06b0971baa3373fa

           My ASCII Art Academy to learn more about classic Text Art
           http://www.roysac.com/learn/

           Links to other useful resources online to learn more about the scene
           http://www.roysac.com/roy_links.html

           Signing off!

           Roy of Superior Art Creations, CPI, Dytec, 
                  Razor 1911, TRSI, TDU???Jam, PNS

     ????????'                                                                 `????????
    ???                                                                         ???
     ??????                                                                     ??????
       ??????                                                                 ??????
         ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

You can download the script here: ?? ROY-BATCHCONVERT-ASCII2WEB2.ZIP (700 KB)

Batch-ASCII2WebOrUniCode-Steps

You can download the script here: ?? ROY-BATCHCONVERT-ASCII2WEB2.ZIP (700 KB)

Enjoy!
Carsten aka Roy/SAC

PS. This script is freeware. Do with it whatever you like, except selling it. You can use it free, copy it, share it, even modify it if you like to. You are using it at your own risk. You cannot make me liable for any damage or loss of data that might results directly or indirectly because of the use of my script.

BatchASCII2WebBeforeAfter6

1 Comment
  1. Anonymous says:

    Very nice, but i can distort ascii a bit if you use text-align: center; .. at least what i tried

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

NOTE! I believe in the right for freedom of speech and personal opinion and are against censorship, so feel free to tell me what you think and let me and others hear your opinion on this subject, but please avoid using the f-word and s-word as much as you possibly can, because at the end of the day this blog exists for the purpose of useful exchanges of thoughts, ideas and opinions and not as a valve for your accumulated anger and frustration. Get a shrink for that! Thanks.

Welcome , today is Tuesday, March 19, 2024