Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

OT: Quark Xpress Which art is it using??

by HamNRye (Monk)
on Oct 25, 2002 at 21:47 UTC ( [id://208154]=perlquestion: print w/replies, xml ) Need Help??

HamNRye has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

We use Quark here for building ads, and we have a large DB store of the QXD's and art for them. Do any of the Monks know how to find out what art is being used by the Quark document in question??

Our problem is that as ads change from week to week, old unused art is still linked in the DB. I would like to find a way to unlink and the purge the orphans.

Thanks,
Hammy

edited: Mon Oct 28 00:01:48 2002 by jeffa - added OT to title

  • Comment on OT: Quark Xpress Which art is it using??

Replies are listed 'Best First'.
Re: OT: Quark Xpress Which art is it using??
by earthboundmisfit (Chaplain) on Oct 26, 2002 at 00:35 UTC
    I'm not aware of any module that would access these files directly and a quick Google search came up mostly with people whining about the inability to do so. <thunk>

    Why not convert the Quark files to XML and use any of the fine XML modules to mine and keep track of the art being used? There are tons of Quark to XML converters out there.

      Thanks for the reply ebm, but a bit of hacking about produced the following code. Looking at the file in a hex editor revealed that the paths are stored in plain text.

      One of the benefits of our ad prod system is that everything Art wise would be prefaced by "AdArt". I would assume that you could just as easily write the regex below to look for ".eps .tif" etc...

      Das Code:

      #! /bin/perl -w ########################################################## # Get linked Art # Finds out what art a QXD is using ########################################################## $filename = $ARGV[0]; @quark_data = `strings $filename`; @usage = parseUsage(@quark_data); @usage = trim_path(@usage); printArr(@usage); sub trim_path { my @trimmed; for (@_) { $_ =~ /AdArt\:.*\.low/; push @trimmed, $&; } return @trimmed; } sub printArr { my $n = 0; foreach (@_) {print $n++.": $_\n"}; } sub parseUsage { my @winners; for (@_) { /AdArt/ && do {push @winners, $_;}; } return @winners; }

      Das Output:

      usage.pl 1234342 0: AdArt:EHO LOGO-TIFF.low 1: AdArt:EHO LOGO-TIFF.low 2: AdArt:Header_FOR_FILLER.tif.low 3: AdArt:long_fosterlogo.tiff.low 4: AdArt:3853_dove_homes_logo.eps.low 5: AdArt:CENTEX_LOGO_THE_BEST.EPS.low 6: AdArt:long_fosterlogo.tiff.low 7: AdArt:long_fosterlogo.tiff.low 8: AdArt:CENTEX_LOGO_THE_BEST.EPS.low 9: AdArt:Century21_Logo.tif.low 10: AdArt:Century21_Logo.tif.low 11: AdArt:V3853_edgewaterlogo.tif.low 12: AdArt:forestlakelogo.eps.low 13: AdArt:long_fosterlogo.tiff.low 14: AdArt:Forest Lake.eps.low 15: AdArt:thehighlandslogo.tif.low

      I'm assuming that this would even work under windows provided you downloaded Gnu strings from the gnerds. Would probably make a nice module if I made it a bit less specific to my application.

      Thanks!
      Hammy

Re: OT: Quark Xpress Which art is it using??
by bart (Canon) on Oct 29, 2002 at 21:24 UTC
    What platform, PC or Mac?

    I only have experience with Quark on Mac... It is very well scriptable, using Applescript. You can ask Quark to open the document and provide you with a listing of all items it contains. Save whatever you find out as a text file... and let Perl process these text files.

    Perhaps you can even use one of MacPerl's AppleEvents modules to bypass Applescript... but that's new ground for me, so I'm not venturing in that direction any further at this moment.

    That's if you're on a Mac... If you're on PC, you'll likely be able to do similar things with VB, or perhaps even with Perl+OLE. Again, I have no experience in that direction. So I'll shut up now.

    Well... HTH.

      It's MAC and PC created quark docs stored on a Unix Box. I know, eeek. I think I have it pretty much figgered out by now.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://208154]
Approved by mr2
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found