Script to create simple html from text file
I am working on a script to convert a comma seperated text file into html code line by line.
I am a newbie with scripts (and programming in general) The text file is like so: Code:
link url, image url, description Code:
<td><a href=”link url”><img src="image url" alt=”description" /></a></td> Code:
#!/bin/bash |
Look into Ruby or Python, they both have a lot of libraries available specially for such tasks.
|
tip the html generator needs to be inside the loop
thats aout all i kow about she scripts sorry my keyboard has stuck keys |
This'll do it in perl
Code:
use strict; Code:
link1 url,image1 url,description1 |
Assuming it's OK to modify gallery.txt, taking out the spaces after the commas (if not that can be fixed), this should do it
Code:
#!/bin/bash Code:
#!/bin/bash |
Thanks guys.
I used the perl one. It works great! |
All times are GMT -5. The time now is 08:14 AM. |