Results 1 to 12 of 12
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    I am looking for a way of displaying a simple text file as HTML.

    I need to select certain parts of the text file.
    I need to format the text.
    I need to reduce the anount of line brakes.

    If anyone knows of a script I could use please let me know - Thanks!

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    808
    hi,
    Hey You are speaking of just formatting text into html right ? don't you know html at all ?
    Well i just guess that ur just looking at something to help you format the text into html.
    Now then perhaps i could show u a few samples of it...perhaps if this is what u wanted...then its good...or else could u please be brief in your explanation...

    (html)
    (head)
    (title)Replace with whatever title You want(/title)
    (/head)

    (body)

    (p)(font color="#0000FF" face="Verdana")(em)(big)(big)Hi, Here Test It test It.(/big)(/big)(/em)(/font)(/p)

    (p)(font face="Arial" color="#FF0000")(small)Hi, Here Test It Test It(/small)(/font)(/p)

    (p)(strong)(font color="#008040")Hi, Here Test it Test It(/font)(/strong)(/p)

    (p)(u)(font face="Arial" color="#FF0000")(small)Hi, Here Test It Test It(/small)(/font)(/u)(/p)
    (/body)
    (/html)

    Remember to replace ( with <
    and ) with >
    Everywhere u see it in the script code.....Perhaps then u could use examples and do it...Or better else if u have frontpage...you can work on it as you work in ms-word with bold, underline, italics, font size, paragraph width etc etc...or drop me in a mail requesting the text to be formatted as u want...I'll get it done pretty quickly....in btw i hope i am not misunderstanding your post....cos its quite confusing

    Regards
    TGO

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Thanks for your reply.

    The problem is that I am recviving a text file automaticly each day and I want a script which will automaticly format it in to HTML.

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    252
    Welcome Andy99999999
    I wish i could be of some help....But your post is too confusing [img]/infopop/emoticons/icon_wink.gif[/img]

    Guess u'd explain in detail [img]/infopop/emoticons/icon_smile.gif[/img]

  5. #5
    ABW Founder Haiko de Poel, Jr.'s Avatar
    Join Date
    January 18th, 2005
    Location
    New York
    Posts
    21,609
    Andy99999999,

    Welcome! <IMG src=http://www.abestweb.com/smilies/welcome.gif>

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>I am receiving a text file automatically each day <HR></BLOCKQUOTE>

    The easiest way is to change it from the source!

    There might be a script to convert text into html but I doubt it ... since you can just plop it into an editor (I know this is not what you want ... but you get my reasoning).

    Haiko

  6. #6
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Thanks for your suggestion.

    There are a number of text to html perl scripts out there: http://peter.verhas.com/progs/perl/t...text2html.html , http://levabilligt.nu/kent/scripts/text_view/

    They both work well but they offer too much function for what I want. I am simply looking for somthing simple to help me with the automated task.

  7. #7
    ABW Founder Haiko de Poel, Jr.'s Avatar
    Join Date
    January 18th, 2005
    Location
    New York
    Posts
    21,609
    Andy99999999,

    I stand corrected again<IMG src=http://www.abestweb.com/ubb/icons/icon10.gif>

    This one has a web interface ... no script required ...
    http://www.aigeek.com/txt2html/#whatisnot

    Haiko

  8. #8
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Yes, thats a good one. I might well be able to modify this one to what I need. I'll give it a go.

    Thanks for your help.

    Andy

  9. #9
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    It sounds like the problem is solved but I still wanted to throw in <IMG src=http://www.abestweb.com/ubb/icons/icon26.gif>.

    Depending on what you need to have done an option could be to build a basic template and call the text with include tags.

  10. #10
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    808
    [img]/infopop/emoticons/icon_redface.gif[/img] :mad: :cool: [img]/infopop/emoticons/icon_smile.gif[/img] [img]/infopop/emoticons/icon_biggrin.gif[/img] and I gave a big html file introduction
    lol
    Regards
    TGO

  11. #11
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Thanks for your suggestion Heyder.

    The trouble with includes is that there is no way (that I know of) to only call a certain part of the text file and to then add line brakes as well.

    Im still playing with the scrpit that Haiko suggested but it still needs a lot of hacking about with.

    Would still love to hear any other suggestions though. Thanks.

  12. #12
    Newbie
    Join Date
    January 18th, 2005
    Posts
    19
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Depending on what you need to have done an option could be to build a basic template and call the text with include tags<HR></BLOCKQUOTE>


    oh come on haiko, you know better than that ;p

    If you're using a perl script already, you might as well just use open()

    example:

    #!/usr/bin/perl

    my $file=&quot;some_file.txt&quot;;

    print &quot;Content-type:text/html\n\n&quot;;
    print qq~<html>>title> file..</title>
    <style type=&quot;text/css&quot;>
    < !--
    pre{font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif}
    -->
    </style>
    </head><body><pre class="ip-ubbcode-code-pre">~;

    open(handle,&quot;$file&quot; )||die$!;
    while(&lt;handle&gt; ){print;}
    close(handle);

    print qq~</pre></body></html>~;
    1||exit;

    [ 12-01-2001: Message edited by: ARSONE ]

  13. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Search for AE Script
    By bandi in forum Cusimano.com Scripts
    Replies: 1
    Last Post: October 13th, 2009, 06:04 PM
  2. Search Script Help
    By PPCguy in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: March 13th, 2006, 02:35 PM
  3. Search Script?
    By cjk in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: May 29th, 2004, 04:41 AM
  4. adding perl sub-routine to existing script
    By breeze in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: July 3rd, 2002, 08:00 PM
  5. Free affiliate script in Perl, does it even exist??
    By briansdesigns in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: February 10th, 2002, 02:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •