Skip to content

Commit

Permalink
Make into package
Browse files Browse the repository at this point in the history
  • Loading branch information
gchers committed Mar 29, 2021
1 parent 5571763 commit 61fa90f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions grobid_client.py → grobid_client/grobid_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import requests
import pathlib

from client import ApiClient
from .client import ApiClient


class GrobidClient(ApiClient):
Expand Down Expand Up @@ -258,7 +258,7 @@ def process_pdf(
return (pdf_file, status, res.text)


if __name__ == "__main__":
def main():
valid_services = [
"processFulltextDocument",
"processHeaderDocument",
Expand Down Expand Up @@ -385,3 +385,6 @@ def process_pdf(

runtime = round(time.time() - start_time, 3)
print("runtime: %s seconds " % (runtime))

if __name__ == "__main__":
main()
File renamed without changes.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
description='grobid_client_python',
author='kermitt2',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
entry_points={
'console_scripts': ['grobid_client=grobid_client.grobid_client:main']
},
license='LICENSE',
)

0 comments on commit 61fa90f

Please sign in to comment.