Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigBlueButton LiveStreaming
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sergio Vergata
BigBlueButton LiveStreaming
Commits
973d03e6
Commit
973d03e6
authored
5 years ago
by
Martin Schrott
Browse files
Options
Downloads
Patches
Plain Diff
added helper script to get meetings of a BigBlueButton server
parent
c686344d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/get_meetings.py
+48
-0
48 additions, 0 deletions
examples/get_meetings.py
with
48 additions
and
0 deletions
examples/get_meetings.py
0 → 100755
+
48
−
0
View file @
973d03e6
#!/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
(
meetings
[
'
xml
'
][
'
meetings
'
][
meeting
][
'
meetingID
'
])
print
(
""
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment