Creating link from.....


For example, i have a .txt file containing list of rapidshare addresses but they are not link, ready to click. How do we create list of this addresses to the links.

Model: MacBookPro 10.5.6
AppleScript: 2.2.1
Browser: Version 4 Public Beta (5528.16)
Operating System: Mac OS X (10.5)


If your text document contains only ‘links’ and one link per line, then nothing prevents you from generating a HTML file out of this document.

… a quick’n dirty method:

set f_in to "/Users/././rapidshare.txt" as POSIX file
set f_out to "/Users/././rapidshare_links.htm"

set d to read file f_in --as «class utf8»--as Unicode text 
	do shell script "/bin/echo -n " & quoted form of d & " |  /usr/bin/tr '\\r' '\\n' | /usr/bin/sed -E 's/(.*)/<a href=\\\"\\1\\\" target=\\\"_blank\\\">\\1<\\/a><br>/' | /usr/bin/tidy -qi -wrap 0 > " & f_out
end try