Need to auto-format a text file to HTML

This is a discussion on Need to auto-format a text file to HTML within the Tech Board forums, part of the Community Boards category; Grrrrr! I have a long list of quotations in a text file; the file contains no paragraphs, and each quote ...

  1. #1
    Registered User Jeff Mitchell's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    6

    Unhappy Need to auto-format a text file to HTML

    Grrrrr! I have a long list of quotations in a text file; the file contains no paragraphs, and each quote spans very far horizontally. I would like to add a

    Code:
    <p>
    at the start of each line, and a

    </p>
    at each end-of-line character. How do I achieve this in Notepad++? EOL characters show up as CRLF (clue?). Please help me auto-format this file, and avoid wrist injury.

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,699
    Do this.
    Last edited by whiteflags; 04-06-2011 at 06:18 PM.

  3. #3
    Registered User Jeff Mitchell's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    6
    Quote Originally Posted by whiteflags View Post
    Do this.
    Thank you, that's exactly what I was after! On a related issue, is there a way to edit all my HTML pages at once? In short, I'm after something that has the power of SED and GAWK, only that it has to work with Windoze 7. Yes I know, it sounds very 90s. Ease of use would be nice. Anyone???

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832
    I don't know if there is an easy-to-use utility. For just such a purpose I wrote an interpreter that can do searches, substitutions on multiple files. I haven't fired it up in years so I don't know if it will still work now in Windows 7. If it's a one-time thing perhaps you can send me your files and I can play with it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading from file stream
    By shmitson in forum C Programming
    Replies: 0
    Last Post: 04-05-2011, 04:37 PM
  2. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  3. Function is called and I am trying to open a file
    By tommy69 in forum C Programming
    Replies: 88
    Last Post: 05-06-2004, 08:33 AM
  4. Removing text between /* */ in a file
    By 0rion in forum C Programming
    Replies: 2
    Last Post: 04-05-2004, 08:54 AM
  5. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21