-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from mtsonline/prepare_beta4
preparing beta 4
- Loading branch information
Showing
9 changed files
with
131 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import argparse, sys, os, logging, yaml, urllib, json | ||
from bigbluebutton_api_python import BigBlueButton | ||
|
||
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-s","--server", help="Big Blue Button Server URL") | ||
parser.add_argument("-c","--config", help="path to config file in yaml format e.g. your docker-compose.yml", default="../docker-compose.yml") | ||
parser.add_argument("-p","--secret", help="Big Blue Button Secret") | ||
args = parser.parse_args() | ||
|
||
def get_config_item(list_item): | ||
try: | ||
with open(args.config) as file: | ||
config = yaml.load(file) | ||
except FileNotFoundError as ERR: | ||
logging.error(ERR) | ||
sys.exit() | ||
|
||
docker_environment = config['services']['bbb-streamer']['environment'] | ||
for line in docker_environment: | ||
if line.strip().startswith(list_item): | ||
return line.partition('=')[2] | ||
|
||
def get_meetings(): | ||
logging.info("fetching meetings from {}".format(args.server)) | ||
try: | ||
return bbb.get_meetings() | ||
except urllib.error.URLError as ERR: | ||
logging.error(ERR) | ||
sys.exit() | ||
|
||
if args.config: | ||
args.server = get_config_item('BBB_URL') | ||
args.secret = get_config_item('BBB_SECRET') | ||
if not args.server and not args.secret: | ||
logging.error("Error: Please specify server and password or the path to the config file") | ||
sys.exit() | ||
|
||
bbb = BigBlueButton(args.server,args.secret) | ||
meetings = get_meetings() | ||
for meeting in meetings['xml']['meetings']: | ||
print(meetings['xml']['meetings'][meeting]['meetingName']) | ||
print("ID: {}".format(meetings['xml']['meetings'][meeting]['meetingID'])) | ||
print("ATTENDEE_PASSWORD: {}".format(meetings['xml']['meetings'][meeting]['attendeePW'])) | ||
print("MODERATOR_PASSWORD: {}".format(meetings['xml']['meetings'][meeting]['moderatorPW'])) | ||
print("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters