Any html template framework or tools ? (urgent)

G

Googy

Hi,

I need to prepare a bunch of static html pages, and they all have lot
of common content parts, so I need a tool that can assemble all these
common parts in the end so I don't need to manually insert common
parts in each page manually. I need links of frame work or tool asap,
Please I prefer a free tools which is as simple as possible.

Thanks.
 
R

Rik

Googy said:
I need to prepare a bunch of static html pages, and they all have lot
of common content parts, so I need a tool that can assemble all these
common parts in the end so I don't need to manually insert common
parts in each page manually. I need links of frame work or tool asap,
Please I prefer a free tools which is as simple as possible.

SSI?
 
G

Googy


Thanks for ur reply, I don't need SSI all I need is a command line
tool or gui tool that can assemble files by identifying markers like
what php smarty do except that It should generate html files and save
them to destination folder. I hope you now understand it.
 
G

Googy

def readFile(filename)
return "" if not File.exists?(filename)
contents = ""
begin
file = File.new(filename)
while(line = file.readline)
contents += line
end
rescue EOFError
file.close
end
return contents
end

def gen (infile)
incontents = readFile(infile)
markers = []
incontents.scan(/<<(.*?)>>/) {|filename| markers << filename.to_s}
for filename in markers
markcon = gen(filename)
incontents = incontents.gsub(Regexp.new('<<'+filename+">>"),
markcon) if not markcon.nil?
end

return incontents
end

def process (infile)
outfile =""
infile.scan(/(.*?).tel/){|outname| outfile = outname.to_s+".html"}
puts "Output file: "+outfile
ofile = File.new(outfile, "w")
ofile << gen(infile)
ofile.close
end


Here is simple ruby code that I came up with in 1 hr. It just saved
lot of time for me. It can't handle recursive file includes.

File include syntax "<<include file name>>"

just give the input filename to process function.

Thanks anyways.

Bye.
 
D

dorayme

"Googy said:
Hi,

I need to prepare a bunch of static html pages, and they all have lot
of common content parts, so I need a tool that can assemble all these
common parts in the end so I don't need to manually insert common
parts in each page manually. I need links of frame work or tool asap,
Please I prefer a free tools which is as simple as possible.

Thanks.

You could take a deko at:

<http://en.wikipedia.org/wiki/Preprocessor>
 
D

dorayme

"Jonathan N. Little said:
What's deko? Is it Martian?

"deko" is my mispelling of the Australian expression "decko"
which means to "look".

Sometimes, especially in rude contexts, it is combined with
"ringside", either explicitly or implicitly, as in

"Mate, did she get a ringside of your tattoo?"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top