homepage Welcome to WebmasterWorld Guest from 50.19.199.154
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
generating web content from text files
shakes911




msg:436149
 10:00 am on Feb 26, 2001 (gmt 0)

I'm developing a new site and need to find a way of generating web content from text files or word documents, including generating the links to that content. The text files would be generated by the client and uploaded onto the server.

Can anyone give me any tips?

Cheers.

 

sugarkane




msg:436150
 8:31 pm on Feb 26, 2001 (gmt 0)

Hi shakes, welcome to WebmasterWorld.

Word files can be saved in HTML, although I've heard the results are fairly... well... questionable. Generating from a plain text file would be quite straightforward in Perl or PHP, depending on how much formatting you'd need. You'd basically set up a page template in plain HTML, serve it using Perl, and then insert your text at the appropriate point.

This could also be done using SSI (server side includes) if you've got it enabled using the <!--#include file="filename.html" --> instruction to include the contents of filename.html at that specific point in the HTML

Generating the links is a bit more tricky, but can be done with Perl's readdir command to scan the contents of a directory - if you put all your documents in this directory, you can create a set of links to whatever happens to be there when the script is run.

If any of these sound like the kind of thing you're after, shout and I'll do a code snippit.

Brett_Tabke




msg:436151
 12:19 pm on Feb 27, 2001 (gmt 0)

There are quite a few prerolled solutions too. If you dig through some of the script archives, you'll find a category usually called "text to html". Many of those are on-the-fly translation. Those are great places to dig for ideas.

shakes911




msg:436152
 9:54 am on Mar 2, 2001 (gmt 0)

After much deliberation, I've actually managed to do it.

Cheers.

chiyo




msg:436153
 10:40 am on Mar 2, 2001 (gmt 0)

How shakes?

Please share!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved