tbf

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2018 License: MIT Imports: 1 Imported by: 0

README

CircleCI codebeat badge codecov

tbfは技術書典のサークル情報を取得/表示するためのCLIツールです。
pecoやfzfなどのfuzzy finderと組み合わせることでサークル情報を絞り込むことができます。

Installation

binary

Download from GitHub Releases

brew

[TODO]

From source

$ go get github.com/mpppk/tbf

Usage

tbf list

技術書典ウェブサイトをクロールした結果のcsvやURLから、サークル情報を表示します。 デフォルトではhttps://raw.githubusercontent.com/mpppk/tbf/master/data/latest_circles.csvからcsvを取得します。csvはローカルにキャッシュされますが、変更があった場合は再度ダウンロードします。

$ tbf list | head -n5
csv file will be downloaded becase checksums are different between meta(2413623400) and local file(2781509532)
new csv file is downloaded from https://raw.githubusercontent.com/mpppk/tbf/master/data/latest_circles.csv to latest_circles.csv
か46 トゲトゲ団(トゲトゲダン) by トゲトゲ 【ソフトウェア全般】 : ゲームエンジ ン(UnrealEngine4)
か77 ナナナナロク(ナナナナロク) by 776 【ソフトウェア全般】 : ストリーミング処理と可視化(予定)※VagrantとElasticsearch(Kibana)を軸としたTwitterデータ取得
け08 TY製作所(ティーワイセイサクジョ) by 吉野 【科学技術】 : 3Dプリンター及び レーザー加工機の取り扱いや造形物について機械ごとにまとめた漫画本あるいは解説本とグッズ
こ40 Firebase Japan User Group(ファイヤーベースジャパンユーザーグループ) by Firebase Japan User Group 【ソフトウェア全般】 : Firebaseについて
か08 Route 312(ルートサンイチニ) by mzsm 【ソフトウェア全般】 : Python製Webフ レームワークDjangoのTips集とか
Tips: fuzzy finderで絞り込んだサークル詳細ページをブラウザで表示する

あらかじめpeco/fzfなどのfuzzy finderとjqをインストールしておく必要があります。

mac + peco (ctrl + spaceで複数選択)
tbf list | peco | awk '{print $1}' | xargs tbf describe | jq -r .DetailURL | xargs open
mac + fzf (tabで複数選択)
tbf list | fzf -m | awk '{print $1}' | xargs tbf describe | jq -r .DetailURL | xargs open
linux + peco (ctrl + spaceで複数選択)
tbf list | peco | awk '{print $1}' | xargs tbf describe | jq -r .DetailURL | xargs xdg-open
linux + fzf (tabで複数選択)
tbf list | fzf -m | awk '{print $1}' | xargs tbf describe | jq -r .DetailURL | xargs xdg-open
windows + peco (ctrl + spaceで複数選択)
TODO
windows + fzf (tabで複数選択)
TODO
docker(URLの表示のみ)
$ docker run -it --rm mpppk/tbf list_circle_url
https:/techbookfest.org/event/tbf05/circle/47030001
https:/techbookfest.org/event/tbf05/circle/35050003
https:/techbookfest.org/event/tbf05/circle/45010003
Tips: fuzzy finderで絞り込んだサークルのサイトをブラウザで表示する
mac + peco (ctrl + spaceで複数選択)
tbf list | peco | awk '{print $1}' | xargs tbf describe | jq -r .WebURL | xargs open
mac + fzf (tabで複数選択)
tbf list | fzf -m | awk '{print $1}' | xargs tbf describe | jq -r .WebURL | xargs open

tbf describe

引数として与えられたスペースに配置されたサークル情報をjsonで出力します。

$ tbf describe あ01 あ02
{"DetailURL":"https:/techbookfest.org/event/tbf05/circle/24830001","Space":"あ01","Name":"毬栗ロ マン(イガグリロマン)","Penname":"いっこう","Genre":"ソフトウェア全般","ImageURL":"https://lh3.googleusercontent.com/3HYptOqYpzH0-ZaaG55rG7vk1COYse9e6tcZBX5DlsAilF_67wwOXVVB7oVb5-mRHC1z6Z5QODOVkazRp9-5kQ","WebURL":"","GenreFreeFormat":"WebXR(Webブラウザで実現するVR並びにAR)の解説本、これまで頒布してきたものが基礎的な内容だったので今回はより具体的な内容を想定しています。"}
{"DetailURL":"https:/techbookfest.org/event/tbf05/circle/28360002","Space":"あ02","Name":"いしだ け(イシダケ)","Penname":"t_ishida,コンドウアヤ","Genre":"ソフトウェア全般","ImageURL":"https://lh3.googleusercontent.com/DT5P_6OcobmPWDzVnu1loCAt_DDrcmQ8P2Y5hE3RWoRb6Fx-4dcuA7U3oPP3yQyAXr3FzH-6Jc8_iI5Z_1Pp","WebURL":"http://www.dezapatan.com","GenreFreeFormat":"体系的なプログラミング制作 を目指してPHPで緩く解説しています"}

tbf crawl

chromeを起動して技術書典ウェブサイトからサークル情報をクローリングし、csvとして保存します。
tbf listではデフォルトでクロール済みのcsvをHTTP経由で取得するため、通常このコマンドを実行する必要はありません。 また、技術書典ウェブサイトへ継続的にリクエストを送ることになるので、利用には注意してください。

$ tbf crawl
# → ウェブサイトをクローリングし、結果をcircles.csvという名前で保存する

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL