HTMLCodeなどのタグ入力支援のAppleScriptHTML(正確にはXHTMLか)タグをiBlogで入力する際にはHTMLCodeというタグを入力しますが、結構面倒なので入力支援のためのAppleScriptを作りました。
この種の作業は皆さん面倒だと思っているらしく、beowulf
さんのiBlog
AppleScripts やkaoru_ari
さんのエントリ
などで入力支援のAppleScriptが紹介されています。
わたしも本日エントリを書いていて面倒だなぁ、と思い上記の2つを参考に作ってみました。 お二方に感謝の意を表します。 特徴は、 ・iBlogで入力済みのテキストのうち、タグで囲みたい部分を選択して、該当のAppleScriptを選択するだけ。アラ簡単。 といった感じです。 導入方法 1.iBlogScripts1.0.zip をダウンロードします。 使い方 1.iBlogにおいて、HTMLCodeなどで囲みたいテキストを入力します。 カスタマイズ 各スクリプトはスクリプトエディタで開けます。先頭部分にカスタマイズ用の変数が以下のようにありますのでそちらをいじってください。(以下で解説します) -- customize (start) (* * "<", ">" -> ? *) -- use html escape code to replace "<" or ">" property less_than : "<" property greater_than : ">" -- use another word to replace "<" or ">" --property less_than : "<" --property greater_than : ">" (* * "<a" -> "< a" *) -- if you want to replace "<a" with "< a", then set 'true' to this variable. property has_space_with_a_tag : true -- custmize (end) 1."<"、">"の扱い a) &lt;や>に置き換えたい -- use html escape code to replace "<" or ">" property less_than : "<" property greater_than : ">" -- use another word to replace "<" or ">" --property less_than : "<" --property greater_than : ">" のように最初の部分をコメントアウトしないで、2つ目の部分をコメントアウトしてください。デフォルトはこの状態です。 b) 全角にしたい -- use html escape code to replace "<" or ">" --property less_than : "<" --property greater_than : ">" -- use another word to replace "<" or ">" property less_than : "<" property greater_than : ">" のように最初の部分をコメントアウトし、2つ目の部分をコメントアウトしないでください。 c) 別の文字にしたい -- use html escape code to replace "<" or ">" --property less_than : "<" --property greater_than : ">" -- use another word to replace "<" or ">" property less_than : "[" property greater_than : "]" のように最初の部分をコメントアウトし、2つ目の部分をコメントアウトしないで、変数の値を変換したいものにしてください。ここでは、"["、"]"に変換するようにしています。 2. aタグをiBlogに認識させないために、<とaの間に半角スペースを入れるかどうか a) スペースを入れたい (* * "<a" -> "< a" *) -- if you want to replace "<a" with "< a", then set 'true' to this variable. property has_space_with_a_tag : true のように true をセットしてください。デフォルトはこちらになっています。 b) スペースを入れたくない (* * "<a" -> "< a" *) -- if you want to replace "<a" with "< a", then set 'true' to this variable. property has_space_with_a_tag : false のように false をセットしてください。 (* * "<a" -> "< a" *) -- if you want to replace "<a" with "< a", then set 'true' to this variable. property has_space_with_a_tag : false 以上です。 個人的にはかなり便利に使っています。 一応試験はしておりますが、バグ等のご報告はこちらのコメントまでお願いします。 改変はご自由にどうぞ。トラックバックしてくれるとうれしいです。 なお、こちらのスクリプトを利用したことによるいかなる損害にも一切責任を負いませんので自己責任でお願いします。#お約束。 投稿時間: 2004年10月17日 (日) at 18:02 Comments
Comment(s)
|
Quick Links
gvisit Calendar Categories Recent Entries Recent Comments related site/software BlogPeople
最新化
Powered by Track Back People
Linked Sites
最新化
Powered by track feed
powered by XML/RSS Feed 広告 Archives I love Mac!
Statistics
Total entries in this blog:
Total entries in this category: Published On: 2010-02-20 17:11
Powered by
iBlog |