/[clonezilla-sysresccd]/trunk/www/working/scripts/html2txt
ViewVC logotype

Annotation of /trunk/www/working/scripts/html2txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28 - (hide annotations)
Wed Mar 17 23:46:34 2010 UTC (14 years ago) by sng
Original Path: trunk/www/html2txt
File size: 2313 byte(s)
adding www directory
1 sng 28 #!/bin/bash
2     # set -x
3     cd /d/site/clonezilla-sysresccd/new-site/working
4     rm /d/site/clonezilla-sysresccd/new-site/2doc/README.txt 2>/dev/null
5     touch /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
6     for n in usb.html \
7     boot-params.html \
8     clonezilla.html \
9     backup.html \
10     backup-smb.html \
11     restoration.html \
12     restore.html \
13     restore-burn.html \
14     reloc-img.html \
15     supergrubdisk.html \
16     oldboot.html \
17     sysresccd.html \
18     partitions.html \
19     recover.html \
20     own-scripts.html \
21     annex-a-devices.html
22    
23     #for n in restoration.html
24    
25     do
26    
27     cat "$n" | tr -d '\r'|sed '/^[ ][ ]*$/s///' |sed '1,/<div id="content">/{
28     /<[hH]3>/!d
29     s|<[hH]3>|[H3]|g
30     }'| sed '/^[ ][ ]*$/d' | sed '/<div id="footer">/,$d'| sed 's|<[aA] [hH][rR][eE][fF]="http:\([^"]*\)" [^>]*>\([^h][^t][^t][^p][^<]*\)</[aA]>|\2 {{ http:\1 }}|' | sed 's|.*<[iI][mM][gG] [sS][rR][cC]="\([^"]*\)"[^>]*>.*|[[ \1 ]]|g
31     s|images/||g' | sed 's|<!--txt-only--><!--||g'|sed 's|--><!--end-txt-only-->||g' | sed '/<!--not-on-txt-->/!b
32     :a
33     /<!--end-not-on-txt-->/!{
34     N
35     ba
36     }
37     s/<!--not-on-txt-->.*<!--end-not-on-txt-->//' | sed '/<head>/!b
38     :a
39     /<\/head>/!{
40     N
41     ba
42     }
43     s/<head>.*<\/head>//' | sed '/<[Hh]2/a\
44     ****************************************' |sed '/\[H3\]/a\
45     ==============================================================================' | sed 's|\[H3\]||g' | sed 's|^Documentation: ||' |sed '/<[Hh]3>/a\
46     ---------------------' | sed 's|<[Hh]4>|<H4>> |g' |sed 's| <span class="hideprint">.*</span>||g
47     s|<li[^>]*>|* |g
48     /<H1/{
49     s|>[ ][ ]*|>|
50     s|<br>| - |g
51     }
52     ' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed 's|[ ][ ]*| |g
53     s|&nbsp;| |g
54     s| \[^\]||
55     ' | sed '/^ * *$/N;/\n$/D' | sed 's|&gt;|>|g' | sed 's|&lt;|<|g' |sed 's|&#038;|\&|'|sed 's|&&*|\&|'| sed 's|&#177;|+/-|'| sed 's|&amp;|\&|' | sed '/^-->$/d' | sed 's|-->||'| sed '/^[ ][ ]*$/d'|sed '/^$/{
56     $!N
57     /^\n$/D
58     }' |sed '/^\*\*\*\*\*\*/{
59     $!N
60     $!N
61     s/\n\n/\n/
62     }' | sed '/^---------------------/{
63     $!N
64     $!N
65     s/\n\n/\n/
66     }' | fmt -s -w78 >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
67    
68     # | fmt -s -w78
69    
70     echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
71     echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
72     echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
73    
74     done
75    
76     rm /d/site/clonezilla-sysresccd/2doc/README-EL.txt 2>/dev/null
77    
78    
79    

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26