Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

srikrishnan's scratchpad

by srikrishnan (Beadle)
on Nov 21, 2008 at 07:02 UTC ( #725060=scratchpad: print w/ replies, xml ) Need Help??

use strict; use warnings; use Image::ExifTool ':Public'; my @CreatVal = ("Michael L. Oldham","Dheeraj Khare","Florante A. Quioc +ho","Amy L. Davidson","Jue Chen"); my $DescrVal = "Nature 450, 515 (2007). doi:10.1038/nature06264"; my $FormtVal = "application/pdf"; my $PublsVal = "Nature Publishing Group"; my $RightVal = " 2007 Nature Publishing Group"; my $TitleVal = "Crystal structure of a catalytic intermediate of the m +altose transporter"; my $ProdcVal = "Acrobat Distiller 6.0.1 (Windows)"; my $CpyrtVal = " 2007 Nature Publishing Group"; my $DoiiiVal = "10.1038/nature06264"; my $EissnVal = "1476-4687"; my $EndPgVal = "521"; my $IssnoVal = "0028-0836"; my $NumbrVal = "7169"; my $PubDtVal = "2007-11-22"; my $PubNmVal = "Nature"; my $RgtAgVal = "permissions\@nature.com"; my $SrtPgVal = "515"; my $UrlllVal = "dx.doi.org/10.1038/nature06264"; my $VolumVal = "450"; my $CrtDtVal = "2007-11-13T10:51:07+08:00"; my $CrtTlVal = "3B2 Total Publishing System 7.51n/W"; my $LabelVal = "Nature 450, 515 (2007). doi:10.1038/nature06264"; my $MDdatVal = "2007-11-13T12:19:19+08:00"; my $MfyDtVal = "2007-11-13T12:19:19+08:00"; my $DocIDVal = "uuid:27bf4dc2-daa2-46a0-9944-4aeea86cb8d0"; my $InsIDVal = "uuid:27f7c7ea-bde3-49fd-b76b-0975741cc5d9"; my $MarkdVal = "True"; my $FileName = "E:\\3B2_Production_Problems\\XMP_Metadata\\Nnano.pdf"; unlink "E:\\3B2_Production_Problems\\XMP_Metadata\\modified_Nnano.pdf" +; my $mdfyName = "E:\\3B2_Production_Problems\\XMP_Metadata\\modified_Nn +ano.pdf"; my $success = "Nil"; my $errStr = "Nil"; my $exifTool = new Image::ExifTool ':Public'; $exifTool->SetNewValue(); foreach my $singleAu(@CreatVal) { ($success, $errStr) = $exifTool->SetNewValue('Creator'=> $singleAu, Ad +dValue => 1); #print "Success: $success\n"; #print "Error $errStr\n"; } $exifTool->Options(Charset => 'Latin'); $exifTool->SetNewValue('About' => 'doi:'.$DoiiiVal,Group=>'XMP-RDF', P +rotected=>0x01); $exifTool->SetNewValue('Description',$DescrVal); $exifTool->SetNewValue('Format',$FormtVal); $exifTool->SetNewValue('Identifier','doi:'.$DoiiiVal); $exifTool->SetNewValue('Publisher', $PublsVal); $exifTool->SetNewValue('Rights',$RightVal, Charset => 'Latin'); $exifTool->SetNewValue('Title',$TitleVal); $exifTool->SetNewValue('Producer',$ProdcVal); #$exifTool->SetNewValue('XMP-RDF:About','doi:'.$DoiiiVal, Protected=>' +0x01', Protected=>'0x02'); $exifTool->SetNewValue('XMP-PRISM:Copyright' => $CpyrtVal, Charset => +'Latin'); $exifTool->SetNewValue('DOI',$DoiiiVal); $exifTool->SetNewValue('EIssn',$EissnVal); $exifTool->SetNewValue('EndingPage',$EndPgVal); $exifTool->SetNewValue('ISSN',$IssnoVal); $exifTool->SetNewValue('Number',$NumbrVal); $exifTool->SetNewValue('PublicationDate',$PubDtVal); $exifTool->SetNewValue('PublicationName',$PubNmVal); $exifTool->SetNewValue('RightsAgent',$RgtAgVal); $exifTool->SetNewValue('StartingPage',$SrtPgVal); $exifTool->SetNewGroups('prism'); $exifTool->SetNewValue('url',$UrlllVal, Group => 'prism'); $exifTool->SetNewValue('Volume',$VolumVal); $exifTool->SetNewGroups('XMP'); $exifTool->SetNewValue('CreateDate' => $CrtDtVal, Group => 'XMP'); $exifTool->SetNewValue('CreatorTool' => $CrtTlVal, Group => 'XMP'); $exifTool->SetNewValue('Identifier'=> 'doi:'.$DoiiiVal, Group => 'XMP' +); $exifTool->SetNewValue('Label'=> $LabelVal, Group => 'XMP'); $exifTool->SetNewValue('MetadataDate' => $MDdatVal, Group => 'XMP'); $exifTool->SetNewValue('ModifyDate' => $MfyDtVal, Group => 'XMP'); $exifTool->SetNewValue('DocumentID' => $DocIDVal); $exifTool->SetNewValue('InstanceID' => $InsIDVal); $exifTool->SetNewValue('Marked',$MarkdVal); $exifTool->WriteInfo($FileName, $mdfyName);
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (17)
As of 2015-03-27 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (612 votes), past polls