User:Tstaerk: Difference between revisions

From KDE TechBase
No edit summary
Line 23: Line 23:
  done
  done


= Create a dot file =
  for file in $(ls --ignore="*:*")
  for file in $(ls --ignore="*:*"); do /bin/spider $file | grep "^/" | grep -v ":" | grep -v "?" | grep -v "Main_Page" | grep -v "Getting_Started$" | grep -v "/Contribute$" | grep -v "^/Projects$" | grep -v "^/Development$" | grep -v "^/Policies$" | grep -v "^/Projects$" | grep -v "^/Projects/NamingTheWiki$" | grep -v "^/Schedules$" | grep -v "^/favicon.ico$" | grep -v "/opensearch_desc.php$" | grep -v "^/$" | grep -v ".png$" | grep -v "^/Development/Tutorials$" | sed "s;^/.*/;;" | while read file2; do echo "$file -> $file2" ; done; done >datei
do /bin/spider $file | \
  grep "^/" | \
  grep -v ":" | \
  grep -v "?" | \
  grep -v "Main_Page" | \
  grep -v "Getting_Started$" | \
  grep -v "/Contribute$" | \
  grep -v "^/Projects$" | \
  grep -v "^/Development$" | \
  grep -v "^/Policies$" | \
  grep -v "^/Projects$" | \
  grep -v "^/Projects/NamingTheWiki$" | \
  grep -v "^/Schedules$" | \
  grep -v "^/favicon.ico$" | \
  grep -v "/opensearch_desc.php$" | \
  grep -v "^/$" | \
  grep -v ".png$" | \
  grep -v "^/Development/Tutorials$" | \
  sed "s;^/.*/;;" | \
  while read file2
  do echo "$file -> $file2"  
  done
done >datei


echo "# to create a ps file use 'dot -Tps -o graph.ps graph.dot' (dot it part of the graphviz package)" > graph.dot
echo "digraph \"Wikimap\" { " >> graph.dot
cat datei >>graph.dot
echo "}" >> graph.dot


duffman:~/developernew # echo "# to create a ps file use 'dot -Tps -o graph.ps graph.dot' (dot it part of the graphviz package)" > graph.dot
duffman:~/developernew #  echo "digraph \"Wikimap\" { " >> graph.dot
duffman:~/developernew #  cat datei >>graph.dot
duffman:~/developernew # echo "}" >> graph.dot
= Create a ps file =
  dot -Tps -o graph.ps graph.dot
  dot -Tps -o graph.ps graph.dot

Revision as of 18:57, 28 January 2007

Here's how I draw a mindmap of this wiki:

Download all pages

wget http://developernew.kde.org/Special:Allpages
cat >spider<<EOF
#!/usr/bin/perl
require HTML::LinkExtor;
\$p = HTML::LinkExtor->new(\&parse, "");
sub parse {
    my(\$tag, %links) = @_;
    my (\$att, \$url) = @{[%links]};
    print "\$url\n";
}
\$p->parse_file(\$ARGV[0]);
EOF
chmod 777 spider
./spider Special\:Allpages | \
grep "^/" | \
grep -v ":" | \
grep -v "?" | \
while read a
  do wget "http://developernew.kde.org$a"
done
for file in $(ls --ignore="*:*")
do /bin/spider $file | \
  grep "^/" | \
  grep -v ":" | \
  grep -v "?" | \
  grep -v "Main_Page" | \
  grep -v "Getting_Started$" | \
  grep -v "/Contribute$" | \
  grep -v "^/Projects$" | \
  grep -v "^/Development$" | \
  grep -v "^/Policies$" | \
  grep -v "^/Projects$" | \
  grep -v "^/Projects/NamingTheWiki$" | \
  grep -v "^/Schedules$" | \
  grep -v "^/favicon.ico$" | \
  grep -v "/opensearch_desc.php$" | \
  grep -v "^/$" | \
  grep -v ".png$" | \
  grep -v "^/Development/Tutorials$" | \
  sed "s;^/.*/;;" | \
  while read file2
  do echo "$file -> $file2" 
  done
done >datei
echo "# to create a ps file use 'dot -Tps -o graph.ps graph.dot' (dot it part of the graphviz package)" > graph.dot
echo "digraph \"Wikimap\" { " >> graph.dot
cat datei >>graph.dot
echo "}" >> graph.dot
dot -Tps -o graph.ps graph.dot