Added small script to process bibtex files
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Remove unwanted data from bibtex file by deleting "bad" lines and
|
||||
# cleaning "good" ones.
|
||||
|
||||
if test "X$RECOLL_FILTER_FORPREVIEW" = "Xyes" ; then
|
||||
sed \
|
||||
-e '/^$/N;/^\n$/D' \
|
||||
-e '/(bibdsk.*|month|bibsource|crossref|ee|groups|owner|pages|timestamp|url|file|price|citeulike.*|markedentry|posted-at)[[:space:]=]*/I d' \
|
||||
-e '/@[^{]*{/ d' \
|
||||
\
|
||||
-e 's/{//g' \
|
||||
-e 's/},\?$//g' \
|
||||
-e 's/^[ ]*//' \
|
||||
< $1
|
||||
else
|
||||
sed -e '/(bibdsk.*|month|bibsource|crossref|ee|groups|owner|pages|timestamp|url|file|price|citeulike.*|markedentry|posted-at)[[:space:]=]*/I d' \
|
||||
-e '/@[^{]*{/ d' \
|
||||
\
|
||||
-e 's/^[^{]*{//g' \
|
||||
-e 's/},\?$//g' \
|
||||
-e 's/({|}|=)//g' \
|
||||
< $1
|
||||
fi
|
||||
Reference in New Issue
Block a user