Page 1 of 1

Convert descriptions from V1 to V2

Posted: 11 Sep 2008, 04:55
by globetrotter
Is there a tool/option to convert the decriptions of Imagevue V1 (txt) to Imagevue V2 (xml)?

When V2 is completly ready is want to update my old gallery (V1) to the latest version of V2. There are more than 500 pictures in it, so it take a lot of time to add descriptions to them. I already make descriptions in V1, so when there is someting to to convert them, I would be very happy :P

Posted: 11 Sep 2008, 05:21
by mjau-mjau
I wish I could provide you with a solution here, but I'm afraid there are none. Especially since Imagevue is not running from database, there are no tools for converting them from textfile to XML.

The best you can do, is have your V1 admin available, and copy the entires from there(Since they are URL encoded int he actual text files).

Posted: 26 Sep 2008, 05:07
by globetrotter
Is it not possible to make a tool for Windows/Linux/etc. which can convert tht txt file to a xml file?

Posted: 26 Sep 2008, 07:27
by Nick
Yes, we've been thinking about it, and probably will do something like that, but dont expect it before 2.0 release.

Posted: 08 Jan 2009, 02:24
by globetrotter
Is this still on your to-do list?

Posted: 08 Jan 2009, 03:22
by Nick
Frankly its not the top priority at the moment.

How many folders do you have? I think its possible to do mass search and replace in descr.txt files with some regexp, thus converting lines into xml tags, and fixing little bit by hand after.

But I can't tell exactly right now.

Posted: 12 Jan 2009, 05:59
by globetrotter
I have made a simple Excel sheet to convert my V1 descriptions (txt) to X2 descriptions (xml). I used it convert/edit the descriptions of a few hundreads pictures of my gallery.

For the people which are interested, you can download it here: http://fotos.globetrotternet.nl/#/content/Downloads/

USE AT OWN RISK!

I am not sure it will always work correctly. I had some problems with characters like &: I uploaded my homemade folderdata.xml to the gallery and I got some errors in admin. After changing & into & in the file, everything was OK again.

Instructions (Windows):

- Copy the file desc.txt to your harddrive and open it in Notepad
- Remove the line __dir including the description
- Select the function replace (CTRL-H) and replace + by a space
- Select and copy all the data (CTRL-C)
- Download, unzip and open the Excel sheet
- Paste the data into the big grey area of the Excel sheet
- Edit titles and descriptions, etc.
- Follow the instructions in the Excel sheet (in the blue areas)
- When ready: copy the generated data (in the aqua colored area) into a new made file called folderdata.xml
- Upload this file to the right folder (backup the original folderdata.xml)
- Check if all your titles and descriptions are correctly in admin or gallery

Posted: 12 Jan 2009, 06:10
by mjau-mjau
Thanks for that :D

Posted: 12 Jan 2009, 07:24
by Nick
Great success! So this can be removed from todo.

viewtopic.php?p=14292#14292

Posted: 31 Mar 2009, 12:28
by Soulsam
The Excel is nice but a real pain. I did a PHP script which does everything of this automatically, converts everything, places the new .xml and all done recursively via Regexp etc. I'll contact the admin to see if they are interested in distributing it.

Posted: 31 Mar 2009, 21:58
by mjau-mjau
Soulsam wrote:The Excel is nice but a real pain. I did a PHP script which does everything of this automatically, converts everything, places the new .xml and all done recursively via Regexp etc. I'll contact the admin to see if they are interested in distributing it.
Sweet! 8)

Posted: 14 Apr 2009, 09:03
by roby
:wink:
great ! is it possible to use this php script ? And where i can download it ?
Thanks
Roby :P