#!/usr/bin/python3 import logging as log import requests import json import msk def json_read(file): print("Reading config file: {}".format(file)) with open(file) as f: config = json.load(f) return config config = json_read('config.json') if config['verbosity'].upper() == 'DEBUG': log.basicConfig(format="%(levelname)s: %(message)s", level=log.DEBUG) log.info("Verbose output") msk = msk.Misskey(i=config['token'], url=config['url']) fid = msk.drive_files_create("yaoshi-jun-Toosaka-Rin-Fate-(series)-Anime-3306019.jpeg", isSensitive=True)['id'] msk.notes_create(text="Wannya see my picture?", cw="Nya?", fileIds=[fid])