473,511 Members | 17,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on creating a HTML by python

Can anyone help me to use a python to create an HTML photo gallery
generator. When it's finished, it will be able find all the picture
files (i.e. .jpg, .gif. .png files) in any given folder on the
computer, automatically create smaller thumbnails for each image, and
then generate a complete HTML file that displays a clickable image
gallery. When viewed in a web browser, the HTML file will display the
thumbnails in a neatly formatted table, and if you click on one of the
thumbnails the full-size image will appear.

Thanks
Jul 18 '05 #1
4 1779
sepgy writes:
Can anyone help me to use a python to create an HTML photo gallery
generator. When it's finished, it will be able find all the picture
files (i.e. .jpg, .gif. .png files) in any given folder on the
computer, automatically create smaller thumbnails for each image, and
then generate a complete HTML file that displays a clickable image
gallery. When viewed in a web browser, the HTML file will display the
thumbnails in a neatly formatted table, and if you click on one of the
thumbnails the full-size image will appear.

Thanks

Your script is meant to create something like this?
http://home.hccnet.nl/gj.den.besten/...rzicht_01.html

A few months ago I wrote this script to get familiarized with Python. It
has a few disadvantages:
* It is not written in English (in Dutch actually).
* Written using a procedural/modular programming style.
No classes are used, so it is not very "Pythonic"
* Written to meet my needs to get pictures published on my website.
* No GUI.

When I get rid of the first two disadvantages, I will publish the
sourcecodes on my website. It will be GPL'ed.

So far, I tested it on Linux and WinNT and it seems to work fine. It
uses the "Python Imaging Library" instead of "ImageMagick". Using PIL
gives it a better performance.

There is another option:
http://info.linspire.com/lphoto/
This is an Open Source application, built using Python. If you can get
the source, this may be your best choice.

Gert-Jan

--
Homepage:
http://www.GJdenBesten.nl
Jul 18 '05 #2
ev*******@hotmail.com (sepgy) wrote in message
Can anyone help me to use a python to create an HTML photo gallery
generator. When it's finished, it will be able find all the picture
files (i.e. .jpg, .gif. .png files) in any given folder on the
computer, automatically create smaller thumbnails for each image, and
then generate a complete HTML file that displays a clickable image
gallery. When viewed in a web browser, the HTML file will display the
thumbnails in a neatly formatted table, and if you click on one of the
thumbnails the full-size image will appear.
Hello,
You want to look at this:
http://www.uselesspython.com/thumbnail.py
I also did this very thing when i first started learning Python.
Found it quite educational and learned much in the process.
Here was my try at 'improving it':
http://bellsouthpwp.net/m/e/mefjr75/python/Thumbz.py
You can see my dumb newbie code , of course that was two years ago ;)
There are others out there too try thumbnail.py in a Google search sometime ;) Thanks

your welcome ...
HTH,
M.E.Farmer
Jul 18 '05 #3
sepgy wrote:
Can anyone help me to use a python to create an HTML photo gallery
generator. When it's finished, it will be able find all the picture
files (i.e. .jpg, .gif. .png files) in any given folder on the
computer, automatically create smaller thumbnails for each image, and
then generate a complete HTML file that displays a clickable image
gallery. When viewed in a web browser, the HTML file will display the
thumbnails in a neatly formatted table, and if you click on one of the
thumbnails the full-size image will appear.


Once I had similar idea -- I planned to use PIL for generating
thumbnails and some templating/transformation library for generating
HTML. It all ended up with HTMLTemplate
(http://freespace.virgin.net/hamish.s...template.html), as it
is simple and compact.

--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
Jul 18 '05 #4
sepgy wrote:
Can anyone help me to use a python to create an HTML photo gallery
generator. When it's finished, it will be able find all the picture
files (i.e. .jpg, .gif. .png files) in any given folder on the
computer, automatically create smaller thumbnails for each image, and
then generate a complete HTML file that displays a clickable image
gallery. When viewed in a web browser, the HTML file will display the
thumbnails in a neatly formatted table, and if you click on one of the
thumbnails the full-size image will appear.


Note that with the EXIF.py tool you can extract existing thumbnails
stored inside JPEG or TIFF files without generating them yourself, which
is much faster.
Most digital cameras nowadays generate these thumbnails...

David
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2243
by: Jacek Generowicz | last post by:
Where can I find concise, clear documentation describing what one has to do in order to enable Python's internal help to be able to provide descriptions of Python keywords ? I am in a situation...
45
2979
by: Joh | last post by:
hello, i'm trying to understand how i could build following consecutive sets from a root one using generator : l = would like to produce : , , , ,
2
2707
by: rdsteph | last post by:
Python411 is a series of podcasts about Python, aimed at hobbyists and others who are learning Python. Each episode focuses on one aspect of learning Python, or one kind of Python programming, and...
2
1350
by: sumi | last post by:
I am very new to python , I have small query could some one help me. every time I get a new load i need to do few things like creating some dir, changing some file contents and moving some files ,...
1
4317
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
3
1150
by: tonydevlin | last post by:
I am creating a workflow in plone using argouml and archgenxml. I have been following the steps on the site:-...
3
2995
by: cuties | last post by:
Hi all.... i'm very new to this programming language. i'm required to fulfill this task in the company i'm doing my practical. i hope i can get guide for my problem... Here is the script i...
0
927
by: Luis Speciale | last post by:
Hi u all : I'm trying to build mod_python in Leopard 10.5.4 with a cvs version from http://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk I have $ python Python 2.5.2...
2
1177
by: Luis Speciale | last post by:
Hi I'm trying to build mod_pyton on Leopard 10.5.4 on a Mac G5 with this cvs version http://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk with this Python python Python 2.5.2...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.