Skip to content

Commit

Permalink
set loglevel
Browse files Browse the repository at this point in the history
  • Loading branch information
yindaheng98 committed Apr 22, 2024
1 parent 06268fa commit b5fcb3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion citation_crawler/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@

parser.add_argument("-y", "--year", type=int, help="Only crawl the paper after the specified year.", default=2000)
parser.add_argument("-l", "--limit", type=int, help="Limitation of BFS depth.", default=-1)
parser.add_argument(
'-v', '--verbose',
help="Print lots of debugging statements",
action="store_const", dest="loglevel", const=logging.DEBUG,
default=logging.INFO,
)
add_argument_kw(parser)
add_argument_pid(parser)
add_argument_aid(parser)


def func_parser(parser):
args = parser.parse_args()
logging.basicConfig(level=args.loglevel)
year = args.year
limit = args.limit
keywords = parse_args_kw(parser)
Expand Down Expand Up @@ -112,7 +119,8 @@ async def filter_papers(self, papers):
parser_n4j.add_argument("--username", type=str, default=None, help=f'Auth username to neo4j database.')
parser_n4j.add_argument("--password", type=str, default=None, help=f'Auth password to neo4j database.')
parser_n4j.add_argument("--uri", type=str, required=True, help=f'URI to neo4j database.')
parser_n4j.add_argument("--no-skip-exists", action="store_true", help=f'Do not skip exists references. Use it when you want to rewrite all papers.')
parser_n4j.add_argument("--no-skip-exists", action="store_true",
help=f'Do not skip exists references. Use it when you want to rewrite all papers.')


async def func_parser_n4j_async(parser):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name='citation_crawler',
version='2.9.2',
version='2.9.3',
author='yindaheng98',
author_email='[email protected]',
url='https://github.com/yindaheng98/citation-crawler',
Expand Down

0 comments on commit b5fcb3b

Please sign in to comment.