Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ピッてやるとシュッてなるやつを作った話
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
tera
November 04, 2017
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ピッてやるとシュッてなるやつを作った話
2017年度 SRC OB発表会で話したやつです
tera
November 04, 2017
More Decks by tera
See All by tera
Pythonを読む
tera
0
230
importを理解したかった
tera
0
670
RustでShell作ろう
tera
0
960
HTTPをしゃべろう~Firefoxになるために~
tera
0
260
Featured
See All Featured
Designing for Timeless Needs
cassininazir
1
490
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
The Limits of Empathy - UXLibs8
cassininazir
1
690
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Mobile First: as difficult as doing things right
swwweet
225
10k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
550
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Making the Leap to Tech Lead
cromwellryan
135
10k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
550
Optimizing for Happiness
mojombo
378
71k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Transcript
隠居宣言
自己紹介 • SRC プログラミング班 • PythonとかRustとかで遊んでいる • IQが3 • 17生が強すぎる
• 隠居します • Twitter: @tera_3939
ピッとするとシュッてなるやつを 作った話
事の始まり
秋葉原はラジオデパート
None
800円で バーコードリーダーが売ってる!
None
None
これは買うしかない(買った)
でもこれ動くか……?
動いた!
Windows上での扱い • USB入力デバイスとして認識される • デバイスマネージャー上では”ヒューマン インターフェース デバイス”という名前 で扱われる • 特にデバイスドライバを入れることなく動いた(OPT-6125の場合)
• バーコードから読み取った数列が標準出力に流し込まれる
None
今回やったこと • 書籍JANコードからISBNと本体価格を取得 • Googleの書籍検索APIから本の名前と作者を取得 • 合計金額を出力する
JANコードとは • “JANコードは「どの事業者の、どの商品か」を表す、世界共通の商品識別 番号です。 “ • “通常、バーコードスキャナで読み取れるように、JANシンボルというバーコード シンボルによって商品パッケージに表示されます。” • by
http://www.dsri.jp/jan/about_jan.html
書籍JANコードとは • “書籍JANコードは、2段のバーコードで構成されています。1段目は「978」か ら始まる国際標準コードのISBN(International Standard Book Numbering)用バーコードです。2段目は、日本独自の図書分類と税抜 き本体価格です。 ” •
by http://www.dsri.jp/code/jan_publication/ • つまり、ISBNや本体価格が書いてある
プリフィックス ISBN チェックデジット プリフィックス 図書分類 本体価格 チェックデジット
ISBNとは • “ISBN(アイエスビーエヌ、International Standard Book Number)は、 世界共通で図書(書籍)を特定するための番号である。” • by https://ja.wikipedia.org/wiki/ISBN
• すべての本と一対一で対応している • つまり、これが分かれば本を一意に特定できる
JANコードをピッてすると • ISBNと本体価格がわかる!!
ISBNから書籍情報を取得する • Google Books API • https://developers.google.com/books/docs/v1/using • 楽天ブックス書籍検索API •
https://webservice.rakuten.co.jp/api/booksbooksearch/ • 今回は両方使用
ある? ない ない ある?