I use excel to create websites. Looking for an alternative

I am currently combining adjacent cells in excel to repeat common HTML elements and divs - it looks like I started the weird excel path while developing my web page and I was wondering if an experienced web designer could tell me how I could would fulfill their goals for a site with a more traditional method (with the goal of using python and mysql).

  • I have about 40 images on my site. On this page, I want to see that they are all lined up in a grid, so I have three divs next to each other in each row, all floating to the left.

  • Instead of manually entering all the code needed for each line of images, I began to concatenate the repeating pieces of code with different pieces of code. I took four div classes and divided the code that needs to be changed for each image (src = "XXX" and

    "XXX").

Example:

>  Column D               Column E             Column F     
>  '1  <div> <img src="   filename.jpg         "></div>'

The formula for creating my HTML is as follows:

= D1 and E1 and F1

I am sure it would be easier to create a MySQL database with file folders and attributes stored for each of my images so that I can view the data using a scripting language. Can anyone offer their tips or a quick script to automate html generation?

+5
source share
2 answers

Wow, that sounds very painful.

40 , HTML, , , . Python, , HTML- .

, Django . Django - - Python, MySQL, db.

+7

, html.

, , , :

cp <all_teh_kitteh_images> images/grid

html

for file in images/grid/*.jpg ; do echo "<div><img src=\"$file\"></div>" ; done

, , python (IMO MySQL , , ). python.

import glob
for file in glob.glob('images/grid/*.jpg'):
    print "<div><img src=\"%s\"></div>" % file
+2

All Articles