Re: [EP-tech] Export::MultilineCSV
"Alan.Stiles via Eprints-tech" <[email protected]> Thu, 19 Dec 2019 08:34:24 +0000
| Newsgroups | gmane.comp.web.eprints.devel |
|---|---|
| Message-ID | <EMEW3|f17aa5ac871d0ecba298022992f7234cvBI8Zb14eprints-tech-bounces|ecs.soton.ac.uk|LO3P265MB17867379E241C616E8F280E9CA520@LO3P265MB1786.GBRP265.PROD.OUTLOOK.COM> |
--===============8086414905951009235== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_LO3P265MB17867379E241C616E8F280E9CA520LO3P265MB1786GBRP_" --_000_LO3P265MB17867379E241C616E8F280E9CA520LO3P265MB1786GBRP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Matt, For multiple items this line is being called https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FPlugin%2FExport= %2FMultilineCSV.pm%23L47&data=3D01%7C01%7Ceprints-tech%40ecs.soton.ac.u= k%7Ca3f950a038194c26743d08d7845e415f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0= &sdata=3DhntE2jOA9ne9aNV%2B7Dokv9wMgnxlV2rnzgA1B%2Bno5Hc%3D&reserve= d=3D0 but for a single item there is no equivalent line https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FPlugin%2FExport= %2FMultilineCSV.pm%23L60&data=3D01%7C01%7Ceprints-tech%40ecs.soton.ac.u= k%7Ca3f950a038194c26743d08d7845e415f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0= &sdata=3DeaT1MZ8Slf4AiFhBhHjvZUbKiSzbvJRiAV4ZcBcbJbY%3D&reserved=3D= 0 The list function outputs a header, then calls the individual item function= for each thing in the list, whilst the single item only calls the second f= unction. Hope that explains it, if not solve your issue. Alan From: [email protected] <[email protected].= ac.uk> On Behalf Of Matthew Brady via Eprints-tech Sent: 19 December 2019 05:42 To: '[email protected]' <[email protected]> Subject: [EP-tech] Export::MultilineCSV Hi All, Staff have come across a discrepancy, with MultilineCSV exports, and I can'= t seem to track down the cause and/or a viable resolution... Scenario 1) Perform an item search, get a list of results returned, select= MultilineCSV, --> Export... The resulting CSV file, contains everything e= xpected... for each item in the search result list... Scenario 2) While Logged in, performing editorial tasks, on the 'Actions' = tab, there is an Export option.. Generating the CSV this way, the same dat= a fields are provided in the CSV file, but obviously only for the single it= em... The discrepancy is... Scenario 1 provides a Header row, field names etc... , while Scenario 2 doe= s not. Any hints/explanations would be most appreciated.. Cheers, Matt. __________________________________________________________________ This email (including any attached files) is confidential and is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email. The views and opinions are the originator's and do not necessarily reflect those of the University of Southern Queensland. Although all reasonable precautions were taken to ensure that this email contained no viruses at the time it was sent we accept no liability for any losses arising from its receipt. The University of Southern Queensland is a registered provider of education with the Australian Government. (CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 ) -- The Open University is incorporated by Royal Charter (RC 000391), an exe= mpt charity in England & Wales and a charity registered in Scotland (SC 038= 302). The Open University is authorised and regulated by the Financial Cond= uct Authority in relation to its secondary activity of credit broking. --_000_LO3P265MB17867379E241C616E8F280E9CA520LO3P265MB1786GBRP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-fareast-language:EN-US;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} pre {mso-style-priority:99; mso-style-link:"HTML Preformatted Char"; margin:0cm; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New";} p.msonormal0, li.msonormal0, div.msonormal0 {mso-style-name:msonormal; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} span.EmailStyle18 {mso-style-type:personal; font-family:"Verdana",sans-serif; color:windowtext;} span.HTMLPreformattedChar {mso-style-name:"HTML Preformatted Char"; mso-style-priority:99; mso-style-link:"HTML Preformatted"; font-family:Consolas; mso-fareast-language:EN-US;} span.EmailStyle21 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-GB" link=3D"#0563C1" vlink=3D"#954F72"> <div class=3D"WordSection1"> <p class=3D"MsoNormal">Hi Matt,<o:p></o:p></p> <p class=3D"MsoNormal">For multiple items this line is being called<o:p></o= :p></p> <p class=3D"MsoNormal"><a href=3D"https://eur03.safelinks.protection.outloo= k.com/?url=3Dhttps%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fpe= rl_lib%2FEPrints%2FPlugin%2FExport%2FMultilineCSV.pm%23L47&data=3D01%7C= 01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca3f950a038194c26743d08d7845e415f%7C4a= 5378f929f44d3ebe89669d03ada9d8%7C0&sdata=3DhntE2jOA9ne9aNV%2B7Dokv9wMgn= xlV2rnzgA1B%2Bno5Hc%3D&reserved=3D0" originalSrc=3D"https://github.com/= eprints/eprints/blob/3.3/perl_lib/EPrints/Plugin/Export/MultilineCSV.pm#L47= " shash=3D"is1lHUh9AQLnJn/OY1b9XN2dQKsyuEO17HHDcDVW/PFCs0cNSuWpLN5uAlop+fSD= XKkQY9RGXiDfZAKeOkZqXPF24YHZbkk1qB5lDIBWVUHu0KI5FWoYj0GcR8v3WaEA+97CfuJeKvH= mwJ/+DPLkQbEhOFP1GjPRllLy0nTIb/0=3D">https://github.com/eprints/eprints/blo= b/3.3/perl_lib/EPrints/Plugin/Export/MultilineCSV.pm#L47</a><o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">but for a single item there is no equivalent line<o:= p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal"><a href=3D"https://eur03.safelinks.protection.outloo= k.com/?url=3Dhttps%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fpe= rl_lib%2FEPrints%2FPlugin%2FExport%2FMultilineCSV.pm%23L60&data=3D01%7C= 01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca3f950a038194c26743d08d7845e415f%7C4a= 5378f929f44d3ebe89669d03ada9d8%7C0&sdata=3DeaT1MZ8Slf4AiFhBhHjvZUbKiSzb= vJRiAV4ZcBcbJbY%3D&reserved=3D0" originalSrc=3D"https://github.com/epri= nts/eprints/blob/3.3/perl_lib/EPrints/Plugin/Export/MultilineCSV.pm#L60" sh= ash=3D"zrKrmZ6zr/m2v0djHomhxIBL4vFiHjgjia+85XtcxFOZGCFjZlFnruYiXnbcsQBoMxae= X6ylBFwU7AWmOR1wF1LGh6Jl4NC089IyX8AxGYiarSNLgBXEKvC6gc8oQuubBnExnq6g74nA3Qk= svg1Mx60aTODrSErBBfMYCVbHWVY=3D">https://github.com/eprints/eprints/blob/3.= 3/perl_lib/EPrints/Plugin/Export/MultilineCSV.pm#L60</a><o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">The list function outputs a header, then calls the i= ndividual item function for each thing in the list, whilst the single item = only calls the second function.<o:p></o:p></p> <p class=3D"MsoNormal">Hope that explains it, if not solve your issue.<o:p>= </o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Alan<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <div> <div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm = 0cm 0cm"> <p class=3D"MsoNormal"><b><span lang=3D"EN-US" style=3D"mso-fareast-languag= e:EN-GB">From:</span></b><span lang=3D"EN-US" style=3D"mso-fareast-language= :EN-GB"> [email protected] <eprints-tech-bounces@ecs.= soton.ac.uk> <b>On Behalf Of </b>Matthew Brady via Eprints-tech<br> <b>Sent:</b> 19 December 2019 05:42<br> <b>To:</b> '[email protected]' <[email protected]&= gt;<br> <b>Subject:</b> [EP-tech] Export::MultilineCSV<o:p></o:p></span></p> </div> </div> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Hi All,<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Staff have come across a discrepancy= , with MultilineCSV exports, and I can’t seem to track down the cause= and/or a viable resolution… <o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Scenario 1) Perform an item se= arch, get a list of results returned, select MultilineCSV, --> Export= 230; The resulting CSV file, contains everything expected… for each item in the search result list… <o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Scenario 2) While Logged in, p= erforming editorial tasks, on the ‘Actions’ tab, there is an Ex= port option.. Generating the CSV this way, the same data fields are provided in the CSV file, but obviously only for the single item…= ;<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">The discrepancy is… <o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Scenario 1 provides a Header row, fi= eld names etc… , while Scenario 2 does not.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Any hints/explanations would be most= appreciated..<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Cheers,<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-AU" style=3D"font-size:10.0pt;font-= family:"Verdana",sans-serif">Matt.<o:p></o:p></span></p> <pre><span lang=3D"EN-AU">_________________________________________________= _________________<o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">This email (including any attached files) is conf= idential and is <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">for the intended recipient(s) only. If you receiv= ed this email by <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">mistake, please, as a courtesy, tell the sender, = then delete this <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">email.<o:p></o:p></span></pre> <pre><span lang=3D"EN-AU"><o:p> </o:p></span></pre> <pre><span lang=3D"EN-AU">The views and opinions are the originator's and d= o not necessarily <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">reflect those of the University of Southern Queen= sland. Although <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">all reasonable precautions were taken to ensure t= hat this email <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">contained no viruses at the time it was sent we a= ccept no <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">liability for any losses arising from its receipt= .<o:p></o:p></span></pre> <pre><span lang=3D"EN-AU"><o:p> </o:p></span></pre> <pre><span lang=3D"EN-AU">The University of Southern Queensland is a regist= ered provider <o:p></o:p></span></pre> <pre><span lang=3D"EN-AU">of education with the Australian Government.<o:p>= </o:p></span></pre> <pre><span lang=3D"EN-AU">(CRICOS Institution Code QLD 00244B / NSW 02225M,= TEQSA PRV12081 )<o:p></o:p></span></pre> </div> -- The Open University is incorporated by Royal Charter (RC 000391), an exe= mpt charity in England & Wales and a charity registered in Scotland (SC= 038302). The Open University is authorised and regulated by the Financial = Conduct Authority in relation to its secondary activity of credit broking. </body> </html> --_000_LO3P265MB17867379E241C616E8F280E9CA520LO3P265MB1786GBRP_-- --===============8086414905951009235== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/ --===============8086414905951009235==--