2ちゃんねる ■掲示板に戻る■ 全部 1- 最新50    

■ このスレッドは過去ログ倉庫に格納されています

OSX専用2chブラウザ-BathyScaphe-潜航深度62m

668 :名称未設定:2015/09/09(水) 12:50:10.61 ID:8vRAWE3m0.net
やっつけだけど
スクリプトフォルダ ~/Library/Application Support/BathyScaphe/Scripts に入れといて、レスのID行を全選択して実行

tell application "BathyScaphe"
tell front document
set selectedText to selected text
if selectedText does not contain "投稿日: " or selectedText does not contain "ID: " then return
set boardURL to board URL
end tell
end tell
set dateString to do shell script "echo " & quoted form of selectedText & " | perl -pe 'chomp; s,.*投稿日: (....)/(..)/(..).*,$1$2$3,'"
set idString to do shell script "echo " & quoted form of selectedText & " | perl -pe 'chomp; s,.*ID: ,,; s, *$,,'"
set boardName to do shell script "echo " & quoted form of boardURL & " | perl -pe 's,.*¥¥.2ch¥¥.net/,,'"
set baseURL to "http://hissi.org/read.php/"
set refererURL to baseURL & boardName
set postURL to refererURL & "search/"
set postResult to do shell script "curl -s -m 10 -e " & refererURL & " -d date=" & dateString & " --data-urlencode ID=" & quoted form of idString & " " & postURL
if postResult does not contain "url=" then return
set newURL to do shell script "echo " & quoted form of postResult & " | perl -pe 's,.*url=,,; s,(¥¥.html).*,$1,'"
do shell script "open " & postURL & newURL

総レス数 1001
230 KB
新着レスの表示

掲示板に戻る 全部 前100 次100 最新50
read.cgi ver.24052200