Command line clients

From refbase

(Difference between revisions)
Revision as of 22:19, 7 June 2006
Matthias (Talk | contribs)

← Previous diff
Revision as of 22:19, 7 June 2006
Matthias (Talk | contribs)

Next diff →
Line 64: Line 64:
-L, --showlinks - hide/display links column in html output ('1') -L, --showlinks - hide/display links column in html output ('1')
possible values: 0, 1 possible values: 0, 1
- -H, --host - URL of the refbase database ('http://polaris.ipoe.uni-kiel.de/refs/'')+ -H, --host - URL of the refbase database ('http://polaris.ipoe.uni-kiel.de/refs/')
-O, --order - sort order of returned records ('author') -O, --order - sort order of returned records ('author')
possible values: author, year, type, type-year possible values: author, year, type, type-year

Revision as of 22:19, 7 June 2006

This page documents the refbase command line client.


Contents

refbase command line client

refbase >v0.8.0 comes with a command line client written in Perl which allows you to search a refbase online database from the command line and retrieve results in various formats.

Syntax

For help with the syntax type:

refbase -h
refbase --help

This will print the usage screen:

refbase command line client, v1.0 by Matthias Steffens, http://cli.refbase.net/

Usage:   refbase [OPTIONS]

Notes:   - At least one query option must be given and unrecognized options will be ignored.
         - If multiple options are given, they will by default be connected with 'AND'. Use
           '--query=or' to connect multiple options with 'OR'.
         - Options syntax: [OPTION]=[VALUE], e.g. '-a=steffens' or '--author="steffens, m"'.
         - Returns up to '--rows' number of records beginning with '--start'. If all given
           query options are empty, all database records will be returned.
         - Note that '--records' assumes a list of full record serials separated by non-digit
           characters while '--serial' allows for partial matches.
         - For each option, default values can be specified at the top of the script.
           Current defaults are given in parentheses.

General Options:   -h, --help        - display this help text
                   -v, --version     - display version information
                   -X, --examples    - display usage examples

Query Options:     -a, --author      - search author field (' ')
                   -b, --abstract    - search abstract field (' ')
                   -c, --citekey     - search cite_key field, requires '-u, --userid' (' ')
                   -d, --date        - search by creation date (' ')
                   -e, --area        - search area field (' ')
                   -f, --thesis      - search thesis field (' ')
                   -i, --contribid   - search contribution_id field (' ')
                   -j, --journal     - search abbrev_journal field (' ')
                   -k, --keywords    - search keywords field (' ')
                   -l, --location    - search location field (' ')
                   -m, --marked      - search marked field, requires '-u, --userid' (' ')
                   -n, --notes       - search notes field (' ')
                   -p, --publication - search publication field (' ')
                   -q, --query       - query type, possible values: and, or ('and')
                   -r, --records     - search serial field (' ')
                   -s, --selected    - search selected field, requires '-u, --userid' (' ')
                   -t, --title       - search title field (' ')
                   -u, --userid      - join with user-specific data from user ID (' ')
                   -w, --where       - search by using a raw sql where clause (' ')
                   -x, --type        - search type field (' ')
                   -y, --year        - search year field (' ')
                   -z, --serial      - search serial field (partial matches) ('.+')

Output Options:    -C, --style       - citation style (' ')
                   -F, --format      - output format ('text')
                                       possible values: html, rtf, latex, markdown, text,
                                                        bibtex, endnote, ris, mods, srw, odf
                   -L, --showlinks   - hide/display links column in html output ('1')
                                       possible values: 0, 1
                   -H, --host        - URL of the refbase database ('http://polaris.ipoe.uni-kiel.de/refs/')
                   -O, --order       - sort order of returned records ('author')
                                       possible values: author, year, type, type-year
                   -Q, --showquery   - hide/display SQL query in html output ('0')
                                       possible values: 0, 1
                   -R, --rows        - number of records to be returned (' ')
                   -S, --start       - number of first record to be returned ('1')
                   -V, --view        - view type of html output ('web')
                                       possible values: web, print

Current Limitations

  • Currently, this utility supports search & retrieve, but does not support update actions such as add, edit or delete.
  • This script is currently just an interface to show.php, which for example does not support arbitrary sort orders.
  • User authentication has not been implemented. This means that, except for querying the user-specific fields cite_key, marked and selected, this script cannot access other user-specific information or display user-specific cite keys.
  • Specifying the record offset (--start) as well as the number of records to be returned (--rows) will only work for the formats html, rtf, latex, markdown, text and srw, since the other formats are designed to always export all of the found records. Note that for html, --start is adjusted to the next lower value that is an exact multiple of --rows (which ensures correct behaviour of the browse links).