Next‐L Enju 第5回開発ワークショップ関連のまとめ
dc:publisher と author は子供?親?兄弟?というのを調べていきます。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:44:00演習の内容の例えば:EnjuにCiNii横断検索の機能をつけるとしますと? ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:45:37CiNii Article って検索結果からrssへのリンクってないのかな?ソースみるしかない? ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:46:26(#nextl でデータインポートを例題にしているようですね。そろそろ例の演習の元データを変えようと思っているので、ちょっと参考にしてみるかな。。)
2012-06-16 15:47:57とりあえず、「図書館」で検索してみて、ソースをみてください。RSS1.0ってなってるところのURLをみてください。&とかってなっているので、wikiの本日の資料のところにはっておきますね ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:49:27nokogiri ってライブラリ:本日の資料 「XMLファイルの読み込み」 https://t.co/A2hSs2bP ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:52:31nokogiriをつかって、rubyの書き方。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 15:54:09ref. http://t.co/0eyesw2z ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:03:07www で検索してみて、Site: Main Catalogになっているレコードを選んでみましょう。 で、MODSのリンクをたどって見ます。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:07:05例: http://t.co/EX3ciPww ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:07:24publisherのxpath をメモ帳あたりに書いてみましょう。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:08:36putty でログインして、コンソールを起動します。$ cd enju_leaf/ $ rails c production ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:11:41xmlファイルをよみこみます。例:doc = Nokogiri::XML(open('http://lccn.loc.gov/2001561989/mods')) ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:14:30ぶわ~ってなんかいろいろできたら読み込みの準備は完了です。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:15:57ただ今なにやら、うまくいかな~いってなってるとこ。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:19:53デフォルト名前空間の関係かなあ。ちょっとLCのは難しいXMLでした。。。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:20:34資料にURLをかいといたので、そっちのURLをコピペしてはりつけてみてください ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:22:48xpathは、'//xmlns:mods/xmlns:originInfo/publisher''//xmlns:mods/xmlns:originInfo/publisher' ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:31:01xpathは //mods/originInfo/publisherで'//xmlns:mods/xmlns:originInfo/xmlns:publisher'というかんじ ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:32:35result.first.content とやってとりだします。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:33:07コンソールはexitで終われるのでおわらせてください。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:55:14今はコンソールなのでじっさいに、Webブラウザ上に表示させてみましょう。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:56:23トップに表示させるとして、 vi app/views/page/_index.html.erb で開きましょう。 ( #nextl live at http://t.co/n8R1RCVA)
2012-06-16 16:57:39