
タイトルそのままなんだけど、これめちゃくちゃ便利。個人的にはkobito pdf、kobito printが便利。これでマークダウンでプレビューしながらドキュメント書いてPDFに整形も簡単にできるし。
Usage
これUsageそのまんま転載なんだけど、使い方もシンプルで良い。
Usage:
kobito [command]
Available Commands:
ls :: List all items
show [item id] :: Show item
html [item id] :: Show item as HTML
print [item id] :: Print out item
link [markdown file] :: Link markdown file to Kobito
version :: Print kobito cli tools version
pdf [item id] | pdf [item id] [pdf file name] :: Save item as PDF
password :: Show Kobito password
sticker :: Do you want Kobito sticker?
help [command] :: Help about any command
Use "kobito help [command]" for more information about that command.
ls
1% kobito ls
2ITEM_ID TITLE
3 109 ほげほげほげ
4 105 タイトルタイトル
5 110 ああああああああああああああ
6 107
7 35 ◯◯について
show
1% kobito show 105
2タイトルタイトル
3
4# マークダウンのテキストが
5
6## そのまま標準出力に表示されます
html
1% kobito html 105
2<!DOCTYPE HTML>
3<html>
4 <head>
5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
6 <title>Kobito Memo</title>
7 <script type="text/javascript" src="highlight.pack.js"></script>
8 <script>hljs.initHighlightingOnLoad();</script>
9 <script>
10 function setTitleForAllAnchors() {
11 Array.prototype.map.call(document.getElementsByTagName('a'), function(a) {
12 a.title = a.href;
13 });
14 }
15 window.addEventListener('DOMContentLoaded', setTitleForAllAnchors, false);
16 </script>
17 <link type="text/css" rel="stylesheet" href="github.min.css">
18 <link type="text/css" rel="stylesheet" href="markdown.css">
19 <link type="text/css" rel="stylesheet" href="file:///Users/hiromasa/Library/Kobito/CSS/custom-style.css?time=1403160361.055531">
20 </head>
21 <body>
22<h1>タイトルタイトル</h1>
23
24<h1>マークダウンのテキストが</h1>
25
26<h2>そのまま標準出力に表示されます</h2>
27 </body>
28</html>
1% kobito print 105
2# SafariでHTMLとして開いたあと印刷ダイアログを表示
1% kobito pdf 105
2# カレントディレクトリに「タイトルタイトル.pdf」
パイプ、リダイレクト
文字列を渡すとKobitoのエントリーになるみたい。
1% kobito < hoge.rb
2# hoge.rbの内容がKobitoのエントリーになる
1% tail development.log | kobito
2# ログの最後の10行Kobitoのエントリーになる