Skip to content

Instantly share code, notes, and snippets.

View tekei's full-sized avatar

Masanori Takeda tekei

  • Japan
View GitHub Profile
@tekei
tekei / gist:3224645
Created August 1, 2012 07:37
アウトラインプロセッサのファイル変換 (AUTRA -> Outliner)
# Windowsのアウトラインプロセッサ "あうとら"から
# androidのアウトラインプロセッサ "Outliner"へのファイル変換
#
# あうとらでは、「階層付きテキスト」としてエクスポート。
# Outlinerでは、「bonsai CSV (UTF-8)」としてインポート。
require "csv"
def write_page(w, l, t, b)
line = [t, 0, 1, (l - 1), 0, 2, 0, "", "", "", "", "Unfiled", "", "", b]
@tekei
tekei / gist:3219437
Created July 31, 2012 18:51
convert bookmark from diigo to instapaper
# http://www.diigo.com/tools/exportからRSS Formatで取得したファイルを
# import.txtとして保存して実行
# 量が多いと、Rate Limit Exceededになるので注意
require "cgi"
require "net/https"
ril = File.read("import.txt")
unread = ril.scan(%r{<link>(.*?)</link>}m)