This file contains 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
# coding: utf-8 | |
# インスタンスにログインする | |
from mastodon import Mastodon | |
mastodon = Mastodon( | |
client_id="cred.txt", # register.pyで生成したファイル | |
api_base_url = "https://mastodon.cloud") # インスタンスのエンドポイント | |
mastodon.log_in( |
This file contains 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
# -*- coding: utf-8 -*- | |
# bansheeで再生中の曲情報をmikutterでツイートするプラグイン | |
# mikutter3.5.1・banshee2.6.2で動作確認 | |
# ツイート入力用のテキストボックスを右クリック→メニューの「Banshee Now Playing」でツイート | |
Plugin.create(:banshee_nowplaying) do | |
def banshee_now_playing | |
title = `banshee --query-title`[7..-2] | |
artist = `banshee --query-artist`[8..-2] |