TextToHtml.bat - Easily create World Wide Web pages!
Moderator: DosItHelp
Re: TextToHtml.bat - Easily create World Wide Web pages!
A big part of the problem is that without a single tested download we can't be certain that all the files are faultless, have the right names, line endings etc.
That's why I provided the files in a zip file download - Aacini just needed to confirm they were correct and then we could have debugged it to see why it misbehaves in my system.
That's why I provided the files in a zip file download - Aacini just needed to confirm they were correct and then we could have debugged it to see why it misbehaves in my system.
-
- Posts: 82
- Joined: 30 Dec 2013 10:16
- Location: United States by the big waterfall
Re: TextToHtml.bat - Easily create World Wide Web pages!
Is that FTP site still up? It doesn't show the address in the thread. I'd be willing to test it on my Win7 x64 machine.
Re: TextToHtml.bat - Easily create World Wide Web pages!
Edit: did you get it Matt?
-
- Posts: 82
- Joined: 30 Dec 2013 10:16
- Location: United States by the big waterfall
Re: TextToHtml.bat - Easily create World Wide Web pages!
Yeah, that worked. I got a little further along but still can't get it working. I think it's something simple but this is a lot of code. Here is my output when I run it and a Dir listing too. HTML Files
Re: TextToHtml.bat - Easily create World Wide Web pages!
@foxi:
I want to make a test on your .zip file, but the link was deleted. Could you re-edit it?
Two notes on this program:
Antonio
I want to make a test on your .zip file, but the link was deleted. Could you re-edit it?
Two notes on this program:
- The conversion of tables takes a long time depending on the size of the table. The guide is a huge file and have several tables, so you should give enough time for the conversion. There is a table, "[table]Color table of DOS text colors", that may take a couple minutes. Please, be patient.
- I suggest you to first convert a very simple file just to test that the conversion program is working properly. For example:
TestFile.txtCode: Select all
This is a [b]test file[/b]
==First section==
This is [i]first[/i] section
==Second section==
This is [b][i]second[/i][/b] section
Antonio
Re: TextToHtml.bat - Easily create World Wide Web pages!
Hey! I just downloaded again TextToHtml.bat file from the original site:
but the listing of Matt Williamson show that his file have 60 bytes more!!!
Code: Select all
28/03/2014 10:23 a. m. 47,500 TextToHtml.bat
but the listing of Matt Williamson show that his file have 60 bytes more!!!
Code: Select all
12/10/2013 06:06 PM 47,560 texttohtml.bat
-
- Posts: 82
- Joined: 30 Dec 2013 10:16
- Location: United States by the big waterfall
Re: TextToHtml.bat - Easily create World Wide Web pages!
I just added the zip file to my dropbox folder, so you can grab it from there. Also, check out my .html output files and see if you can figure out why I keep getting all of the
All I know from 3 years of spanish is that that's how you start a question but I did a search for that upside down question mark and didn't find any in any of the files.
Code: Select all
¿" was unexpected at this time.
All I know from 3 years of spanish is that that's how you start a question but I did a search for that upside down question mark and didn't find any in any of the files.
Re: TextToHtml.bat - Easily create World Wide Web pages!
Ok. I just downloaded the 10 files from the original site. It tokes me exactly 9 minutes 39 seconds to do so. This is the listing of files just after download:
I then executed InstallFiles.bat that took 2 minutes 14 seconds. This is the listing of files after the installation:
All is working correctly...
Antonio
Code: Select all
28/03/2014 10:37 a. m. 2,336 Aacini's Colors Tree.bat
28/03/2014 10:38 a. m. 77,096 Creation of World Wide Web pages.txt
28/03/2014 10:39 a. m. 624 DOSColorTable.bat
28/03/2014 10:41 a. m. 2,339 Format of the source text file.txt
28/03/2014 10:45 a. m. 4,219 HelpToTextToHtml.bat
28/03/2014 10:45 a. m. 8,798 HelpToTextToHtml.txt
28/03/2014 10:42 a. m. 130,746 InstallFiles.bat
28/03/2014 10:43 a. m. 167,599 InstallImages.bat
28/03/2014 10:44 a. m. 1,292 ModifiersForCodeTag.txt
28/03/2014 10:23 a. m. 47,500 TextToHtml.bat
10 archivos 442,549 bytes
I then executed InstallFiles.bat that took 2 minutes 14 seconds. This is the listing of files after the installation:
Code: Select all
28/03/2014 10:49 a. m. 1,069 A01.gif
28/03/2014 10:49 a. m. 1,222 A02.gif
28/03/2014 10:49 a. m. 1,381 A03.gif
28/03/2014 10:49 a. m. 1,475 A04.gif
28/03/2014 10:49 a. m. 1,562 A05.gif
28/03/2014 10:49 a. m. 1,623 A06.gif
28/03/2014 10:49 a. m. 1,708 A07.gif
28/03/2014 10:49 a. m. 1,854 A08.gif
28/03/2014 10:49 a. m. 1,909 A09.gif
28/03/2014 10:49 a. m. 1,909 A10.gif
28/03/2014 10:49 a. m. 1,907 A11.gif
28/03/2014 10:49 a. m. 1,772 A12.gif
28/03/2014 10:49 a. m. 1,657 A13.gif
28/03/2014 10:49 a. m. 1,567 A14.gif
28/03/2014 10:49 a. m. 1,488 A15.gif
28/03/2014 10:49 a. m. 1,402 A16.gif
28/03/2014 10:49 a. m. 1,301 A17.gif
28/03/2014 10:49 a. m. 1,154 A18.gif
28/03/2014 10:37 a. m. 2,336 Aacini's Colors Tree.bat
28/03/2014 10:49 a. m. 18,051 Aacini's Colors Tree.html
28/03/2014 10:49 a. m. 7,102 Aacini's Colors Tree.txt
28/03/2014 10:51 a. m. 130,558 Creation of World Wide Web pages.html
28/03/2014 10:38 a. m. 77,096 Creation of World Wide Web pages.txt
28/03/2014 10:39 a. m. 624 DOSColorTable.bat
28/03/2014 10:49 a. m. 11,190 DOSColorTable.txt
28/03/2014 10:41 a. m. 2,339 Format of the source text file.txt
28/03/2014 10:45 a. m. 4,219 HelpToTextToHtml.bat
28/03/2014 10:45 a. m. 8,798 HelpToTextToHtml.txt
28/03/2014 10:42 a. m. 130,746 InstallFiles.bat
28/03/2014 10:43 a. m. 167,599 InstallImages.bat
28/03/2014 10:51 a. m. 0 list.txt
28/03/2014 10:44 a. m. 1,292 ModifiersForCodeTag.txt
28/03/2014 10:49 a. m. 14,256 mueller_hut.jpg
28/03/2014 10:49 a. m. 9,630 Tetris Aqua.gif
28/03/2014 10:49 a. m. 9,595 Tetris Blue.gif
28/03/2014 10:49 a. m. 10,101 Tetris Fuchsia.gif
28/03/2014 10:49 a. m. 9,457 Tetris Gray.gif
28/03/2014 10:49 a. m. 10,149 Tetris Layout.gif
28/03/2014 10:49 a. m. 9,527 Tetris Lime.gif
28/03/2014 10:49 a. m. 9,603 Tetris Red.gif
28/03/2014 10:49 a. m. 9,677 Tetris Yellow.gif
28/03/2014 10:23 a. m. 47,500 TextToHtml.bat
28/03/2014 10:49 a. m. 1,865 w3c_home.gif
28/03/2014 10:49 a. m. 1,578 w3c_home0.gif
28/03/2014 10:49 a. m. 1,578 w3c_home3.gif
28/03/2014 10:49 a. m. 1,577 w3c_home6.gif
28/03/2014 10:49 a. m. 1,576 w3c_home9.gif
28/03/2014 10:49 a. m. 1,560 w3c_homeC.gif
28/03/2014 10:49 a. m. 1,522 w3c_homeLB.gif
28/03/2014 10:49 a. m. 1,535 w3c_homeLT.gif
28/03/2014 10:49 a. m. 1,522 w3c_homeRB.gif
28/03/2014 10:49 a. m. 1,527 w3c_homeRL.gif
28/03/2014 10:49 a. m. 1,546 w3c_homeRT.gif
53 archivos 746,791 bytes
All is working correctly...
Antonio
-
- Posts: 82
- Joined: 30 Dec 2013 10:16
- Location: United States by the big waterfall
Re: TextToHtml.bat - Easily create World Wide Web pages!
Hmm. I'm thinking it's something in the code that works properly on your version of windows and doesn't work on ours? I can't think of anything else and those upside down question marks are the key in my mind since we don't use them in English. They appear in every output .html file that gets generated.
Here is what I got when I ran it against the testfile.txt
Here is what I got when I ran it against the testfile.txt
Code: Select all
testfile
¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time.
This is a [b]test file[/b]
Table of Contents
First section ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time.
Second section ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time. ¿" was unexpected at this time.
First section
This is [i]first[/i] section
Top
Second section
This is [b][i]second[/i][/b] section
Re: TextToHtml.bat - Easily create World Wide Web pages!
Matt Williamson wrote:Hmm. I'm thinking it's something in the code that works properly on your version of windows and doesn't work on ours? I can't think of anything else and those upside down question marks are the key in my mind since we don't use them in English. They appear in every output .html file that gets generated.
Did you tested the files downloaded from the original site? The conversion program you downloaded from foxi´s .zip file have 60 bytes more!
-
- Posts: 82
- Joined: 30 Dec 2013 10:16
- Location: United States by the big waterfall
Re: TextToHtml.bat - Easily create World Wide Web pages!
Yes, I used the latest file from your site when I tested it.
Re: TextToHtml.bat - Easily create World Wide Web pages!
EDIT
I originally posted here the full source code of TextToHtml.bat program in order to aid to find a supposed major bug in the program. However, such bug doesn't exist, so I opted for delete the huge listing...
Antonio
I originally posted here the full source code of TextToHtml.bat program in order to aid to find a supposed major bug in the program. However, such bug doesn't exist, so I opted for delete the huge listing...
Antonio
Last edited by Aacini on 28 Mar 2014 22:41, edited 1 time in total.
Re: TextToHtml.bat - Easily create World Wide Web pages!
I haven't tested yet but the only "natural occurrence" of a ¿ character I can think of is the BOM of UTF-8 encoded text (or even Batch code).
UTF-8 could be the default charset depending on the text editor you used.
Regards
aGerman
EDIT:
As soon as the Batch code is UTF-8 encoded the HTML is full of these error messages.
UTF-8 could be the default charset depending on the text editor you used.
Regards
aGerman
EDIT:
As soon as the Batch code is UTF-8 encoded the HTML is full of these error messages.
Code: Select all
...
<body>
<h1>test</h1>
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
...
Re: TextToHtml.bat - Easily create World Wide Web pages!
aGerman wrote:UTF-8 could be the default charset depending on the text editor you used.
As soon as the Batch code is UTF-8 encoded the HTML is full of these error messages.Code: Select all
...
<body>
<h1>test</h1>
"¿"" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
...
I am afraid I don't understand... How a text file copy-pasted from this forum or the original site can be created as UTF-8 encoded file? This problem would appeared many time ago and with many other Batch files listed as text or, in that case, with any Batch file created with the standard text editor that many users of this forum use!
Please, please, could you confirm if the TextToHtml.bat conversion program works correctly when it is not encoded as UTF-8 file? THANKS!
Antonio
Re: TextToHtml.bat - Easily create World Wide Web pages!
Antonio
As far as I tested your Batch code works properly. Of course both the text file and the Batch code have to be encoded as ANSI or ASCII file.
As I already wrote UTF-8 could be the default setting for a certain text editor. Also it could happen that the encoding of text files were automatically changed during upload or download (depending on the target operating system of the server or even the client).
Regards
aGerman
As far as I tested your Batch code works properly. Of course both the text file and the Batch code have to be encoded as ANSI or ASCII file.
As I already wrote UTF-8 could be the default setting for a certain text editor. Also it could happen that the encoding of text files were automatically changed during upload or download (depending on the target operating system of the server or even the client).
Regards
aGerman