This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'json' | |
## How to use | |
# | |
# 1. Generate a Mattermost bulk export file with attachments | |
# 2. Unzip the file and find the .jsonl file with the post contents and put its filename on the next line | |
filename = 'import.jsonl' | |
# 3. Run it and direct the output to a new file, e.g. | |
# |
This file contains hidden or 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
#!/bin/bash | |
## | |
# find_invalid_lines.sh | |
# | |
## About | |
# | |
# This script will process a Mattermost bulk export file and remove any lines | |
# with post messages longer than the allowable 16383 characters |
This file contains hidden or 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
#!/bin/bash | |
## | |
# remove_line.sh | |
## | |
# About | |
# | |
# This is a simple script that removes a given line from a file. When run it | |
# will create a file named |
This file contains hidden or 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
#!/usr/bin/env python | |
from urllib.request import urlopen, Request | |
from urllib.parse import quote | |
from urllib.error import URLError | |
import json | |
ADMIN_TOKEN = "6n7faf61b4o8ukcornejciyx7e" | |
BASE_URL = "https://mattermost.example.com/api/v4" # <= No slash! |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'socket' | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
num_messages=100 |
This file contains hidden or 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
version: '3.7' | |
volumes: | |
mmst_data: | |
mmst_logs: | |
mmst_config: | |
mmst_plugins: | |
mmst_client: | |
networks: |
This file contains hidden or 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
require 'httparty' | |
require 'uri' | |
require 'cgi' | |
class MattermostApi | |
include HTTParty | |
format :json | |
# debug_output STDOUT | |
This file contains hidden or 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
#!/usr/bin/env ruby | |
## About | |
# | |
# This is an example of how you could sync users via the Azure Graph API | |
# to teams and channels | |
# | |
## LICENSE | |
# | |
# Copyright © 2022 Paul Rothrock |
OlderNewer