Work with your favorite tools

MeetingMate.dev integrates effectively with your favorite tools. For example, to automatically create a meeting when you start a recording with AudioHijack, use this script.

            
// Open Safari with and start a new meeting
function shellArgEscape (arg) { return `'${arg.replace(/'/g, `'\\''`)}'`; }

let cmd = 'open -b com.apple.Safari '
let url = 'https://meetingmate.dev/meeting';

cmd += shellArgEscape(url) + ' ';
let [status, stdout, stderr] = app.runShellCommand( cmd );
            
        

Seamless integration

MeetingMate.dev can automatically upload audio to the most recent meeting and start automatically generating insights into your meetings. You can use this code with AudioHijack to upload recordings when your meeting ends.

            
// Upload a new meeting by running the python upload_latest.py script
function runPythonScript() {
  let scriptPath = "/path/to/scripts/upload_latest.py";
  let command = app.shellEscapeArgument(scriptPath);

  let [resultCode, stdout, stderr] = app.runShellCommand(command);
  if (resultCode !== 0) {
    console.dialog("Error running the script. Result code: " + resultCode);
    console.dialog("Error message: " + stderr);
  } else {
    console.dialog("Script successfully executed. Output: " + stdout);
  }
}

runPythonScript();
            
        

Works with Python

This is the script that you can use to upload the latest audio file to the most recent meeting.

            
#!/usr/bin/env python

import os
import glob
import requests
import click
from typing import Optional


def find_newest_mp3_in_directory(directory: str) -> Optional[str]:
    mp3_files = glob.glob(f"{directory}/*.mp3")
    if not mp3_files:
        return None
    newest_file = max(mp3_files, key=os.path.getctime)
    return newest_file


def upload_newest_mp3(directory: str, url: str, bearer_token: str) -> None:

    newest_mp3_file = find_newest_mp3_in_directory(directory)

    if newest_mp3_file is None:
        print("No MP3 files found in the specified directory.")
        return

    headers = {
        "Authorization": f"Bearer {bearer_token}",
    }

    with open(newest_mp3_file, "rb") as audio_file:
        files = {"file": (newest_mp3_file, audio_file, "audio/mpeg")}
        response = requests.post(url, headers=headers, files=files)

    pretty_print_response(response)

def pretty_print_response(response: requests.Response) -> None:
    try:
        print(response.json())
    except ValueError:
        print(f"Non-JSON response received. Status code: {response.status_code}, content: {response.text}")


@click.command()
@click.option(
    "--directory",
    default="/Path/to/Meeting/Recordings/",
    show_default=True,
    help="The path to the directory containing the MP3 files.",
)
@click.option(
    "--bearer_token",
    default="...",
    show_default=True,
    help="Your Bearer token for authenticating with the server.",
)
def main(directory: str, bearer_token: str):
    url = "https://meetingmate.dev/api/v1/audio/special/latest"

    expanded_directory = os.path.expanduser(directory)  # Expand directory path to handle tilde
    upload_newest_mp3(expanded_directory, url, bearer_token)


if __name__ == "__main__":
    main()