tips:autolink
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:autolink [2010-03-26 12:03] – 192.54.144.229 | tips:autolink [2015-01-29 16:46] (current) – [Sample of link page] 84.204.72.82 | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Usage ===== | ===== Usage ===== | ||
- | this script can used to: | + | this script can be used to: |
* automatically add links to a word | * automatically add links to a word | ||
Line 15: | Line 15: | ||
<code perl autolink.pl> | <code perl autolink.pl> | ||
- | # | + | # |
sub substi | sub substi | ||
Line 81: | Line 81: | ||
if($f =~ /($str)/i) | if($f =~ /($str)/i) | ||
{ | { | ||
- | $f =~ s/([\(\)., : | + | $f =~ s/([\(\"\)., : |
- | $f =~ s/ | + | $f =~ s/ |
- | $f =~ s/([\(\)., : | + | $f =~ s/([\(\)., :\"\*{2}\_{2}])($str)$/ |
#print $f."< | #print $f."< | ||
Line 185: | Line 185: | ||
autolink($ARGV[0], | autolink($ARGV[0], | ||
} | } | ||
+ | |||
+ | |||
Line 190: | Line 192: | ||
- | ===== Deployement | + | ===== Deployment |
- copy script into your web directory | - copy script into your web directory | ||
Line 242: | Line 244: | ||
* **apple** to **fruits: | * **apple** to **fruits: | ||
* **flute** to **instruments: | * **flute** to **instruments: | ||
- | * ... | + | * ... |
tips/autolink.1269601403.txt.gz · Last modified: 2010-03-26 12:03 by 192.54.144.229