Back Table of contents Index Next   BibTool Manual
Reference Manual
Field Manipulation
Adding or Deleting Fields

Adding or Deleting Fields

Certain fields can be added or deleted. This feature can be used to update time stamps. For this purpose it is important to know that deletion is done before addition. It is also important to know that the newly added entries are not rewritten (see next section) even though rewrite rules are applicable.

Two resources are provided to accomplish adding and deleting fields: add.field and delete.field

add.field = {field=value}

This instruction replaces the contents of the field field by value in each entry. If this field does not exist already then it is added first. The additions are applied in the sequence they are given.

value can contain formatting instructions already introduced in the section Formatting Fields about ``Formatting Fields'' on page Formatting Fields.

Suppose a time stamp is stored in the field time. With these resources the update of a time-stamp can be achieved using the resource instructions

add.field = {time="June 13, 2000"}

If you want to update all time fields to contain the current date the following instruction can be used. It makes use of the pseudo fields (see page Pseudo Fields).

add.field = {time="%s($mon) %s($day), %s($year)"}

If you want to strip the month to three leading letters and the year to two trailing digits this can be achieved with the following instruction:

add.field = {time="%3s($mon) %s($day), %2d($year)"}

The following instruction deletes all fields named field:

delete.field = {field}



Back Table of contents Index Next   BibTool Manual
Reference Manual
Field Manipulation
Adding or Deleting Fields
© 1999 Gerd Neugebauer