/[clonezilla-sysresccd]/new-site/html2txt
ViewVC logotype

Contents of /new-site/html2txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (show annotations)
Tue Mar 16 11:17:29 2010 UTC (14 years, 1 month ago) by spiros
File size: 2338 byte(s)
- working/partitions.html : added txt-only table
- updated site (added partitions.html/updated 2doc/README.txt)

1 #!/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 recover.html \
19 own-scripts.html \
20 partitions.html \
21 annex-a-devices.html \
22 annex-b-part-id.html
23
24 #for n in restoration.html
25
26 do
27
28 cat "$n" | tr -d '\r'|sed '/^[ ][ ]*$/s///' |sed '1,/<div id="content">/{
29 /<[hH]3>/!d
30 s|<[hH]3>|[H3]|g
31 }'| 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
32 s|images/||g' | sed 's|<!--txt-only--><!--||g'|sed 's|--><!--end-txt-only-->||g' | sed '/<!--not-on-txt-->/!b
33 :a
34 /<!--end-not-on-txt-->/!{
35 N
36 ba
37 }
38 s/<!--not-on-txt-->.*<!--end-not-on-txt-->//' | sed '/<head>/!b
39 :a
40 /<\/head>/!{
41 N
42 ba
43 }
44 s/<head>.*<\/head>//' | sed '/<[Hh]2/a\
45 ****************************************' |sed '/\[H3\]/a\
46 ==============================================================================' | sed 's|\[H3\]||g' | sed 's|^Documentation: ||' |sed '/<[Hh]3>/a\
47 ---------------------' | sed 's|<[Hh]4>|<H4>> |g' |sed 's| <span class="hideprint">.*</span>||g
48 s|<li[^>]*>|* |g
49 /<H1/{
50 s|>[ ][ ]*|>|
51 s|<br>| - |g
52 }
53 ' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed 's|[ ][ ]*| |g
54 s|&nbsp;| |g
55 s| \[^\]||
56 ' | 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 '/^$/{
57 $!N
58 /^\n$/D
59 }' |sed '/^\*\*\*\*\*\*/{
60 $!N
61 $!N
62 s/\n\n/\n/
63 }' | sed '/^---------------------/{
64 $!N
65 $!N
66 s/\n\n/\n/
67 }' | fmt -s -w78 >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
68
69 # | fmt -s -w78
70
71 echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
72 echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
73 echo >> /d/site/clonezilla-sysresccd/new-site/2doc/README.txt
74
75 done
76
77 rm /d/site/clonezilla-sysresccd/2doc/README-EL.txt 2>/dev/null
78
79
80

Properties

Name Value
svn:executable

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26