batch process .txt files to .htm

  • Advertisement ( why? )
     

    patyoung, 6th Oct 2012 12:50 pm

    i have a bunch of .txt files that i would like convert to .htm files.

    but before (or after) the conversion, i want to add some text (!DOCTYPE ... etc), to make them usable.

    is this possible ?

    pat

    • Charles, 7th Oct 2012 10:55 am

      On 10/6/2012 1:50 PM, patyoung wrote:

      i have a bunch of .txt files that i would like convert to .htm files.

      but before (or after) the conversion, i want to add some text (!DOCTYPE ... etc), to make them usable.

      is this possible ?

      pat

      Pat,

      To answer your question -- yes. Others who are more versed in HTML Kit
      may have better solution to your needs but this is the way I would do it.

      Start by creating a new document. This will give you all the required
      tags, i.e. doctype, html, head, title and body. Then copy and past the
      contents of the text files into the body.

      Now the work starts. Highlight the paragraph and click on the
      paragraphing icon to wrap the selected text in the p tag. Wrap other
      content with the h tag where appropriate. If you know CSS, then style
      the document as desired.

      HTML Kit 292 has a plugin that will separately enclose paragraphs IF
      there is a blank line between paragraphs. With this plugin you would be
      able to highlight the entire text (provided there are the blank lines)
      and apply the p tag with one click. If you have a lot of this to do,
      something that might take hours of highlighting, then I suggest that you
      download HK 292 if you don't already have it. The plugin is "mcPWrap".
      This will make short work of your project.

      Charles

    • Charles, 7th Oct 2012 10:55 am

      On 10/6/2012 1:50 PM, patyoung wrote:

      i have a bunch of .txt files that i would like convert to .htm files.

      but before (or after) the conversion, i want to add some text (!DOCTYPE ... etc), to make them usable.

      is this possible ?

      pat

      Pat,

      To answer your question -- yes. Others who are more versed in HTML Kit
      may have better solution to your needs but this is the way I would do it.

      Start by creating a new document. This will give you all the required
      tags, i.e. doctype, html, head, title and body. Then copy and past the
      contents of the text files into the body.

      Now the work starts. Highlight the paragraph and click on the
      paragraphing icon to wrap the selected text in the p tag. Wrap other
      content with the h tag where appropriate. If you know CSS, then style
      the document as desired.

      HTML Kit 292 has a plugin that will separately enclose paragraphs IF
      there is a blank line between paragraphs. With this plugin you would be
      able to highlight the entire text (provided there are the blank lines)
      and apply the p tag with one click. If you have a lot of this to do,
      something that might take hours of highlighting, then I suggest that you
      download HK 292 if you don't already have it. The plugin is "mcPWrap".
      This will make short work of your project.

      Charles