Models | ||
.gitignore | ||
.gitlab-ci.yml | ||
autoteams.csproj | ||
config.json | ||
ConfigurationManager.cs | ||
credentials.json | ||
fields.json | ||
Logger.cs | ||
MeetingScheduler.cs | ||
Program.cs | ||
README.md | ||
Selectors.cs | ||
StorageContext.cs | ||
TeamsController.cs | ||
Utils.cs |
Features
Parameters
The application can be run without any parameters (default), although it can accept the following parameters:
- -h, --help - this parameter will cause the program to print help information and terminate afterwards
- -v, --verbose - this option will force the program to output debug-level logs (overrides outputDebug in config.json)
- -u, --update - this option will cause the program to synchronize the MS Teams data with the database and terminate afterwards
- -c, --console - this parameter will enable an in-built command line interface, usually used for debugging
The console
The in-built CLI allows the user to input the following commands:
exit
- terminates the programdb
- reloads data from the database (can be used to update meeting data)switch <channel>
- switches to the specified channeljoin <channel>
- joins a meeting in the specified channel
The argument <channel>
has the following format: <teamName>:<channelName>
and is used to designate channels.
Configuration
Field structure:
<fieldName>(<defaultValue>)
config.json
This file contains the general configuration for the application.
Fields:
headlessMode(false)
- if set to true, the web browser will run in headless mode (will not be visible). May increase performance.allowMicrophone(true)
- if set to true, will automatically allow microphone access for the MS Teams web applicationallowWebcam(true)
- if set to true, will automatically allow video device access for the MS Teams web applicationsearchWaitTime(5)
- the time (in seconds) that a program will wait to find an element without timing outloginToPasswordWaitTimeMilis(700)
- the time (in milliseconds) that the program will wait for the transition from the email input to the password input in the login prompt of Microsoft Account Services. Increase, if experiencing errors during login phase.maxLoadAttemptsForRefresh(5)
- the maximum number of checks for the web application loaded state after login before refreshing it.pageLoadedCheckIntervalMilis(4000)
- the time (in milliseconds) that the program will wait between each web application loaded state checkoutputDebug(false)
- if set to true, the program will output information with log levelDEBUG
schedulerSyncOnSecond(10)
- the second when the scheduler will periodically run checks on. The scheduler runs every minute, scheduled on the specified second.
credentials.json
This file contains the user credentials for the MS Teams web application.
Fields:
login
- the email of the MS Teams userpassword
- the password of the MS Teams user (in Base64, UTF-8 encoded)
fields.json
This file contains field definitions, usually element locators, for interaction with the DOM of MS Teams web application. If a locator changes, it can be updated in this file.
Fields:
loginProceedButtonId
- the id of theNext
buttons in the login promptloginEmailFieldName
- thename
attribute of the email input field in the login promptloginPasswordFieldName
- thename
attribute of the password input field in the login promptmsTeamsMainUrl
- the main URL of the web applicationmsTeamsMainSchoolUrl
- the URL of the web application following the initialization phasemsTeamsLoginCheckStallUrl
- the URL of the web application containing theStay signed in
promptmenuTeamListButtonId
- the id of the team list buttonmenuTeamProfilePictureXPath
- a relative XPath from theli
team element to theprofile-picture
element of the teammenuTeamChannelListXPath
- a relative XPath from theli
team element to each channela
elementmenuTeamChannelNameXPath
- a relative XPath from thea
channel element to each channel namespan
elementmeetingNoMicPromptButtonXPath
- an absolute XPath to theContinue without audio or video
button element (used whenallowMicrophone
is set tofalse
)
Data storage
All data is stored in an Sqlite database (storage.db), managed by Entity Framework Core. The data is divided into three main tables: Classrooms, Channels and Meetings. If the database is not present during program initialization, it will be automatically created.
Classrooms table
This table contains the list of classrooms (teams). It is synchronized with the actual data each time the program initializes. Columns:
Name
- `the name of the classroom (team)
Channels table
This table contains the list of channels. It is synchronized with the actual data each time the program initializes. Columns:
ChannelId
- the ID of the channel (as visible in the URL)Name
- the name of the channelClassroomName
- the name of the classroom (team) the channel belongs to
Meetings table
This table contains the list of classrooms (teams). This table must be manually filled in by the user. Columns:
Id
- the ID of the meeting (automatically assigned)DayOfWeek
- the day of week that the meeting is scheduled onStartHour
- the starting hour (in 24 hour format) that the meeting is scheduled onStartMinute
- the starting minute that the meeting is scheduled onDurationMinutes
- the duration (in minutes) of the meetingChannelId
- refers to theChannelId
of the channel from theChannels
tableEnabled
- set to1
if enabled or0
if disabled