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"]
|
authors = ["Tobias Diekershoff"]
|
||||||
license = "GNU General Public License v3.0"
|
license = "GNU General Public License v3.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
include = [
|
||||||
|
{ path = "src/brewserverblocklist" },
|
||||||
|
]
|
||||||
|
packages = [
|
||||||
|
{ include = "brewserverblocklist", from = "src"},
|
||||||
|
{ include = "bargparse", from = "src"}
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
brewserverblocklist = "brewserverblocklist.brewserverblocklist:main"
|
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
|
import sys
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
import requests
|
import requests
|
||||||
import bargparse
|
from bargparse.bargparse import MyParser
|
||||||
|
|
||||||
class BrewBlocklist():
|
class BrewBlocklist():
|
||||||
"""
|
"""
|
||||||
|
@ -157,7 +157,7 @@ def main():
|
||||||
* collect the ingredient
|
* collect the ingredient
|
||||||
* serve the result
|
* serve the result
|
||||||
"""
|
"""
|
||||||
parser = bargparse.MyParser()
|
parser = MyParser()
|
||||||
parser.add_argument('-c', '--config',
|
parser.add_argument('-c', '--config',
|
||||||
dest='configfile',
|
dest='configfile',
|
||||||
required=True,
|
required=True,
|
||||||
|
|
Loading…
Reference in a new issue