Skip to content

Commit

Permalink
+cli
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Jan 24, 2020
1 parent 2f18fb8 commit fb661ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dephell_changelogs/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from ._cli import entrypoint

entrypoint()
17 changes: 17 additions & 0 deletions dephell_changelogs/_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import sys

from ._finder import get_changelog_url


def main(argv) -> int:
if not argv:
raise ValueError('project name or URL required')
url = get_changelog_url(argv[0])
if not url:
return 1
print(url)
return 0


def entrypoint():
sys.exit(main(sys.argv[1:]))

0 comments on commit fb661ff

Please sign in to comment.