Skip to content

Instantly share code, notes, and snippets.

View arumic's full-sized avatar

arumic arumic

View GitHub Profile
@arumic
arumic / login.py
Last active April 13, 2017 13:31
Bansheeで再生中の曲情報を、Mastodonでnowplayingする。
# coding: utf-8
# インスタンスにログインする
from mastodon import Mastodon
mastodon = Mastodon(
client_id="cred.txt", # register.pyで生成したファイル
api_base_url = "https://mastodon.cloud") # インスタンスのエンドポイント
mastodon.log_in(
@arumic
arumic / mikutter-banshee-nowplaying.rb
Created January 24, 2017 13:47
bansheeで再生中の曲情報をmikutterでツイートするプラグイン
# -*- 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]