elifesciences / elife-crossref-feed

code to support uploading info to crossref on PAW articles
1 stars 1 forks source link

Convert <element-citation publication-type="software"> to <unstructured_citation> #90

Closed Melissa37 closed 7 years ago

Melissa37 commented 7 years ago

So, in my analysis of Kitchen sink I see this ref:

<ref id="bib2">
        <element-citation publication-type="software">
            <person-group person-group-type="author">
                <name>
                    <surname>Bates</surname>
                    <given-names>D</given-names>
                </name>
                <name>
                    <surname>Maechler</surname>
                    <given-names>M</given-names>
                </name>
                <name>
                    <surname>Bolker</surname>
                    <given-names>B</given-names>
                </name>
                <name>
                    <surname>Walker</surname>
                    <given-names>S</given-names>
                </name>
                <name>
                    <surname>Haubo Bojesen Christensen</surname>
                    <given-names>R</given-names>
                </name>
                <name>
                    <surname>Singmann</surname>
                    <given-names>H</given-names>
                </name>
                <name>
                    <surname>Dai</surname>
                    <given-names>B</given-names>
                </name>
                <name>
                    <surname>Grothendieck</surname>
                    <given-names>G</given-names>
                </name>
                <name>
                    <surname>Green</surname>
                    <given-names>P</given-names>
                </name>
            </person-group>
            <person-group person-group-type="curator">
                <name>
                    <surname>Bolker</surname>
                    <given-names>B</given-names>
                </name>
            </person-group>
            <year iso-8601-date="2016">2016</year>
            <data-title>Lme4: Linear Mixed-Effects Models Using Eigen and S4</data-title>
            <source>CRAN</source>
            <ext-link ext-link-type="uri" xlink:href="https://cran.r-project.org/web/packages/lme4/index.html">
                https://cran.r-project.org/web/packages/lme4/index.html
            </ext-link>
            <!-- designator attribute added for version - Feb 8 2017 -->
            <version designator="1.1-12">1.1-12</version>
        </element-citation>
    </ref>

converts to:

<citation key="2">
                        <volume_title>CRAN</volume_title>
                        <author>Bates</author>
                        <cYear>2016</cYear>
                    </citation>

but would be better converted to:

<unstructured_citation key="2">Bates D, Maechler M, Bolker B, Walker S, Haubo Bojesen Christensen R, Singmann H, Dai B, Grothendieck G, 
Green P. 2016. Lme4: Linear Mixed-Effects Models Using Eigen and S4. CRAN. 1.1-12. MIT Press: 
https://cran.r-project.org/web/packages/lme4/index.html</unstructured_citation>

NOTE - I am not 100% sure about the unstructured citation - with Crossref to verify

gnott commented 7 years ago
<unstructured_citation>
Bates D, Maechler M, Bolker B, Walker S, Haubo Bojesen Christensen R, Singmann H, Dai B, Grothendieck G, Green P, Bolker B. 2016. Lme4: Linear Mixed-Effects Models Using Eigen and S4. CRAN. 1.1-12. https://cran.r-project.org/web/packages/lme4/index.html.
</unstructured_citation>
gnott commented 7 years ago

Some code toward this being commited in PR https://github.com/elifesciences/elife-crossref-xml-generation/pull/25

Melissa37 commented 7 years ago

Sorry, my mistake about adding MIT Press - must have been conflating references. In Patents, the inventors and assignees tend to be distinct I think - inventors are people and assignee is company they work for (I think). For Software I have never seen an assignee in our XML or an author providing it in the reference list, and also I assume it would be one of the authors (but I think that assumption is wrong). Either way, I am happy to skip this as not necessary as we've never published one and also it would be more effort to code for it?

gnott commented 7 years ago

As I just mentioned in https://github.com/elifesciences/elife-crossref-feed/issues/95, there is a function that could be used to further filter out types of persons on a particular citation based on the publication_type. That said, it sounds like the logic we have is "good enough" for these purposes, and we can please open a new ticket if it is unacceptable in a particular scenario.