added module bargparse to the project
This commit is contained in:
parent
c230c64680
commit
423897a9a3
|
@ -5,6 +5,13 @@ description = "A python script to collect the server-wide blocklists from Friend
|
|||
authors = ["Tobias Diekershoff"]
|
||||
license = "GNU General Public License v3.0"
|
||||
readme = "README.md"
|
||||
include = [
|
||||
{ path = "src/brewserverblocklist" },
|
||||
]
|
||||
packages = [
|
||||
{ include = "brewserverblocklist", from = "src"},
|
||||
{ include = "bargparse", from = "src"}
|
||||
]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
brewserverblocklist = "brewserverblocklist.brewserverblocklist:main"
|
||||
|
|
5
src/bargparse/__init__.py
Normal file
5
src/bargparse/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 Tobias Diekershoff
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
@ -12,7 +12,7 @@ import configparser
|
|||
import sys
|
||||
from os.path import exists
|
||||
import requests
|
||||
import bargparse
|
||||
from bargparse.bargparse import MyParser
|
||||
|
||||
class BrewBlocklist():
|
||||
"""
|
||||
|
@ -157,7 +157,7 @@ def main():
|
|||
* collect the ingredient
|
||||
* serve the result
|
||||
"""
|
||||
parser = bargparse.MyParser()
|
||||
parser = MyParser()
|
||||
parser.add_argument('-c', '--config',
|
||||
dest='configfile',
|
||||
required=True,
|
||||
|
|
Loading…
Reference in a new issue