タイトル | : 岩波仏教辞典のEPWING化の過程 |
記事No | : 11 |
投稿日 | : 2008/03/04(Tue) 18:37:06 |
投稿者 | : tree |
ご迷惑かもしれませんが、ここをお借りして、私が取った方法を概略を書かせてください。 (多くの方には興味のないことでしょうし、もっとスマートな方法もあると思います。)
・UWSC(フリーソフト)を使って、仏教辞典のページ1枚1枚をコピーし、 alphaEDIT(フリーソフト)に貼り付け名前をつけて保存します。 (動作が遅くなったり保存に時間がかかるので30枚程度がよいと思います。 50枚だと貼り付けは短時間でしたが保存に30分ぐらいかかりました。) ・エディタで一つのファイルにします。(bukkyo.html) ・perlで必要なタグは残して、不要なタグは外します。次に必要なタグをつけます。(bukkyo_a1.pl) ・最後にEBStudioでEPWING化します。(bukkyo_a1) ※外字やメニュー検索に次の課題があると思っています。
UWSC ※BTN(LEFT,CLICK)の後の数が次ページのアイコンの場所のようです。 http 私の画面環境によるものです。仏教辞典の先頭ページを表示して、alphaEDITを起動しておきます。UWSCで以下のファイルを読み込み、再生します。 (bukkyo.uws)−−−−−−−−−−−1608,1180等は修正が必要な気がします。 for i=1 to 30
ACW(GETID("岩波仏教辞典第二版 - Microsoft Internet Explorer","IEFrame"),-4,-4,1608,1180,0) KBD(VK_CTRL,DOWN,40) KBD(VK_A,CLICK,40) KBD(VK_C,CLICK,40) KBD(VK_CTRL,UP,40) SLEEP(0.2)
ACW(GETID("alphaEDIT - [新規(未保存)]","TMainForm"),-4,-4,1608,1180,0) KBD(VK_CTRL,DOWN,40) KBD(VK_V,CLICK,40) KBD(VK_CTRL,UP,15) SLEEP(0.5)
ACW(GETID("岩波仏教辞典第二版 - Microsoft Internet Explorer","IEFrame"),-4,-4,1608,1180,0) BTN(LEFT,CLICK,1541,157,125) SLEEP(0.2)
next −−−−−−−−−−−−−−−−
bukkyo.html 同じフォルダーに bukkyo_a1.plというファイルを置いておいてください。 http\gaiji----外字JPEGファイル http\html----図版JPEGファイル (bukkyo_a1.pl)−−−−−−−−−−−−−−−− # perl bukkyo_a1.pl bukkyo.html > bukkyo_a1.html # コマンドプロンプトでbukkyo.htmlのあるフォルダ上で、上のコマンドを実行してください。
print "<html>\n"; print "<head>\n"; print "<title>岩波仏教辞典</title>\n"; print "</head>\n"; print "<body>\n"; print "<dl>\n";
while(<>){
httphttps/.*<td>.*<\/td>//; httphttps/<a name="top".*//; httphttps/<\/a>/《\/a》/g; httphttps/<a name="/《\/dd》\n\n《a name="/; httphttps/<a href='javascript:JetKWLinkCryptoX\("html\/furoku/《a href="html\/furoku/g; httphttps/.JKW","#top"\)'>/.jpg"》/g; httphttps/<img height="14" alt="〓" src=/《img src=/g; httphttps/.gif" width="14" align="absMiddle" border="0">/.jpg" class="inline" 》/g; httphttps/<a href='javascript:JetKWLinkCryptoX\("html\/.*?.JKW",/《a href=/g; httphttps/"\)'>/"》/g;
httpif(/<strong>/) { httphttps/<p>/\n<dt>/g; httphttps/ /【/; httphttp$_ .= "】<\/dt>\n<dd>"; httphttps/[/】[/; httphttps/ \n】/】/; httphttps/《/</g; httphttps/》/>/g; httphttps/【】//; httphttps/]】/]/;
httphttpprint $_;
http}
httpelse{ https/<.*?>//g; https/《/</g; https/》/>/g; https/> \;//;
# 図版リンク先修正成形http △='<a href="html\/furoku';http ▽='.jpg">付属資料'; ▲='<\/a>';
https/<a href="html\/furoku2-6.jpg">付属資料\(塔/△2▽1\(塔\)▲△3▽2\(塔\)▲△4▽3\(塔\)▲△5▽4\(塔\)▲△6▽5/g; https/<a href="html\/furoku4-6.jpg">付属資料\(塔3−5<\/a>\)/△4▽1\(塔\)▲△5▽2\(塔\)▲△6▽3\(塔\)▲/g; https/<a href="html\/furoku7-10.jpg">/△7▽1\(寺院建築\)▲△8▽2\(寺院建築\)▲△9▽3\(寺院建築\)▲△10▽4/g; https/<a href="html\/furoku12-15.jpg">付属資料\(仏像1−4<\/a>\)/△12▽1\(仏像\)▲△13▽2\(仏像\)▲△14▽3\(仏像\)▲△15▽4\(仏像\)▲/g; https/<a href="html\/furoku12-18.jpg">付属資料\(仏像<\/a>\)/△12▽1\(仏像\)▲△13▽2\(仏像\)▲△14▽3\(仏像\)▲△15▽4\(仏像\)▲△16▽5\(仏像\)▲△17▽6\(仏像\)▲△18▽7\(仏像\)▲/g; https/<a href="html\/furoku20-21.jpg">付属資料/△20▽1\(両界曼荼羅\)▲△21▽2/g; https/<a href="html\/furoku23-24.jpg">付属資料/△23▽1▲△24▽2/g;
https/△/<a href="html\/furoku/g; https/▽/.jpg">付属資料/g; https/▲/<\/a>/g;
httpprint $_; http}
} print "</dl>\n"; print "</body>\n"; print "</html>";
#処理未解決 <a href="html/furoku22.jpg">付属資料(サンスクリット語の手引き</a>) #−−−−−−−−−−−−−−−−
|