geeknoteを使う
evernoteをメモ先だったり、仕事のTODOを書くところに使っているのですが、さすがにノートの数が10000を越えて、クライアントから触るにはちょっとしんどくなってきた。Webインタフェイスからならば速度は問題ではないんだけど、エディタとしては使い勝手がいいものではない。
普段使い慣れたemacsとかviから使えればいいんだけどと調べたところ、geeknoteってのがいいみたい。
さっそくインストールして使ってみる。インストール方法や認証方法なんかはいろんなところに情報があるのでそちらを参照。
ところがなんだかエラーがでますよ。
$ geeknote edit --note "hoge" (中略) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 896, in main Notes().edit(**ARGS) File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 658, in edit result = self._editWithEditorInThread(inputData, note) File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 598, in _editWithEditorInThread editor = Editor(note.content) File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/editor.py", line 211, in __init__ os.write(tempfileHandler, self.ENMLtoText(content)) File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/editor.py", line 101, in ENMLtoText content = html2text.html2text(str(soup).decode('utf-8'), '', 0) TypeError: html2text() takes at most 2 arguments (3 given) $
なんでしょうね。html2text()に3つの引数を与えているみたい。2つじゃないといかんみたいだけど。ここの例 を見る限り、最後の0が余計なんじゃないかと。
さっそく消す。/usr/local/lib/python2.7/dist-packages/geeknote-0.2a0-py2.7.egg/geeknote/editor.pyの101行目。
# content = html2text.html2text(str(soup).decode('utf-8'), '', 0) content = html2text.html2text(str(soup).decode('utf-8'), '')
を、ちゃんと動いた。