.TH "EndNoteTag" 1 "Mon Dec 7 2015" "Version 2015-12-07" "r2bib" \" -*- nroff -*- .ad l .nh .SH NAME EndNoteTag \- change tags in EndNote input files .PP .SH "SYNOPSIS " .PP .PP EndNoteTag [-R] aA [bB c dD \&.\&.\&.] .PP .SH "DESCRIPTION " .PP .PP \fIEndNoteTag\fP reads the standard input and writes on standard output, which means it is a UNIX pipe\&. .PP \fIEndNoteTag\fP copies the standard input to the standard output and modifies EndNote tags (that is lines which start with a percent sign followed by a single letter or number-subsequently called a tag-and a blank) which are either substituted by other tags or removed\&. .PP The action on each tagged line is defined by command line arguments which are either 2-letter words (indicating substitution, symbolized by combinations aA, bB or dD in the synopsis) or 1-letter words (indicating removal, symbolized by c in the synopsis)\&. For the case of 2-letter words, the first letter is the original tag and the second letter the tag on output, whereas the 1-letter words only show the tag to be removed\&. .PP The order of substitution/removal is determined by the order of command line arguments (left to right)\&. The are executed individually for each EndNote entry in that order\&. .PP If the option -R is used, the standard input is interpreted as having multi-letter tags followed by one blanks and a hyphen\&. In this case all remaining command line options are words where the last letter is the EndNote tag on output that replaces the RIS tag indicated by the first letters, and where all RIS tags not mentioned in any command line option are removed\&. .PP .SH "COMPILATION " .PP .PP On standard Unices the commands .PP autoreconf -i .PP \&./configure [--prefix=\&.\&.\&.\&.] .PP make install .PP compile and install the program\&. .PP .SH "EXAMPLES " .PP .PP EndNoteTag 1R < infile\&.end > outfile\&.end .PP Replaces the %1 tags by %R tags .PP EndNoteTag 1R ZA = < infile\&.end > outfile\&.end .PP Replaces the %1 tags by %R tags, replaces %Z tags by %A tags, and removes %= tags\&. Note that the original %R and %A tags stay, and one may end up with ambiguous double tags for these\&. .PP EndNoteTag 1t 21 t2 < infile\&.end > outfile\&.end .PP Swaps %1 and %2 tags (the intermediate %t tags do not survive the actions) and replaces %t tags by %1 tags\&. .PP EndNoteTag R < infile\&.end > outfile\&.end .PP Remove %R tags .PP cat infile\&.end | EndNoteTag KR RA .PP Replace %K tags or %R tags effectively by %A tags \&. .PP cat infile\&.end | EndNoteTag KR R > outfile\&.end .PP Remove %K tags and %R tags\&. For the original %R tags, the first command line argument has no effect, but for the original %K tags, they are changed to %R tags by the first command line argument, and then removed on behalf of the second command line argument\&. .PP EndNoteTag R KR < infile\&.end .PP Original %R tags are removed\&. Original %K tags become %R tags\&. Note the difference to the previous example which used a different order of the command line arguments\&. .PP EndNoteTag -R T2 AUA < infile\&.ris .PP Original tags of the AU format are changed to %A EndNote tags\&. All other tags are removed\&. .PP EndNoteTag -R T2 'AU A' 'TITT' < infile\&.ris .PP Original tags of the AU format are changed to %A EndNote tags, and tags of the TIT format are changed to %T EndNote tags\&. All other tags are removed\&. The command line arguments are put into single quotes to prevent the shell from interpreting the blank in the AU tags as a delimiter between command line arguments\&. .PP .SH "NOTES " .PP .PP A list of tags in an EndNote file is obtained for UNIX systems with .PP sed -n '/^%/p' < infile\&.end | cut -b1,2 | sort -u .PP .SH "AUTHOR " .PP .PP Richard J\&. Mathar, http://www.mpia.de/~mathar