Yorkshire Divers

Deep Blue Technical
Go Back   YD Scuba Diving Forums > Non-Diving Related Forums > Technology
User Name
Password

Welcome to the YD Scuba forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Technology: Discuss Scripting Tool Required to Convert Directory Listing into Txt File in the Non-Diving Related Forums forums: I am about to put a wedding gallery together and the little tool I want to use requires a listing ...

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-06-07, 08:04 PM
GLOC's Avatar
GLOC GLOC is online now
Chimp 1
 

Join Date: Apr 2005
Location: Fleet
Posts: 4,244
GLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gills
Scripting Tool Required to Convert Directory Listing into Txt File

I am about to put a wedding gallery together and the little tool I want to use requires a listing of the files and captions in the following format.

Quote:
<image>
<filename>DSCF2545-agi straight on.jpg</filename>
<caption>Agi</caption>
</image>
<image>
<filename>DSCF2528-8bit.jpg</filename>
<caption>Agi</caption>
</image>
<image>
<filename>DSCF0150.jpg</filename>
<caption>Matt</caption>
</image>
<image>
<filename>DSCF0225-helen-hair-flying.jpg</filename>
<caption>Helen</caption>
</image>
For my website I did this manually which wasn't too bad, but when I am going to have 300 images, I don't want to have to do this manually.

What I want is for a script which will read a directory in windows and then output the results as
Quote:
<image>
<filename>filename.jpg</filename>
<caption>filename</caption>
</image>
Is this possible and does a simple tool exist to allow me to do this?

Regards
__________________
Gareth
Images of Life Photography
DIR
Team Foxturd


Son, you're going to have to make up your mind about growing up and becoming aircrew. You can't do both.

The aircraft limits are only there in case there is another flight by that particular aircraft. If subsequent flights do not appear likely, there are no limits.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-06-07, 08:09 PM
Neil M's Avatar
Neil M Neil M is offline
"Look mate, the problem's between the user and the keyboard!"
 

Join Date: Jul 2004
Location: Cheshire
Posts: 2,250
Neil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold water
Quote:
Originally Posted by GLOC
I am about to put a wedding gallery together and the little tool I want to use requires a listing of the files and captions in the following format.


For my website I did this manually which wasn't too bad, but when I am going to have 300 images, I don't want to have to do this manually.

What I want is for a script which will read a directory in windows and then output the results as

Is this possible and does a simple tool exist to allow me to do this?

Regards
could be done in excel with vba, a dir command (or two) and some parsing of the file name......

am off out but may have some time later....

Cheers
Neil
__________________
Trying to dive WITHOUT politics since 1994.......
"........Oi Student......... welcome to the land of the taxpayer........enjoy your visit!"
Don't let the sig fool you!.......

www.neil-morris.com - Neil's photos and stuff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-06-07, 08:23 PM
Neil M's Avatar
Neil M Neil M is offline
"Look mate, the problem's between the user and the keyboard!"
 

Join Date: Jul 2004
Location: Cheshire
Posts: 2,250
Neil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold water
Gloc...

pm incomming
__________________
Trying to dive WITHOUT politics since 1994.......
"........Oi Student......... welcome to the land of the taxpayer........enjoy your visit!"
Don't let the sig fool you!.......

www.neil-morris.com - Neil's photos and stuff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-06-07, 08:41 PM
tootricky's Avatar
tootricky tootricky is offline
One of Digger's Angels
 

Join Date: May 2005
Location: Gosport, Hants
Posts: 1,382
tootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm watertootricky is a scuba diver - warm water
Quote:
Originally Posted by GLOC
I am about to put a wedding gallery together and the little tool I want to use requires a listing of the files and captions in the following format.


For my website I did this manually which wasn't too bad, but when I am going to have 300 images, I don't want to have to do this manually.

What I want is for a script which will read a directory in windows and then output the results as

Is this possible and does a simple tool exist to allow me to do this?

Regards
Gareth,

If Neil hasn't sorted you out, I could knock something up in a couple of minutes.

Cheers/Nic
__________________
Quote:
Originally Posted by Digger
We on the other hand, are an elite team of heart breakers for the elderly It will be like Charlie's Angels, but we will despatch our victims with heart attacks and strokes.
Don't wrestle with a pig. You'll only get as dirty as the pig & the pig likes it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-06-07, 09:01 PM
lloydwatkin's Avatar
lloydwatkin lloydwatkin is offline
I kissed a girl and liked it...
 

Join Date: Apr 2005
Location: Cardiff, Wales
Posts: 1,142
lloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm waterlloydwatkin is a scuba diver - warm water
Was about to offer the same...

Other alternative, especially as you are uploading lots of images is to use something like Flickr.com, and use the api to put the content into your website. This is what I did with my own site well I cheated I used open source, but if you look at the gallery on Cardiff Scuba's site Cardiff Scuba - Photo Gallery Page I wrote a custom API link for them

Lloyd
__________________
http://www.evilprofessor.co.uk

"Your body goes to waste every minute you don't give it to me..." - Electric Six

SS08 - It Begins...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-06-07, 09:06 PM
GLOC's Avatar
GLOC GLOC is online now
Chimp 1
 

Join Date: Apr 2005
Location: Fleet
Posts: 4,244
GLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gills
Thanks Nic and Lloyd.

I want to try and keep the feel of the galleries as the same as my main webiste, I will just increase the number of images in the grid.

I am sure Neil will produce the goods

Regards
__________________
Gareth
Images of Life Photography
DIR
Team Foxturd


Son, you're going to have to make up your mind about growing up and becoming aircrew. You can't do both.

The aircraft limits are only there in case there is another flight by that particular aircraft. If subsequent flights do not appear likely, there are no limits.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-06-07, 09:20 PM
GLOC's Avatar
GLOC GLOC is online now
Chimp 1
 

Join Date: Apr 2005
Location: Fleet
Posts: 4,244
GLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gillsGLOC was born with gills
Worked a treat thanks Neil. Green incoming.

Nic and Lloyd you can have one too for offering
__________________
Gareth
Images of Life Photography
DIR
Team Foxturd


Son, you're going to have to make up your mind about growing up and becoming aircrew. You can't do both.

The aircraft limits are only there in case there is another flight by that particular aircraft. If subsequent flights do not appear likely, there are no limits.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-06-07, 09:22 PM
Neil M's Avatar
Neil M Neil M is offline
"Look mate, the problem's between the user and the keyboard!"
 

Join Date: Jul 2004
Location: Cheshire
Posts: 2,250
Neil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold waterNeil M is a scuba diver - cold water
if you need it tidying up, please let me know...

cheers
Neil

p.s. thanks for the green!
__________________
Trying to dive WITHOUT politics since 1994.......
"........Oi Student......... welcome to the land of the taxpayer........enjoy your visit!"
Don't let the sig fool you!.......

www.neil-morris.com - Neil's photos and stuff

Last edited by Neil M : 11-06-07 at 09:23 PM. Reason: i'm rude and ignorant!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Sponsored Links

Yorkshire Divers - RSS Feed
All times are GMT +1. The time now is 07:57 PM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0 RC6
Trademark and all rights reserved : © YD.com Ltd (2006)
YD.com Ltd (Registered in England - 05886696)
Other sites : Golf Clubs | New Premiership Football Kits | MP3 Portable Players | MP3 Players For Sale | Replica Football Kits

Forums Directory