Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

change import cite key

Help
JakeKwon
2012-07-16
2013-05-28
  • JakeKwon
    JakeKwon
    2012-07-16

    I am wondering how can I change the cite key when you import.
    And, change the cite key to be non-user-specific

     
  • Hi Jake,

    I am wondering how can I change the cite key when you import.
    And, change the cite key to be non-user-specific

    For import and export, the generation of cite keys is controlled by a combination of global and user-specific settings. By default, the cite keys that are present in your import file (e.g. BibTeX keys) will be honoured. And they will get written to the user-specific 'cite_key' field. In addition, these cite keys will be used to generate a personal identifier string for this record in the 'call_Number' field.

    That said, you can change this behaviour so that refbase ignores file-specific (or user-specific) cite keys on import/export and instead uses its global setting to autogenerate the keys. Here's how:

    If you're logged in as a refbase user, click on the "Options" link in the upper right corner of the screen, then click on the "edit options" icon that's displayed to the right of the "Display Options" label. Now scroll down to the bottom of the displayed page. Note that, by default, the "Import/Export Options" are set like this:

         Include or generate cite keys
             Auto-generate cite keys for:
                ( ) all records
                (o) records with empty 'Cite Key' (ID) field

    Now click the radio button next to "all records", i.e. use these settings instead:

         Include or generate cite keys
             Auto-generate cite keys for:
                (o) all records
                ( ) records with empty 'Cite Key' (ID) field

    This will always auto-generate cite keys on import/export according to the global setting (defined by variable '$defaultCiteKeyFormat' in file 'initialize/ini.inc.php'). Thus the cite keys will be "non-user-specific".

    You can also specify this behavior as the default behavior for new users by setting 'prefer_autogenerated_cite_keys' to "yes" in variable '$defaultUserOptions' (file 'initialize/ini.inc.php').

    In addition to the above, by unchecking the checkbox next to "Include or generate cite keys" you could also tell refbase to generate no cite keys on import/export at all. This, in turn, will cause Bibutils (which is used for many export formats) to generate cite keys according to its own formatting rules.

    W.r.t. changing the format of the auto-generated cite keys, see the refbase online documentation which offers more info about the available placeholders and their syntax:

    http://placeholders.refbase.net/

    Let us know if you have further questions.

    Matthias

     
  • JakeKwon
    JakeKwon
    2012-07-16

    Thank you so much for your help!
    One more thing, is there a syntax for initials of first three authors, and initial for publication?
    I tried <:abbrevJournal:> in the custom format of cite key, but did not work very well..

     
  • JakeKwon
    JakeKwon
    2012-07-16

    And, for cite key
    is there any way that i can make it globalized, which means same to all group members even though I change it. (Like call number and serial)
    I want my group members to sort the papers by cite key, which i made

     
  • is there a syntax for initials of first three authors, and initial for publication?

    I'm not sure I understand. By "initials", do you mean the first letters of the author/publication names? Or, in case, of authors, do you mean the first letters of the author's firstnames?

    It may be helpful if you could give us a few examples for typical cite keys that you'd like to generate.

    And if you have a specific workflow in mind, feel free to describe this in more detail. This may also help us to provide better advice.

    Thanks, Matthias

     
  • JakeKwon
    JakeKwon
    2012-07-16

    so if the author= Robert, Watson, and Fillip ( which are last names)
    the cite key can generate RWF (can i make syntax like this?)

     
  • for cite key is there any way that i can make it globalized, which means same to all group members even though I change it.

    S you'd like to edit the cite key in your user-specific 'cite_key' field and have this key then made available globally so that all other users can see this, right? I fear this isn't possible since refbase's user-specific fields are truly user-specific and (ATM) cannot be shared. Sorry.

    I want my group members to sort the papers by cite key, which i made

    I see. Is there any chance that you could come up with a suitable cite key pattern that could be generated automatically by refbase? If keys could be auto-generated (instead of being added/edited manually), you could use the workflow described in my original reply. Otherwise, I don't see how this could be done using the default refbase version (i.e. without hacking the code somehow).

    That said, if you just want your other group members to be able to sort records on your curated cite keys, you could also use a "poor-mans" workaround: Simply copy your edited cite key into a field that isn't used by your group for other purposes. The 'area' or 'expedition' fields may be good candidates for this. The field labels could be also renamed in the interface to make things a bit more user friendly.

    HTH, Matthias

     
  • so if the author= Robert, Watson, and Fillip ( which are last names)
    the cite key can generate RWF (can i make syntax like this?)

    No, sorry, this wouldn't be possible without modifications to the code.

    refbase generates cite keys via functions 'generateCiteKey()' and 'parsePlaceholderString()' in file 'includes/include.inc.php'. It may not be difficult to hack one of these functions, or introduce a new placeholder to suit your needs.

    Matthias

     
  • JakeKwon
    JakeKwon
    2012-07-16

    Can you tell me how can i put info that is supposed to be in "cite key" section to "area" section?
    I tried to do it in ini.inc.php and include.inc.php, but having some problems
    thanks!

     
  • Can you tell me how can i put info that is supposed to be in "cite key" section to "area" section?
    I tried to do it in ini.inc.php and include.inc.php, but having some problems

    Oh, I just meant to copy the key manually, thus calling it a "poor-man's" workaround. Sorry for the confusion. Automatically shuffling info from the 'cite_key' field to the 'area' field might be tricky.

    However, as noted in my previous reply, it may not be too difficult to hack the parsing of placeholders (or their placeholder options). This way, you could generate your cite keys automatically, and still keep refbase's standard cite key functionality more or less intact.

    E.g., currently the <:authors:> placeholder does not use negative numbers for anything, i.e. they have no meaning and are treated as if their positive counterparts were given. But since the minus sign is already recognized by the 'extractDetailsFromAuthors()' function (in file 'includes/include.inc.php'), it could be used to denote "first char of the author's lastname only". So, similar to the examples given at:

    http://www.refbase.net/index.php/Placeholder_syntax#authors

    the following examples would yield:

        <:authors:>    one author: G, two authors: GL, three authors: GLW, more authors: G_etal
        <:authors:>    GLWHB

    I.e., everything would work similar to the described <:authors:> placeholder & options, except that if the first option is preceded with a minus sign, only the first char of the author's lastname is used.

    While the meaning of the minus sign would be inconsistent in comparison to the other placeholder options, it may be the easiest way to do it, and you could still use the rest of the refbase placeholder & cite key functionality.

    Matthias