[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about debian/upstream reference



Hi Gert,

On Wed, Jan 08, 2014 at 06:12:00PM +0100, Gert Wollny wrote:
> Hi all, 
> 
> I just saw on the imaging-tasks page that the reference for my package
> is clobbered, i.e. from debian/upstream 
>    
>    ...
>    Journal: Source Code for Biology and Medicine
>    Year: 2013
>    Volume: 8:20
> 
> the reference is created as 
>  
>     ... Source Code for Biology and Medicine 500 (2013). 
> 
> I would seem that the colon in "8:20" is the offending part.

Usually the active string in YAML is ": " (colon + space) which would
confuse parsers what might be the real separator between

   field: value

You have two common options:

   Volume: "8:20"

   Volume: >
           8:20

Both is valid YAML (I'd prefer the first option in this specific case).

However, I do not have the slightest idea why 8:20 is turned into 500!
:-(

udd=# SELECT * from bibref where source = 'mia' ;
 source |   key   |                                                           value                                                           | package | rank
--------+---------+---------------------------------------------------------------------------------------------------------------------------+---------+------
 mia    | doi     | 10.1186/1751-0473-8-20                                                                                                    |         |    0
 mia    | title   | MIA - A Free and Open Source Software for Gray Scale Medical Image Analysis                                               |         |    0
 mia    | url     | http://www.scfbm.org/content/8/1/20/abstract                                                                              |         |    0
 mia    | journal | Source Code for Biology and Medicine                                                                                      |         |    0
 mia    | author  | Gert Wollny and Jean-Jaques Hublin and Maria-J Ledesma-Carbayo and  Matthew M. Skinner and Peter Kellman and Thomas Hierl |         |    0
 mia    | volume  | 500                                                                                                                       |         |    0
 mia    | eprint  | http://www.scfbm.org/content/pdf/1751-0473-8-20.pdf                                                                       |         |    0
 mia    | year    | 2013                                                                                                                      |         |    0
 mia    | bibtex  | mia                                                                                                                       |         |    0
(9 rows)

That's ... hmmm, more than strange!!!  As I said above the magic string
is ": " but obviously the single colon has some unwanted effect.  I'm no
YAML expert.  I even checked on my local UDD to escape the interpretation
of ':' and checked

$ diff -u upstream /srv/udd/mirrors/machine-readable/m/mia.upstream 
--- upstream    2013-10-14 17:18:12.000000000 +0200
+++ /srv/udd/mirrors/machine-readable/m/mia.upstream    2014-01-08 19:09:29.840932052 +0100
@@ -8,7 +8,7 @@
   Title: MIA - A Free and Open Source Software for Gray Scale Medical Image Analysis
   Journal: Source Code for Biology and Medicine
   Year: 2013
-  Volume: 8:20
+  Volume: "8:20"
   DOI: 10.1186/1751-0473-8-20
   URL: http://www.scfbm.org/content/8/1/20/abstract
   eprint: http://www.scfbm.org/content/pdf/1751-0473-8-20.pdf

which has the very same effect as above - so for some reason this string
is not taken over verbosely and my guesses above are simply wrong. :-(

> Unfortunately, it is quite common in on-line only journals to use this
> kind of notation.
> 
> My questions are now:
> 
> * What is the tool used to extract this information? - so that I can see
>   if I am able to fix it, or if not, to file a bug report against the
>   right package. 

A python YAML parser which I used to parse upstream files and inject
these into UDD[1].

> * Does anybody now a workaround that would preserve the notation? 

I think that Michael in his mail is right and you should specify Volume
and Pages separately.  But any clue why the import of

   <number>:<number>

seems to be broken in general would be really welcome.
 
Hope this helps while leaving me totally confused anyway

     Andreas.


[1] http://anonscm.debian.org/gitweb/?p=collab-qa/udd.git;a=blob;f=udd/bibref_gatherer.py

-- 
http://fam-tille.de


Reply to: