From 470c83d7ceb7671587bd63aa9b0380692ba77253 Mon Sep 17 00:00:00 2001 From: "OHASHI, Norikazu" Date: Thu, 29 Apr 2021 12:08:41 +0900 Subject: [PATCH] =?utf8?q?openBD=20=E4=BB=A5=E5=A4=96=E3=81=AE=E5=88=A9?= =?utf8?q?=E7=94=A8=E3=81=97=E3=81=A6=E3=81=84=E3=82=8BAPI=E3=81=AE?= =?utf8?q?=E8=AA=AC=E6=98=8E=E3=82=92=E8=A8=98=E8=BF=B0=E3=80=81=20?= =?utf8?q?=E8=A9=95=E4=BE=A1=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=83=AD=E3=82=B8?= =?utf8?q?=E3=83=83=E3=82=AF=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .markdownlint.json | 3 +++ readme.md | 20 ++++++++++++++++++++ sinatra/app/views/book_info.haml | 20 +------------------- sinatra/app/views/book_regist.haml | 4 ++-- 4 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..f2a375a --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,3 @@ +{ + "MD024": false +} diff --git a/readme.md b/readme.md index 9aa919f..74c0b29 100644 --- a/readme.md +++ b/readme.md @@ -126,3 +126,23 @@ * 書誌情報の取得: `/get?isbn=ISBN,ISBN` * 収録範囲の取得: `/coverage` * JSONスキーマの取得: `/schema` + +### 国立国会図書館サーチ + +#### 参照URI + +[国立国会図書館サーチ](https://iss.ndl.go.jp/information/outline/) + +#### API仕様 + +[API仕様の概要](https://iss.ndl.go.jp/information/api/riyou/) + +### GoogleBooks + +#### 参照URI + +[Google Books APIs](https://developers.google.com/books) + +#### API仕様 + +* 書籍の探索: `GET https://www.googleapis.com/books/v1/volumes?q={search terms}` diff --git a/sinatra/app/views/book_info.haml b/sinatra/app/views/book_info.haml index d2a2dab..a5dafd8 100644 --- a/sinatra/app/views/book_info.haml +++ b/sinatra/app/views/book_info.haml @@ -87,25 +87,7 @@ %th 評価 %td - - case book_info[:book_rank] - - when 0 then - .rank - ☆ ☆ ☆ ☆ ☆ - - when 1 then - .rank - ★ ☆ ☆ ☆ ☆ - - when 2 then - .rank - ★ ★ ☆ ☆ ☆ - - when 3 then - .rank - ★ ★ ★ ☆ ☆ - - when 4 then - .rank - ★ ★ ★ ★ ☆ - - when 5 then - .rank - ★ ★ ★ ★ ★ + #{"★"*book_info[:book_rank]+"☆"*(5-book_info[:book_rank])} .buttons %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_edit/#{book_info[:isbn]}'", :value => '編集' } %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_list/fromInfo'", :value => '一覧へ' } diff --git a/sinatra/app/views/book_regist.haml b/sinatra/app/views/book_regist.haml index a99e3f9..bc3edec 100644 --- a/sinatra/app/views/book_regist.haml +++ b/sinatra/app/views/book_regist.haml @@ -21,7 +21,7 @@ 「ISBN探索」を押下すると、該当する本の情報が取得できます。 .message - 画層ファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。 + 画像ファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。 - if warning .warning @@ -108,7 +108,7 @@ %span 書影: %input{ :name => 'cover_file', :type => 'file', :id => 'cover_file', :accept => 'image/png, image/jpeg', :style => "display:none"} - %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''} +p %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''} %input{ :type => 'submit', :class => 'side_button', :value => '書影Upload', :formaction => '/book_upload_cover' } :javascript var file = document.getElementById( 'cover_file' ); -- 2.19.2