Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next
Restore from XLM
Author Message
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
I'm probably missing something obvious but ...
is it possible to restore the exported XML to recreate a database?
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
is it possible to restore the exported XML to recreate a database?

Not with DVD Profiler alone. Go to the Plugins and get BulkEdit. BE can import a DVD Profiler XML export.

cya, Mithi
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Looks like exactly what I need - thanks
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting LenG:
Quote:
Looks like exactly what I need - thanks

Keep in mind that unless you lock DVD fields after the XML import, all that data will be overwritten (intentionally by design) when DVD Profiler refreshes from online.

The main reason for the XML import function is to preserve personal data when official backups have been lost and to give a standard target for foreign data loading (e.g. from some other collection program).

If you have no personal data, DVD Profiler has an even faster bulk load from a text file list of UPCs.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thanks for the warning.  I actually wanted to do some bulk manipulation of cast/crew info so that I could "flatten" some of the extended trees with nested boxed sets and the like.  For example, on the Planet Earth DVD set the cast/crew info from disk 5 does not appear on the master profile (although that from disks 1-4 does).  There are other similar examples.  I had intended to merge the info - and following your warning I would then lock the cast/crew for the top-level profile and delete the disk level profiles which contain no useful info.  Unfortunately, editing the cast causes strange changes in the crew section.  It could be that I am misunderstanding the XML or that there is a count hidden somewhere that I need to update.  Still working on that.  I also wanted to do some bulk changes to vendor names in my personalization section for consistency but I haven't tried that yet.
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
I actually wanted to do some bulk manipulation of cast/crew info...

Hooold your horses. That might be accomplished much easier.

When you edit cast or crew you can right-click and copy everything to clipboard. If you now insert this into an editor you see that this is XML. Manipulate to your liking and then with right-click just paste it back.
Attention: "Past and Append" works not for crew, that is a known bug.

Quote:
Unfortunately, editing the cast causes strange changes in the crew section.

With BulkEdit? Most likely you killed a closing tag somewhere. The c&p-method should work better.

Quote:
I also wanted to do some bulk changes to vendor names in my personalization section for consistency but I haven't tried that yet.

Vendor as in Retailer? Shouldn't "Tools -> Edit Retailers" be the better way?
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Hmmm. 

Right click/select and copy back.  I'd never been able to make this work.  Just tried again then suddenly realised I have to do the select and the paste in the edit windows.  Simple when you think about it.  I was able to copy and paste/append both cast and crew info in this case. 

Strange changes in the crew section.  I'm pretty sure I didn't muck up the XML.  I simply took a few lines from the cast of the disk-profile and dropped them between the end of the existing actors list and the /actors closing delimiter.  After that the actors (cast) section displayed as I would have expected but the crew section displayed only the first line.  I'll try again over the next couple of days.  If I can get a simple recreate would you like to see the XML?

Tools->Edit retailers doesn't do what I want.  There are a lot of disks marked with "Amazon" as the retailer.  Those that have an actual price are OK.  Those which have a zero price are either subprofiles (and are thus correct) or are disks which I forgot to record at the time and should really be set to retailer unknown.  Being able to walk through an XML file with Vim and eyeball the items (or better use a python script) is easier than trying to do it through a GUI.

Thanks again for your help.
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
Strange changes in the crew section. .. After that the actors (cast) section displayed as I would have expected but the crew section displayed only the first line.

Just tested it, exported a profile and imported into new database without any modifications, still only one line of crew-data. So it's a limitation of the XML-Import. As mediadogg already wrote this function is primarily for personal data, so in the planned use this error would simply be solved by a profile update afterwards.

But the c&p function of DVD Profiler is better anyways I IMHO.

Quote:
Tools->Edit retailers doesn't do what I want.  There are a lot of disks marked with "Amazon" as the retailer.  Those that have an actual price are OK.  Those which have a zero price are either subprofiles (and are thus correct) or are disks which I forgot to record at the time and should really be set to retailer unknown.  Being able to walk through an XML file with Vim and eyeball the items (or better use a python script) is easier than trying to do it through a GUI.


I think that problem is best handled with core functionality of BulkEdit. You can flag[1] the profiles you want to change, open BE, on the left check "title" and the purchase-info you need,  "Load -> Flagged Profiles" and off you go.

[1]As for flagging, the mentioning of Vim and Python suggests that you are quite computer savvy, so you could generate a list of <ID>s (one per line) of all those profiles that need changes with XSLT (or python?) and load this list in DVD Profiler simply via "Collection -> Flags -> Load set..."
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Mithi:
Quote:
Quoting LenG:
Quote:
Tools->Edit retailers doesn't do what I want.  There are a lot of disks marked with "Amazon" as the retailer.  Those that have an actual price are OK.  Those which have a zero price are either subprofiles (and are thus correct) or are disks which I forgot to record at the time and should really be set to retailer unknown.  Being able to walk through an XML file with Vim and eyeball the items (or better use a python script) is easier than trying to do it through a GUI.


I think that problem is best handled with core functionality of BulkEdit. You can flag[1] the profiles you want to change, open BE, on the left check "title" and the purchase-info you need,  "Load -> Flagged Profiles" and off you go.

[1]As for flagging, the mentioning of Vim and Python suggests that you are quite computer savvy, so you could generate a list of <ID>s (one per line) of all those profiles that need changes with XSLT (or python?) and load this list in DVD Profiler simply via "Collection -> Flags -> Load set..."


Computer savvy, yes, but most of my experience is programming at the system level.  DVD Profiler is a powerful piece of software, but it has evolved over the years rather than being logically planned as a whole (not unusual).  The result is that some of the less-used functionality is scattered and difficult to find for a casual user, at which point I get impatient and start looking for ways to hack the data directly.  Probably what I should really do is learn to use DVD Profiler properly ...

I think I can generate the ID list you mention quite simply with grep from the output XML.  If I then import it as suggested I will end up with all zero priced amazon purchases flagged.  Presumably BulkEdit will allow me to globally change the purchase place for the flagged items?  It is unfortunate that the sort function in BulkEdit is not stable, by which I mean that if I sort on price then on place of purchase you don't end up with the items from each store arranged in price order.

It is too late at night to experiment with this further but you have given me a couple of pointers which should get me where I want to be.  TBH, if I had done this manually from the beginning it would probably be finished by now but where's the fun in that?

Thanks.
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
Probably what I should really do is learn to use DVD Profiler properly ...
That always is a good idea, but for manipulating data at a scale > 1 profile, you'll get pretty exhausted trying to do that in Profiler. BulkEdit really is a life-saver.

Quote:
I think I can generate the ID list you mention quite simply with grep from the output XML.
Either that, or have a look at the XSLT at the end.

Quote:
It is unfortunate that the sort function in BulkEdit is not stable, by which I mean that if I sort on price then on place of purchase you don't end up with the items from each store arranged in price order.
eeks ... I never tried to load more like ~50 profiles in BE at once, my old machine quickly starts huffing and puffing. For BE I would always recommend to somehow[1] flag beforehand only those profiles you want to edit and load only those.

cya, Mithi

[1] somehow: filtering in DVD Profiler, with the plugin DatabaseQuery or XSLT

[2] quick cobbled together XSLT, see footer on how to use.
Quote:
<?xml version="1.0" encoding="ISO-8859-15"?>

<!-- ***************
    by Michael 'Mithi' Cordes ( http://www.dvd-welt.de/privat/xsl.html ) 30.12.2014
    developed and tested with DVD Profiler Version 3.8. XML-export
    *************** -->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"
  encoding="utf-8"/>

<xsl:template match="Collection">
  <xsl:apply-templates select="DVD"><xsl:sort select="SortTitle"/></xsl:apply-templates>
</xsl:template>

<xsl:template match="DVD">
<xsl:if test="string-length(BoxSet/Parent)=0 and PurchaseInfo/PurchasePrice='0' and PurchaseInfo/PurchasePlace='Amazon'">
<xsl:value-of select="ID"/>
  <xsl:text>&#xa;</xsl:text>
</xsl:if>
</xsl:template>

</xsl:stylesheet>
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting Mithi:
Quote:
Just tested it, exported a profile and imported into new database without any modifications, still only one line of crew-data. So it's a limitation of the XML-Import. As mediadogg already wrote this function is primarily for personal data, so in the planned use this error would simply be solved by a profile update afterwards.

That seems like a bug. I'll take a look. (Edit: Found several bugs unfortunately. Fixes are in process of being coded.)
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
Tools->Edit retailers doesn't do what I want.  There are a lot of disks marked with "Amazon" as the retailer.  Those that have an actual price are OK.  Those which have a zero price are either subprofiles (and are thus correct) or are disks which I forgot to record at the time and should really be set to retailer unknown.  Being able to walk through an XML file with Vim and eyeball the items (or better use a python script) is easier than trying to do it through a GUI.

I need a face-palm emoticon!
There is a much easier way to do this, see Making Mass Changes
So you change one profile as needed, copy that, now flag all those that should be changed, "Collection -> Flagged -> Paste" and only choose "Purchase Place"
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
 Last edited: by Mithi
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Mithi, that certainly looks useful.  So, one other mass change I can't see how to accomplish.  I wish to remove the information-free non-genre Television from all occurrences.  Currently it is on over 300 profiles out of 1200 and may occur in any of the genre slots.  I have a nasty feeling the method you outline would destroy other potentially useful genre info.

I managed to select all profiles with Television and load the appropriate fields into BulkEdit, but I could not see any way to delete them all at once.  One by one is painful.  This is possibly one I would be able to do by editing the XML, but I'd rather wait for mediadogg's bug fixes before attempting that.

Thanks again for all the help and suggestions.  And thanks mediadogg for taking an interest and looking to fix the issue (and also thanks for the plugin).

BTW,this is one of the operations that I currently wish to perform.  I think you will see why my initial approach was to consider parsing the XML:

IF ((purchase_place == "AMAZON") AND (price == 0)
    AND ((parent_profile == NULL) OR (parent_profile.purchase_place == "Unknown")
            OR  ((parent_profile.purchase_place == "Amazon") AND (parent_profile.price == 0))
    )
    THEN SET purchase_place = "Unknown"
 Last edited: by LenG
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting LenG:
Quote:
I managed to select all profiles with Television and load the appropriate fields into BulkEdit, but I could not see any way to delete them all at once.

Click into the Genre1-Column, click "Multi Copy" in the menue bar, see picture on how to fill out "Tool 2". (I replaced Science-Fiction, coz the first profiles were mostly SF)
Repeat for all 3 (or 5) columns, "File -> Save validated changes" and you see that BE automatically closes the gaps.
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Mithi, thanks for showing how to use BulkEdit. I have fixed the XML import of Cast/Crew and I could make that available soon, if it will still be useful for this project - but I think you guys are beyond that point, right?

As far as LenG's code, that was the reason I added Visual Basic / C# scripting to BE. It requires some patience and technical expertise, but he should be able to execute various logic, although perhaps not quite as complex as he shows.

@LenG - with your expertise, you might want to request access to the Plugin Developer's Forum. Even if you don't publish them, you could then write scripts to do what you need, and perhaps lend your expertise to the Developer community - sometimes we discuss coding issues and share techniques.

For example, I never even heard of "stable sorting." But I might be able to do it with a little help .. 
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantLenG
Registered: September 2, 2007
Posts: 39
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Mithi:
Quote:
Quoting LenG:
Quote:
I managed to select all profiles with Television and load the appropriate fields into BulkEdit, but I could not see any way to delete them all at once.

Click into the Genre1-Column, click "Multi Copy" in the menue bar, see picture on how to fill out "Tool 2". (I replaced Science-Fiction, coz the first profiles were mostly SF)
Repeat for all 3 (or 5) columns, "File -> Save validated changes" and you see that BE automatically closes the gaps.

Thank you, that worked beautifully and has eliminated Television as a genre within my collection.  I had tried multi-copy but had been unable to make it work as I could not figure out how to select a column.  Selecting a cell within the column never occurred to me.

For the record, Television as a genre is a particular hate of mine.  Logically it could be used for things like Sorkin's "Sports Night" or "Studio 60" - shows about television - but to label a program with the genre Television simply because it was originally made for TV distorts the whole basis of genre in helping select material.  You might look at your listings thinking I fancy a western, but when did you last decide "I want to watch something originally made for TV"?  Anyway, thats me and my horse is outside.
    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next