removing duplicates and adding missing fields using bibtool











up vote
0
down vote

favorite












If you don't mind me asking here a couple of questions which I've searched over on google but was unable to find some coherent examples.



My use case contains of creating .bib files for my work and occasionally merge them to a bigger .bib file. The citekeys I use are of the following pattern author_year_unique_consecutive_letter, (in case of multiple publications from same author in the same year) without the underscores.



Example:



doe2018
doe2018b
doe2018c
doe2018d
etc...


I would like eventually to achieve the following when merging .bib files to the main bigger one.



1) search all entries in the separate .bib files and if there's a missing field such as for instance journal then add a user defined text



I tried the following command looking at the manual of bibtool but seems not to produce the desired output.



bibtool 'add.field={journal="(journal){%N(journal)}{--no-journal--}"}' ./biblio.bib



2) before merging everything to the bigger .bib file check for duplicate entries, meaning find entries where they have the same key and same title and resolve those by deleting the excessive entries, in the case where there's only duplicate keys but the titles among those entries are different then extract those entries and dump them in an additional file called duplicates.bib for manual inspection, avoiding merging them altogether in the bigger .bib file.



Thanks!










share|improve this question


























    up vote
    0
    down vote

    favorite












    If you don't mind me asking here a couple of questions which I've searched over on google but was unable to find some coherent examples.



    My use case contains of creating .bib files for my work and occasionally merge them to a bigger .bib file. The citekeys I use are of the following pattern author_year_unique_consecutive_letter, (in case of multiple publications from same author in the same year) without the underscores.



    Example:



    doe2018
    doe2018b
    doe2018c
    doe2018d
    etc...


    I would like eventually to achieve the following when merging .bib files to the main bigger one.



    1) search all entries in the separate .bib files and if there's a missing field such as for instance journal then add a user defined text



    I tried the following command looking at the manual of bibtool but seems not to produce the desired output.



    bibtool 'add.field={journal="(journal){%N(journal)}{--no-journal--}"}' ./biblio.bib



    2) before merging everything to the bigger .bib file check for duplicate entries, meaning find entries where they have the same key and same title and resolve those by deleting the excessive entries, in the case where there's only duplicate keys but the titles among those entries are different then extract those entries and dump them in an additional file called duplicates.bib for manual inspection, avoiding merging them altogether in the bigger .bib file.



    Thanks!










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      If you don't mind me asking here a couple of questions which I've searched over on google but was unable to find some coherent examples.



      My use case contains of creating .bib files for my work and occasionally merge them to a bigger .bib file. The citekeys I use are of the following pattern author_year_unique_consecutive_letter, (in case of multiple publications from same author in the same year) without the underscores.



      Example:



      doe2018
      doe2018b
      doe2018c
      doe2018d
      etc...


      I would like eventually to achieve the following when merging .bib files to the main bigger one.



      1) search all entries in the separate .bib files and if there's a missing field such as for instance journal then add a user defined text



      I tried the following command looking at the manual of bibtool but seems not to produce the desired output.



      bibtool 'add.field={journal="(journal){%N(journal)}{--no-journal--}"}' ./biblio.bib



      2) before merging everything to the bigger .bib file check for duplicate entries, meaning find entries where they have the same key and same title and resolve those by deleting the excessive entries, in the case where there's only duplicate keys but the titles among those entries are different then extract those entries and dump them in an additional file called duplicates.bib for manual inspection, avoiding merging them altogether in the bigger .bib file.



      Thanks!










      share|improve this question













      If you don't mind me asking here a couple of questions which I've searched over on google but was unable to find some coherent examples.



      My use case contains of creating .bib files for my work and occasionally merge them to a bigger .bib file. The citekeys I use are of the following pattern author_year_unique_consecutive_letter, (in case of multiple publications from same author in the same year) without the underscores.



      Example:



      doe2018
      doe2018b
      doe2018c
      doe2018d
      etc...


      I would like eventually to achieve the following when merging .bib files to the main bigger one.



      1) search all entries in the separate .bib files and if there's a missing field such as for instance journal then add a user defined text



      I tried the following command looking at the manual of bibtool but seems not to produce the desired output.



      bibtool 'add.field={journal="(journal){%N(journal)}{--no-journal--}"}' ./biblio.bib



      2) before merging everything to the bigger .bib file check for duplicate entries, meaning find entries where they have the same key and same title and resolve those by deleting the excessive entries, in the case where there's only duplicate keys but the titles among those entries are different then extract those entries and dump them in an additional file called duplicates.bib for manual inspection, avoiding merging them altogether in the bigger .bib file.



      Thanks!







      bibliographies bibtex bibtool






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      Jane Dane

      1




      1



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461827%2fremoving-duplicates-and-adding-missing-fields-using-bibtool%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461827%2fremoving-duplicates-and-adding-missing-fields-using-bibtool%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux