Command line clients

From refbase

(Difference between revisions)
Revision as of 16:55, 7 June 2006
Matthias (Talk | contribs)
initial page content
← Previous diff
Revision as of 17:01, 7 June 2006
Matthias (Talk | contribs)
fixed display glitches & changed some of the example defaults
Next diff →
Line 34: Line 34:
-X, --examples - display usage examples -X, --examples - display usage examples
- Query Options: -a, --author - search author field ('')+ Query Options: -a, --author - search author field (' ')
- -b, --abstract - search abstract field ('')+ -b, --abstract - search abstract field (' ')
- -c, --citekey - search cite_key field, requires '-u, --userid' ('')+ -c, --citekey - search cite_key field, requires '-u, --userid' (' ')
- -d, --date - search by date ('')+ -d, --date - search by date (' ')
- -e, --area - search area field ('')+ -e, --area - search area field (' ')
- -h, --thesis - search thesis field ('')+ -h, --thesis - search thesis field (' ')
- -i, --contribid - search contribution_id field ('')+ -i, --contribid - search contribution_id field (' ')
- -j, --journal - search abbrev_journal field ('')+ -j, --journal - search abbrev_journal field (' ')
- -k, --keywords - search keywords field ('')+ -k, --keywords - search keywords field (' ')
- -m, --marked - search marked field, requires '-u, --userid' ('')+ -m, --marked - search marked field, requires '-u, --userid' (' ')
- -p, --publication - search publication field ('')+ -p, --publication - search publication field (' ')
- -r, --records - search serial field ('')+ -r, --records - search serial field (' ')
- -s, --selected - search selected field, requires '-u, --userid' ('')+ -s, --selected - search selected field, requires '-u, --userid' (' ')
- -t, --title - search title field ('')+ -t, --title - search title field (' ')
- -u, --userid - restrict to user ID ('2')+ -u, --userid - restrict to user ID (' ')
- -x, --type - search type field ('')+ -x, --type - search type field (' ')
- -y, --year - search year field ('')+ -y, --year - search year field (' ')
-z, --serial - search serial field (partial matches) ('.+') -z, --serial - search serial field (partial matches) ('.+')
- Output Options: -C, --style - citation style ('')+ Output Options: -C, --style - citation style (' ')
-F, --format - output format ('text') -F, --format - output format ('text')
possible values: html, rtf, latex, markdown, text, possible values: html, rtf, latex, markdown, text,
Line 59: Line 59:
-L, --links - hide/display links column in html output ('1') -L, --links - hide/display links column in html output ('1')
possible values: 0, 1 possible values: 0, 1
- -H, --host - URL of the refbase database ('http://localhost/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
-Q, --query - hide/display SQL query in html output ('0') -Q, --query - hide/display SQL query in html output ('0')
possible values: 0, 1 possible values: 0, 1
- -R, --rows - number of records to be returned ('')+ -R, --rows - number of records to be returned (' ')
-S, --start - number of first record to be returned ('1') -S, --start - number of first record to be returned ('1')
-V, --view - view type of html output ('web') -V, --view - view type of html output ('web')

Revision as of 17:01, 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, these will be joined to form an 'AND' query.
         - 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 parameter, 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 date (' ')
                   -e, --area        - search area field (' ')
                   -h, --thesis      - search thesis field (' ')
                   -i, --contribid   - search contribution_id field (' ')
                   -j, --journal     - search abbrev_journal field (' ')
                   -k, --keywords    - search keywords field (' ')
                   -m, --marked      - search marked field, requires '-u, --userid' (' ')
                   -p, --publication - search publication field (' ')
                   -r, --records     - search serial field (' ')
                   -s, --selected    - search selected field, requires '-u, --userid' (' ')
                   -t, --title       - search title field (' ')
                   -u, --userid      - restrict to user ID (' ')
                   -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, --links       - 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, --query       - 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 means that it doesn't support arbitrary queries or 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 nor can it 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).