summaryrefslogtreecommitdiff
path: root/Projects.mdwn
authorJamey Sharp <jamey@minilop.net>2007-08-09 19:17:12 (GMT)
committer Jamey Sharp <jamey@minilop.net>2007-08-09 19:17:12 (GMT)
commitefc6854786e8b97bf1331ae3d561f0f3c75f9e63 (patch) (side-by-side diff)
treeab4a9520f2a5077a2a859e6fbb605a431f7cd4c8 /Projects.mdwn
parent18b49b42e509551be902aeeaa53fff94820fe86d (diff)
downloadwiki-efc6854786e8b97bf1331ae3d561f0f3c75f9e63.zip
wiki-efc6854786e8b97bf1331ae3d561f0f3c75f9e63.tar.gz
Replace absolute links to http://psas.pdx.edu using Ikiwiki links.
Absolute links to images are not replaced, because that would change the generated HTML--it would generate <img> tags instead of <a> links. Mostly handled automatically, with a little hand-editing. find -name '*.mdwn' | xargs ../wikilink wikilink: #!/usr/bin/perl -pi use warnings; use strict; BEGIN { $::pat = qr{\Qhttp://psas.pdx.edu/\E(?!albums/|cgi-bin/|viewfile/|attach/)(?:PSAS/)?}; $::uri = qr{="(?:$::pat)([^"]*)"}; $::img = qr{<img ([^>]*src="(?:$::pat)[^"]*"[^>]*)>}; } sub mdwn { my ($target, $alt) = @_; if($alt) { $alt =~ s/^\s*(.*?)\s*$/$1/; (my $realalt = $alt) =~ s/\\//g; $alt = '' if $target =~ m{/\Q$realalt\E$}; } $alt = $alt ? $alt . '|' : ''; $target =~ s/\.html$//; return '[[' . $alt . $target . ']]'; } sub img { my @attrs = split(' ', $_[0]); my ($src, $alt); foreach(@attrs) { /^(.*?)=["']?(.*?)["']?$/; $src = $2 if $1 eq "src"; $alt = $2 if $1 eq "alt"; } $src =~ s/^$::pat//o; return mdwn($src, $alt); } s!<a href(?:$::uri)[^>]*>\s*(.*?)\s*</a>!mdwn($1, $2)!iego; s!$::img!img($1)!ego; s!\!\[\s*([^]]*)\s*\]\((?:$::pat)([^)]*\.(?:png|gif|jpg|jpeg))\)!mdwn($2, $1)!ego; s{\[\s*([^]]*)\s*\]\((?:$::pat)([^)]*)(?<!png|gif|jpg)(?<!jpeg)\)}{mdwn($2, $1)}ego;
Diffstat (limited to 'Projects.mdwn') (more/less context) (ignore whitespace changes)
-rw-r--r--Projects.mdwn24
1 files changed, 12 insertions, 12 deletions
diff --git a/Projects.mdwn b/Projects.mdwn
index 98b6762..511dd72 100644
--- a/Projects.mdwn
+++ b/Projects.mdwn
@@ -11,33 +11,33 @@
<p>
</p>
<ul>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-0/Project_Navigation_LV-0.html" target="_top"> <strong>Launch Vehicle No. 0</strong> </a></li>
+ <li>[[<strong>Launch Vehicle No. 0</strong>|psas/Current_project/LV-0/Project_Navigation_LV-0]]</li>
</ul>
<p>
</p>
<ul>
<li>
<ul>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-0/Payload/LV0_Paylload_Overview.html" target="_top">Avionics</a></li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-0/Airframe/Airframe_0.html" target="_top">Airframe</a></li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-0/Propulsion/Propulsion_0.html" target="_top">Propulsion</a></li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/GroundSupport/Ground_Support_0.html" target="_top">Ground Support</a></li>
+ <li>[[Avionics|psas/Current_project/LV-0/Payload/LV0_Paylload_Overview]]</li>
+ <li>[[Airframe|psas/Current_project/LV-0/Airframe/Airframe_0]]</li>
+ <li>[[Propulsion|psas/Current_project/LV-0/Propulsion/Propulsion_0]]</li>
+ <li>[[Ground Support|psas/Current_project/GroundSupport/Ground_Support_0]]</li>
</ul>
</li>
</ul>
<p>
</p>
<ul>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-1/Lv1menu.html" target="_top"> <strong>Launch Vehicle No. 1 and 1b</strong> </a></li>
+ <li>[[<strong>Launch Vehicle No. 1 and 1b</strong>|psas/Current_project/LV-1/Lv1menu]]</li>
</ul>
<p>
</p>
<ul>
<li>
<ul>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-1/Payload/LV1_Payload.html" target="_top">Avionics</a></li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-1/Airframe/LV1_Airframe.html" target="_top">Airframe</a></li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/LV-1/Propulsion/LV1_Propulsion.html" target="_top">Propulsion</a></li>
+ <li>[[Avionics|psas/Current_project/LV-1/Payload/LV1_Payload]]</li>
+ <li>[[Airframe|psas/Current_project/LV-1/Airframe/LV1_Airframe]]</li>
+ <li>[[Propulsion|psas/Current_project/LV-1/Propulsion/LV1_Propulsion]]</li>
<li>[[GroundSupport]]</li>
</ul>
</li>
@@ -72,9 +72,9 @@
<h2><a name="Other Projects:"></a> Other Projects: </h2>
<ul>
<li>[[ProposedProjects]]: projects/ideas we&#39;d like to see in the future </li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/INS/INS_Home.html" target="_top"> <strong>Inertial Navigation</strong> </a> (also a TWiki topic: [[InertialNavigation]]) </li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/Parafoil/Parafoil.html" target="_top"> <strong>Autonomous Recovery</strong> </a> (also a TWiki topic: [[AutonomousRecovery]]) </li>
- <li><a href="http://psas.pdx.edu/psas/Current_project/GroundSupport/Groundsupport.html" target="_top"> <strong>Ground Systems</strong> </a></li>
+ <li>[[<strong>Inertial Navigation</strong>|psas/Current_project/INS/INS_Home]] (also a TWiki topic: [[InertialNavigation]]) </li>
+ <li>[[<strong>Autonomous Recovery</strong>|psas/Current_project/Parafoil/Parafoil]] (also a TWiki topic: [[AutonomousRecovery]]) </li>
+ <li>[[<strong>Ground Systems</strong>|psas/Current_project/GroundSupport/Groundsupport]]</li>
</ul>
<p>
<br>