chm-hhp.sh
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 20 Feb 2016 15:20:24 +0200
changeset 1893 da0024f4f068
parent 903 9ead7d97be34
permissions -rwxr-xr-x
Remove frame based publishing, stick to iframe. Clean CHM code generation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
903
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
echo '[OPTIONS]'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
echo 'Compatibility=1.1 or later'
1893
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
     5
echo 'Compiled file=chm.chm'
903
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
echo 'Contents file=chm.hhc'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
echo 'Default Window=Navigation panel'
1893
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
     8
echo 'Default topic=iframe.html'
903
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
echo 'Display compile progress=No'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
echo 'Full text search stop list file=chm.stp'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
echo 'Full-text search=Yes'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
echo 'Language=0x409 Английский (США)'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
echo 'Title=Tips from gavenkoa'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
echo ''
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
echo '[WINDOWS]'
1893
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
    16
echo 'Navigation panel=,"chm.hhc",,"iframe.html","iframe.html",,,,,0x62520,250,0x304e,[0,0,900,600],,,,,,,0'
903
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
echo ''
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
echo '[FILES]'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
for file in *.rst *.txt; do
1893
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
    21
  case $file in
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
    22
    HEADER.rst) continue;;
da0024f4f068 Remove frame based publishing, stick to iframe. Clean CHM code generation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 903
diff changeset
    23
  esac
903
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
  ext=${file##*.}
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
  name=${file%.${ext}}
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
  case $ext in
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
    txt)
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
      echo $name.txt
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
      ;;
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
    rst)
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
      echo $name.html
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
      ;;
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
  esac
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
done
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
echo ''
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
echo '[INFOTYPES]'
9ead7d97be34 Add chm output format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38