From dbff7fd2256e4f3e39cb62a63a226391b51f7dfe Mon Sep 17 00:00:00 2001 From: atoav <dh@atoav.com> Date: Tue, 28 Apr 2020 10:17:01 +0200 Subject: [PATCH] Add Readme and release to pypi --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ bbbmon/bbbmon.py | 5 +---- pyproject.toml | 21 +++++++++++++++++---- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e69de29..cd3dbdd 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,43 @@ +# bbbmon + +A small python based CLI utility to monitor BigBlueButton-Usage. + +## Installation + +The easiest way to install bbbmon is to install it from the Python Package Index (PyPi). This project uses [python poetry](https://python-poetry.org/) for dependency management, so you could also run it without installing the package system wide, see instructions below. + +## Install with pip3 + +```bash +sudo pip3 install bbbmon --upgrade +``` + +Then run with: + +```bash +bbbmon +``` + +## Run with poetry (without pip) + +Clone the repo: + +```bash +git clone https://code.hfbk.net/bbb/bbbmon.git +``` + +Make sure you have poetry installed. Install instruction for poetry can be [found here](https://python-poetry.org/docs/#installation). +From inside the project directory run: + +```bash +poetry install +``` + +Run bbbmon with: + +```bash +poetry run bbbmon +``` + +For bbbmon to run you need to have a `bbbmon.properties` file at the path specified. In this file there should be your servers secret and the server URL. You can find this secret on your server in the file `/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties` (look for a line starting with `securitySalt=` and copy it to). If in doubt just follow the instructions the CLI gives you. + diff --git a/bbbmon/bbbmon.py b/bbbmon/bbbmon.py index ce51498..56fe7e7 100755 --- a/bbbmon/bbbmon.py +++ b/bbbmon/bbbmon.py @@ -299,7 +299,4 @@ def init_variables() -> Optional[Tuple[Secret, Url]]: def main(): secret, bbb_url = init_variables() - print_overview(secret, bbb_url) - -if __name__ == "__main__": - main() \ No newline at end of file + print_overview(secret, bbb_url) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3c6fbe1..9a6cd62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,23 @@ [tool.poetry] name = "bbbmon" -version = "0.1.0" +version = "0.1.5" description = "A small CLI utility to monitor bbb usage" authors = ["David Huss <david.huss@hfbk-hamburg.de>"] -license = "MIT" +maintainers = ["David Huss <david.huss@hfbk-hamburg.de>"] +license = "GPLv3" +readme = "README.md" +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: System Administrators", + "License :: Free for non-commercial use", + "License :: Free For Educational Use", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python :: 3.6", + "Topic :: System :: Monitoring", + "Topic :: Communications :: Conferencing" +] [tool.poetry.dependencies] python = "^3.5" @@ -14,8 +28,7 @@ appdirs = "^1.4.3" pytest = "^5.2" [tool.poetry.scripts] -# bbbmon = { path = "bbbmon.py" } -run = "bbbmon.bbbmon:main" +bbbmon = "bbbmon.bbbmon:main" [build-system] requires = ["poetry>=0.12"] -- GitLab