You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
658 B
Python
25 lines
658 B
Python
#!/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])
|
|
|