1 |
sng |
28 |
#!/bin/bash |
2 |
sng |
42 |
############################################################################## |
3 |
sng |
46 |
# # |
4 |
|
|
# html2txt, (C) 2007-2010 S. Georgaras <sng@hellug.gr> # |
5 |
|
|
# # |
6 |
|
|
# This file is part of Clonezilla-SysRescCD. # |
7 |
|
|
# # |
8 |
|
|
# Clonezilla-SysRescCD is free software: you can redistribute it and/or # |
9 |
|
|
# modify it under the terms of the GNU General Public License as published # |
10 |
|
|
# by the Free Software Foundation, either version 2 of the License, or # |
11 |
|
|
# (at your option) any later version. # |
12 |
|
|
# # |
13 |
|
|
# Clonezilla-SysRescCD is distributed in the hope that it will be useful, # |
14 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
15 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
16 |
|
|
# GNU General Public License for more details. # |
17 |
|
|
# # |
18 |
|
|
# You should have received a copy of the GNU General Public License along # |
19 |
|
|
# with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>. # |
20 |
|
|
# # |
21 |
sng |
42 |
############################################################################## |
22 |
sng |
46 |
|
23 |
sng |
52 |
# Go to working/ directory |
24 |
sng |
42 |
cd .. |
25 |
sng |
43 |
rm ../2doc/README.txt 2>/dev/null |
26 |
|
|
touch ../2doc/README.txt |
27 |
sng |
28 |
for n in usb.html \ |
28 |
|
|
boot-params.html \ |
29 |
|
|
clonezilla.html \ |
30 |
|
|
backup.html \ |
31 |
|
|
backup-smb.html \ |
32 |
|
|
restoration.html \ |
33 |
|
|
restore.html \ |
34 |
|
|
restore-burn.html \ |
35 |
|
|
reloc-img.html \ |
36 |
|
|
supergrubdisk.html \ |
37 |
|
|
oldboot.html \ |
38 |
|
|
sysresccd.html \ |
39 |
|
|
partitions.html \ |
40 |
|
|
recover.html \ |
41 |
|
|
own-scripts.html \ |
42 |
sng |
183 |
annex-a-devices.html \ |
43 |
|
|
basic-vi.html |
44 |
sng |
28 |
|
45 |
|
|
#for n in restoration.html |
46 |
|
|
|
47 |
|
|
do |
48 |
|
|
|
49 |
sng |
43 |
cat "$n" | tr -d '\r'|sed '/^[ ][ ]*$/s/// |
50 |
|
|
1,/<div id="content">/{ |
51 |
sng |
28 |
/<[hH]3>/!d |
52 |
|
|
s|<[hH]3>|[H3]|g |
53 |
sng |
43 |
} |
54 |
|
|
/^[ ][ ]*$/d |
55 |
|
|
/<div id="footer">/,$d |
56 |
|
|
s|<[aA] [hH][rR][eE][fF]="http:\([^"]*\)" [^>]*>\([^h][^t][^t][^p][^<]*\)</[aA]>|\2 {{ http:\1 }}| |
57 |
|
|
s|.*<[iI][mM][gG] [sS][rR][cC]="\([^"]*\)"[^>]*>.*|[[ \1 ]]|g |
58 |
|
|
s|images/||g |
59 |
|
|
s|<!--txt-only--><!--||g |
60 |
|
|
s|--><!--end-txt-only-->||g |
61 |
|
|
/<!--not-on-txt-->/!b |
62 |
sng |
28 |
:a |
63 |
|
|
/<!--end-not-on-txt-->/!{ |
64 |
|
|
N |
65 |
|
|
ba |
66 |
|
|
} |
67 |
|
|
s/<!--not-on-txt-->.*<!--end-not-on-txt-->//' | sed '/<head>/!b |
68 |
|
|
:a |
69 |
|
|
/<\/head>/!{ |
70 |
|
|
N |
71 |
|
|
ba |
72 |
|
|
} |
73 |
|
|
s/<head>.*<\/head>//' | sed '/<[Hh]2/a\ |
74 |
sng |
43 |
**************************************** |
75 |
|
|
/\[H3\]/a\ |
76 |
|
|
============================================================================== |
77 |
|
|
s|\[H3\]||g |
78 |
|
|
s|^Documentation: || |
79 |
|
|
/<[Hh]3>/a\ |
80 |
|
|
--------------------- |
81 |
|
|
s|<[Hh]4>|<H4>> |g |
82 |
|
|
s| <span class="hideprint">.*</span>||g |
83 |
sng |
28 |
s|<li[^>]*>|* |g |
84 |
|
|
/<H1/{ |
85 |
|
|
s|>[ ][ ]*|>| |
86 |
|
|
s|<br>| - |g |
87 |
|
|
} |
88 |
sng |
43 |
|
89 |
|
|
:a |
90 |
|
|
s/<[^>]*>//g;/</N;//ba' | sed 's|[ ][ ]*| |g |
91 |
|
|
|
92 |
sng |
28 |
s| | |g |
93 |
|
|
s| \[^\]|| |
94 |
sng |
43 |
' | sed '/^ * *$/N;/\n$/D |
95 |
|
|
s|>|>|g |
96 |
|
|
s|<|<|g |
97 |
|
|
s|&|\&| |
98 |
|
|
s|&&*|\&| |
99 |
|
|
s|±|+/-| |
100 |
|
|
s|&|\&| |
101 |
|
|
/^-->$/d |
102 |
|
|
s|-->|| |
103 |
|
|
' | sed ' |
104 |
|
|
/^[ ][ ]*$/d' | sed ' |
105 |
|
|
/^$/{ |
106 |
sng |
28 |
$!N |
107 |
|
|
/^\n$/D |
108 |
sng |
43 |
} |
109 |
|
|
/^\*\*\*\*\*\*/{ |
110 |
sng |
28 |
$!N |
111 |
|
|
$!N |
112 |
|
|
s/\n\n/\n/ |
113 |
sng |
43 |
} |
114 |
|
|
/^---------------------/{ |
115 |
sng |
28 |
$!N |
116 |
|
|
$!N |
117 |
|
|
s/\n\n/\n/ |
118 |
sng |
43 |
}' | fmt -s -w78 >> ../2doc/README.txt |
119 |
sng |
28 |
|
120 |
sng |
43 |
echo >> ../2doc/README.txt |
121 |
|
|
echo >> ../2doc/README.txt |
122 |
|
|
echo >> ../2doc/README.txt |
123 |
sng |
28 |
|
124 |
|
|
done |
125 |
sng |
60 |
cp ../2doc/README.txt /d/site/clonezilla-sysresccd/new-site/2doc/README.txt |
126 |
sng |
28 |
|
127 |
|
|
rm /d/site/clonezilla-sysresccd/2doc/README-EL.txt 2>/dev/null |
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|