|
| 1 | +#!@PYTHON@ |
| 2 | +## -*- mode: python; coding: utf-8; -*- |
| 3 | +## |
| 4 | +## This file is part of Invenio. |
| 5 | +## Copyright (C) 2013 CERN. |
| 6 | +## |
| 7 | +## Invenio is free software; you can redistribute it and/or |
| 8 | +## modify it under the terms of the GNU General Public License as |
| 9 | +## published by the Free Software Foundation; either version 2 of the |
| 10 | +## License, or (at your option) any later version. |
| 11 | +## |
| 12 | +## Invenio is distributed in the hope that it will be useful, but |
| 13 | +## WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | +## General Public License for more details. |
| 16 | +## |
| 17 | +## You should have received a copy of the GNU General Public License |
| 18 | +## along with Invenio; if not, write to the Free Software Foundation, Inc., |
| 19 | +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 20 | + |
| 21 | +""" |
| 22 | + "bibcheck" is used to check a set of records against a |
| 23 | + configurable set of rules. A rule consists of a query, a |
| 24 | + checker and an amender. The set of records that |
| 25 | + match the query are checked with the checker and the records |
| 26 | + that don't pass the test will be passed to the amender. An |
| 27 | + amender can try to fix the record automatically or request a |
| 28 | + human to fix the record. |
| 29 | +
|
| 30 | + The checkers and amenders are loaded via a plug-in system, so |
| 31 | + it's easy to add new checkers or amenders. |
| 32 | +""" |
| 33 | + |
| 34 | +from invenio.bibcheck_task import main as cli_main |
| 35 | + |
| 36 | +if __name__ == '__main__': |
| 37 | + try: |
| 38 | + cli_main() |
| 39 | + except KeyboardInterrupt: |
| 40 | + # Exit cleanly |
| 41 | + print 'Interrupted' |
0 commit comments