[pybliographer] Rename scripts to avoid collision names with pybtex
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pybliographer] Rename scripts to avoid collision names with pybtex
- Date: Wed, 31 Jul 2013 01:11:06 +0000 (UTC)
commit 6f1296f6f633f3fc20d11fdccf4dbb2bd10286c3
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Tue Jul 30 17:47:57 2013 -0700
Rename scripts to avoid collision names with pybtex
Reported on May 26, 2013 by Michael G. Prisant. See:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540529
scripts/Makefile.am | 36 +++++++++++++-------------
scripts/{pybcheck.py => pybliocheck.py} | 2 +-
scripts/{pybcompact.py => pybliocompact.py} | 4 +-
scripts/{pybconvert.py => pyblioconvert.py} | 4 +-
scripts/{pybformat.py => pyblioformat.py} | 10 +++---
scripts/{pybtex.py => pybliotex.py} | 6 ++--
scripts/{pybtext.py => pybliotext.py} | 8 +++---
tests/Makefile.am | 10 +++---
tests/compact | 2 +-
tests/convert | 2 +-
tests/{pybformat => pyblioformat} | 2 +-
tests/{pybtex => pybliotex} | 2 +-
tests/{pybtext => pybliotext} | 2 +-
tests/test-pybcheck | 15 -----------
tests/test-pybliocheck | 15 +++++++++++
15 files changed, 60 insertions(+), 60 deletions(-)
---
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 16d7757..a7095a3 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -22,31 +22,31 @@
pybdir = $(datadir)/$(PACKAGE)
bin_SCRIPTS = pybliographic \
- pybcheck \
- pybconvert \
- pybcompact \
- pybtex \
- pybformat \
- pybtext
+ pybliocheck \
+ pyblioconvert \
+ pybliocompact \
+ pybliotex \
+ pyblioformat \
+ pybliotext
pyb_DATA = pybliographic.py \
- pybcheck.py \
- pybconvert.py \
- pybcompact.py \
- pybtex.py \
- pybformat.py \
- pybtext.py
+ pybliocheck.py \
+ pyblioconvert.py \
+ pybliocompact.py \
+ pybliotex.py \
+ pyblioformat.py \
+ pybliotext.py
noinst_SCRIPTS = pybscript
EXTRA_DIST = pybscript.in \
pybliographic.py \
- pybcheck.py \
- pybconvert.py \
- pybtex.py \
- pybformat.py \
- pybcompact.py \
- pybtext.py
+ pybliocheck.py \
+ pyblioconvert.py \
+ pybliotex.py \
+ pyblioformat.py \
+ pybliocompact.py \
+ pybliotext.py
#pybliographic pybcheck pybconvert pybcompact pybtex pybformat pybtext:
$(bin_SCRIPTS):
diff --git a/scripts/pybcheck.py b/scripts/pybliocheck.py
similarity index 96%
rename from scripts/pybcheck.py
rename to scripts/pybliocheck.py
index 20bae3f..06e889b 100644
--- a/scripts/pybcheck.py
+++ b/scripts/pybliocheck.py
@@ -28,7 +28,7 @@ charset = locale.getlocale () [1] or 'ascii'
# check the arguments
if len (sys.argv) < 3:
- print _("usage: pybcheck <file | directory>...").encode (charset)
+ print _("usage: pybliocheck <file | directory>...").encode (charset)
sys.exit (1)
# list containing the broken entries
diff --git a/scripts/pybcompact.py b/scripts/pybliocompact.py
similarity index 96%
rename from scripts/pybcompact.py
rename to scripts/pybliocompact.py
index abb7839..904cf1e 100644
--- a/scripts/pybcompact.py
+++ b/scripts/pybliocompact.py
@@ -27,11 +27,11 @@ import locale
charset = locale.getlocale () [1] or 'ascii'
def usage ():
- print _("usage: pybcompact <latexfile> <bibtexfiles...>").encode (charset)
+ print _("usage: pybliocompact <latexfile> <bibtexfiles...>").encode (charset)
return
def error (msg):
- sys.stderr.write ((_("pybcompact: error: %s\n") % msg).encode (charset))
+ sys.stderr.write ((_("pybliocompact: error: %s\n") % msg).encode (charset))
sys.exit (1)
return
diff --git a/scripts/pybconvert.py b/scripts/pyblioconvert.py
similarity index 89%
rename from scripts/pybconvert.py
rename to scripts/pyblioconvert.py
index e4b799a..5ecf7ed 100644
--- a/scripts/pybconvert.py
+++ b/scripts/pyblioconvert.py
@@ -26,7 +26,7 @@ import locale
charset = locale.getlocale () [1] or 'ascii'
if len (sys.argv) < 4 or len (sys.argv) > 5:
- print _("usage: pybconvert <source>..<target> <input> [output]").encode (charset)
+ print _("usage: pyblioconvert <source>..<target> <input> [output]").encode (charset)
sys.exit (1)
@@ -35,7 +35,7 @@ format = sys.argv [2]
try:
source, target = string.split (format, '..')
except:
- print _("pybconvert: error: bad conversion format").encode (charset)
+ print _("pyblioconvert: error: bad conversion format").encode (charset)
sys.exit (1)
diff --git a/scripts/pybformat.py b/scripts/pyblioformat.py
similarity index 91%
rename from scripts/pybformat.py
rename to scripts/pyblioformat.py
index 222b27a..fa7ab8d 100644
--- a/scripts/pybformat.py
+++ b/scripts/pyblioformat.py
@@ -31,7 +31,7 @@ import locale
charset = locale.getlocale () [1] or 'ascii'
def usage ():
- print _("""usage: pybformat [options] <database...>
+ print _("""usage: pyblioformat [options] <database...>
options:
-o file, --output=file specify an output filename
@@ -45,13 +45,13 @@ def usage ():
return
def error (text, exit = 1):
- sys.stderr.write ((_("pybformat: error: %s\n") % text).encode (charset))
+ sys.stderr.write ((_("pyblioformat: error: %s\n") % text).encode (charset))
if exit:
sys.exit (1)
return
def warning (text, exit = 0):
- sys.stderr.write ((_("pybformat: warning: %s\n") % text).encode (charset))
+ sys.stderr.write ((_("pyblioformat: warning: %s\n") % text).encode (charset))
if exit:
sys.exit (1)
return
@@ -100,7 +100,7 @@ for opt, value in optlist:
error (_("unknown list `%s'") % value)
if list:
- print (_("pybformat: available values for `%s':") % value).encode (charset)
+ print (_("pyblioformat: available values for `%s':") % value).encode (charset)
print " " + string.join (list, ", ")
sys.exit (0)
else:
@@ -149,7 +149,7 @@ if not url:
error (_("can't find style `%s'") % style)
-sys.stderr.write ((_("pybformat: using style `%s', format `%s'\n") % (style, output.name)).encode (charset))
+sys.stderr.write ((_("pyblioformat: using style `%s', format `%s'\n") % (style, output.name)).encode
(charset))
formatter = output.data
diff --git a/scripts/pybtex.py b/scripts/pybliotex.py
similarity index 91%
rename from scripts/pybtex.py
rename to scripts/pybliotex.py
index c6a961c..e889519 100644
--- a/scripts/pybtex.py
+++ b/scripts/pybliotex.py
@@ -31,11 +31,11 @@ import locale
charset = locale.getlocale () [1] or 'ascii'
def usage ():
- print _("usage: pybtex <latexfile> [bibtexfiles...]").encode (charset)
+ print _("usage: pybliotex <latexfile> [bibtexfiles...]").encode (charset)
return
def error (message):
- sys.stderr.write ((_("pybtex: error: %s\n") % message).encode (charset))
+ sys.stderr.write ((_("pybliotex: error: %s\n") % message).encode (charset))
sys.exit (1)
return
@@ -56,7 +56,7 @@ db, keys, style, missing = latexutils.find_entries (latex, bibtex)
if missing:
# warn the user that some entries were not found
- print _("pybtex: warning: the following keys were not resolved").encode (charset)
+ print _("pybliotex: warning: the following keys were not resolved").encode (charset)
print ' ' + string.join (missing, '\n ') + '\n'
if style is None:
diff --git a/scripts/pybtext.py b/scripts/pybliotext.py
similarity index 95%
rename from scripts/pybtext.py
rename to scripts/pybliotext.py
index ec0e36a..c20eed9 100644
--- a/scripts/pybtext.py
+++ b/scripts/pybliotext.py
@@ -38,16 +38,16 @@ import locale
charset = locale.getlocale () [1] or 'ascii'
def usage ():
- print _("usage: pybtext [-o outputfile] [-s style] <textfile> <bibfiles...>").encode (charset)
+ print _("usage: pybliotext [-o outputfile] [-s style] <textfile> <bibfiles...>").encode (charset)
return
def error (msg):
- sys.stderr.write ((_("pybtext: error: %s\n") % msg).encode (charset))
+ sys.stderr.write ((_("pybliotext: error: %s\n") % msg).encode (charset))
sys.exit (1)
return
def warning (msg, exit = 0):
- sys.stderr.write ((_("pybtext: warning: %s\n") % msg).encode (charset))
+ sys.stderr.write ((_("pybliotext: warning: %s\n") % msg).encode (charset))
if exit:
sys.exit (1)
return
@@ -190,7 +190,7 @@ entries = h
order = copy.copy (entries)
-sys.stderr.write ((_("pybtext: using style `%s', format `%s'\n") % (style, output.name)).encode (charset))
+sys.stderr.write ((_("pybliotext: using style `%s', format `%s'\n") % (style, output.name)).encode (charset))
formatter = output.data
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ae29411..9cac4e2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,14 +22,14 @@
TESTS = \
$(srcdir)/import-export \
- $(srcdir)/test-pybcheck \
+ $(srcdir)/test-pybliocheck \
$(srcdir)/convert \
- $(srcdir)/pybformat \
- $(srcdir)/pybtex \
+ $(srcdir)/pyblioformat \
+ $(srcdir)/pybliotex \
$(srcdir)/compact \
$(srcdir)/format \
$(srcdir)/format2 \
- $(srcdir)/pybtext
+ $(srcdir)/pybliotext
EXTRA_DIST = \
bibtex.bib \
@@ -75,5 +75,5 @@ EXTRA_DIST = \
refer.refer \
reorder.py \
testing.sh \
- test-pybcheck
+ test-pybliocheck
diff --git a/tests/compact b/tests/compact
index adf0200..483cb97 100755
--- a/tests/compact
+++ b/tests/compact
@@ -4,7 +4,7 @@
tst_start
-com="../pybliographer -q ${srcdir}/../scripts/pybcompact.py"
+com="../pybliographer -q ${srcdir}/../scripts/pybliocompact.py"
run ${com} ${srcdir}/compact ${srcdir}/bibtex.bib > tmp.bib
run diff tmp.bib ${srcdir}/compact.bib
diff --git a/tests/convert b/tests/convert
index e05839b..5161c95 100755
--- a/tests/convert
+++ b/tests/convert
@@ -4,7 +4,7 @@
tst_start
-com="../pybliographer -q ${srcdir}/../scripts/pybconvert.py"
+com="../pybliographer -q ${srcdir}/../scripts/pyblioconvert.py"
for file in medline pubmed ; do
diff --git a/tests/pybformat b/tests/pyblioformat
similarity index 72%
rename from tests/pybformat
rename to tests/pyblioformat
index 90c04f6..e542394 100755
--- a/tests/pybformat
+++ b/tests/pyblioformat
@@ -4,7 +4,7 @@
tst_start
-com="../pybliographer -q ${srcdir}/../scripts/pybformat.py --"
+com="../pybliographer -q ${srcdir}/../scripts/pyblioformat.py --"
run ${com} -o tmp.text ${srcdir}/bibtex.bib > /dev/null
run diff tmp.text ${srcdir}/bibtex.text
diff --git a/tests/pybtex b/tests/pybliotex
similarity index 76%
rename from tests/pybtex
rename to tests/pybliotex
index 19ebee3..b96301c 100755
--- a/tests/pybtex
+++ b/tests/pybliotex
@@ -4,7 +4,7 @@
tst_start
-com="../pybliographer -q ${srcdir}/../scripts/pybtex.py"
+com="../pybliographer -q ${srcdir}/../scripts/pybliotex.py"
run ${com} ${srcdir}/document ${srcdir}/bibtex.bib > /dev/null
run diff document.bbl ${srcdir}/document.bbl.ref
diff --git a/tests/pybtext b/tests/pybliotext
similarity index 83%
rename from tests/pybtext
rename to tests/pybliotext
index 49e4d53..fae5161 100755
--- a/tests/pybtext
+++ b/tests/pybliotext
@@ -4,7 +4,7 @@
tst_start
-com="../pybliographer -q ${srcdir}/../scripts/pybtext.py"
+com="../pybliographer -q ${srcdir}/../scripts/pybliotext.py"
for style in Alpha abbrvbib abbrvnum abbrvau ; do
run ${com} -o tmp.text -s ${srcdir}/../Styles/${style} ${srcdir}/pybtext.txt ${srcdir}/pybtext.bib >
/dev/null
diff --git a/tests/test-pybliocheck b/tests/test-pybliocheck
new file mode 100755
index 0000000..2b1b743
--- /dev/null
+++ b/tests/test-pybliocheck
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. ${srcdir}/testing.sh
+
+tst_start
+
+run ../pybliographer -q ${srcdir}/../scripts/pybliocheck.py ${srcdir}/bibtex.bib > /dev/null 2>&1
+
+../pybliographer -q ${srcdir}/../scripts/pybliocheck.py ${srcdir}/broken.bib > /dev/null 2>&1
+if test $? = 0 ; then
+ echo "should have failed !"
+ exit 1
+fi
+
+tst_stop
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]