では、さっそく試してみましょう^^
まだまだ、一部しか実装されていないようですけど、
ありがたいことです。
#!/usr/local/bin/sed -f y/いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせすん/イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセスン/ y/ぁぃぅぇぉっゃゅょ/アイウエオツヤユヨ/ y/ァィゥェォッャュョ/アイウエオツヤユヨ/ y/がぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽ/ガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポ/ s/ガ/カ゛/g s/ギ/キ゛/g s/グ/ク゛/g s/ゲ/ケ゛/g s/ゴ/コ゛/g s/ザ/サ゛/g s/ジ/シ゛/g s/ズ/ス゛/g s/ゼ/セ゛/g s/ゾ/ソ゛/g s/ダ/タ゛/g s/ヂ/チ゛/g s/ヅ/ツ゛/g s/デ/テ゛/g s/ド/ト゛/g s/バ/ハ゛/g s/ビ/ヒ゛/g s/ブ/フ゛/g s/ベ/ヘ゛/g s/ボ/ホ゛/g s/パ/ハ゜/g s/ピ/ヒ゜/g s/プ/フ゜/g s/ペ/ヘ゜/g s/ポ/ホ゜/g s/イ/・- /g s/ロ/・-・- /g s/ハ/-・・・ /g s/ニ/-・-・ /g s/ホ/-・・ /g s/ヘ/・ /g s/ト/・・-・・ /g s/チ/・・-・ /g s/リ/--・ /g s/ヌ/・・・・ /g s/ル/-・--・ /g s/ヲ/・--- /g s/ワ/-・- /g s/カ/・-・・ /g s/ヨ/-- /g s/タ/-・ /g s/レ/--- /g s/ソ/---・ /g s/ツ/・--・ /g s/ネ/--・- /g s/ナ/・-・ /g s/ラ/・・・ /g s/ム/- /g s/ウ/・・- /g s/ヰ/・-・・- /g s/ノ/・・-- /g s/オ/・-・・・ /g s/ク/・・・- /g s/ヤ/・-- /g s/マ/-・・- /g s/ケ/-・-- /g s/フ/--・・ /g s/コ/---- /g s/エ/-・--- /g s/テ/・-・-- /g s/ア/--・-- /g s/サ/-・-・- /g s/キ/-・-・・ /g s/ユ/-・・-- /g s/メ/-・・・- /g s/ミ/・・-・- /g s/シ/--・-・ /g s/ヱ/・--・・ /g s/ヒ/--・・- /g s/モ/-・・-・ /g s/セ/・---・ /g s/ス/---・- /g s/ン/・-・-・ /g s/゛/・・ /g s/濁点/・・ /g s/゜/・・--・ /g s/半濁点/・・--・ /g s/ー/・--・- /g s/、/・-・-・- /g s/」/・-・-・・ /g s/(/-・--・- /g s/)/・-・・-・ /g s/本文/-・・--- /g s/訂正/・・・-・ /g s/終了/・・・-・ /g
#!/usr/local/bin/sed -f s/ / /g s/-・--・- /(/g s/・-・-・- /、/g s/・-・-・・ /」/g s/・-・・-・ /)/g s/---・- /ス/g s/--・-- /ア/g s/--・-・ /シ/g s/--・・- /ヒ/g s/-・--- /エ/g s/-・--・ /ル/g s/-・-・- /サ/g s/-・-・・ /キ/g s/-・・-- /ユ/g s/-・・-・ /モ/g s/-・・・- /メ/g s/・---・ /セ/g s/・--・- /ー/g s/・--・・ /ヱ/g s/・-・-- /テ/g s/・-・-・ /ン/g s/・-・・- /ヰ/g s/・-・・・ /オ/g s/・・--・ /゜/g s/・・-・- /ミ/g s/・・-・・ /ト/g s/---- /コ/g s/---・ /ソ/g s/--・- /ネ/g s/--・・ /フ/g s/-・-- /ケ/g s/-・-・ /ニ/g s/-・・- /マ/g s/-・・・ /ハ/g s/・--- /ヲ/g s/・--・ /ツ/g s/・-・- /ロ/g s/・-・・ /カ/g s/・・-- /ノ/g s/・・-・ /チ/g s/・・・- /ク/g s/・・・・ /ヌ/g s/--- /レ/g s/--・ /リ/g s/-・- /ワ/g s/-・・ /ホ/g s/・-- /ヤ/g s/・-・ /ナ/g s/・・- /ウ/g s/・・・ /ラ/g s/-- /ヨ/g s/-・ /タ/g s/・- /イ/g s/・・ /゛/g s/- /ム/g s/・ /ヘ/g s/カ゛/ガ/g s/キ゛/ギ/g s/ク゛/グ/g s/ケ゛/ゲ/g s/コ゛/ゴ/g s/サ゛/ザ/g s/シ゛/ジ/g s/ス゛/ズ/g s/セ゛/ゼ/g s/ソ゛/ゾ/g s/タ゛/ダ/g s/チ゛/ヂ/g s/ツ゛/ヅ/g s/テ゛/デ/g s/ト゛/ド/g s/ハ゛/バ/g s/ヒ゛/ビ/g s/フ゛/ブ/g s/ヘ゛/ベ/g s/ホ゛/ボ/g s/ハ゜/パ/g s/ヒ゜/ピ/g s/フ゜/プ/g s/ヘ゜/ペ/g s/ホ゜/ポ/g y/イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセスン/いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせすん/ y/ガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポ/がぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽ/
moria: tac$ spot -h Usage: spot [-u|-h|-ht|-r] [-n|-nc|-G|-T|-F] [-f] [-V] [-m] [-d][-i] [-o ] [-t |-P ] [-p ] [-@ ] + OR: spot -X Options: -u print usage information -h print usage and help information -ht print table-specific usage information -r dump Macintosh resource map -n dump glyph id/name mapping (also see '-m' below) -nc dump glyph id/name mapping, one per line (also see '-m' below) -T list table-directory in sfnt table -F list features in GPOS,GSUB tables -G proof glyph synopsis -f proof GPOS features in font order instead of GID order -V proof glyphs in Vertical writing mode (same as -p6 below) -m map glyph names into Adobe 'friendly' names, not AGL/Unicode names -d suppress header info from proof -br proof glyph synopsis one per page -i sfnt resource id list (see help) -o TTC directory offsets list (see help) -t table dump list (see help) -P , e.g 'P cswh,frac,kern' (use '-Proof' for all) -p set proofing policies: 1=No glyph name labels 2=No glyph numeric labels 4=Show KanjiStandardEMbox on glyph 5=Show GlyphBBox on glyph 6=Show Kanji in Vertical writing mode 7=Don't show Kanji 'kern','vkrn' with 'palt','vpal' values applied -@ set proofing glyph point-size (does not apply to certain synopses) -X execute a series of complete command-lines from
[default: OTFproof.scr ]
moria: tac$ spot -tBASE=5 KozMinPro-Regular.otf
BASE表を持たないフォントmoria: tac$ spot -thhea DFHSMinchoStd-W3.otf
var ohgumi = File.openDialog ("大組ゲラを開く");
app.open(ohgumi);
var kogumi = File.openDialog ("小組ゲラを開く");
app.open(kogumi);
/*document[1]は大組ゲラ*/
var numTF = app.documents[1].textFrames.length;
for (i=0; i<numTF; i++){
/*前面を大組ゲラに切り替え*/
app.layoutWindows[1].bringToFront();
app.select(NothingEnum.nothing);
/*documents[0]は大組ゲラ*/
app.documents[0].textFrames[i].select();
app.copy();
/*前面を小組ゲラに切り替え*/
app.layoutWindows[1].bringToFront();
app.paste();
app.select(NothingEnum.nothing);
/*documents[0]は小組ゲラ*/
app.documents[0].pages[i].textFrames[0].move(["0mm","0mm"]);
if (i<numTF-1){
/*documents[0]は小組ゲラ*/
app.documents[0].pages.add(1701733408);
}
}
$ cd De_Suse
$ zip -0 -X ../De_Suse.epub mimetype
$ zip -r ../De_Suse.epub * -x mimetype
$ cd ..「4 ZIP Container」節の末尾
The first file in the ZIP Container MUST be a file by the ASCII name of ‘mimetype’ which holds the MIME type for the ZIP Container (i.e., “application/epub+zip” as an ASCII string; no padding, white-space or case change). The file MUST be neither compressed nor encrypted and there MUST NOT be an extra field in its ZIP header. If this is done, then the ZIP Container offers convenient “magic number” support as described in RFC 2048 and the following will hold true:
The bytes “PK” will be at the beginning of the file
The bytes “mimetype” will be at position 30
The actual MIME type (i.e., the ASCII string “application/epub+zip”) will begin at position 38
3.3 OCF ZIP Container Media Type Identification
OCF ZIP Containers must include a mimetype file as the first file in the Container, and the contents of this file must be the MIME type string application/epub+zip.
The contents of the mimetype file must not contain any leading padding or whitespace, must not begin with the Unicode signature (or Byte Order Mark), and the case of the MIME type string must be exactly as presented above. The mimetype file additionally must be neither compressed nor encrypted, and there must not be an extra field in its ZIP header.
moria:Desktop tac$ hexdump -C De_Suse.epub |head00000000 50 4b 03 04 0a 00 00 00 00 00 52 bb ac 3e 6f 61 |PK........R..>oa|
00000010 ab 2c 14 00 00 00 14 00 00 00 08 00 00 00 6d 69 |.,............mi|
00000020 6d 65 74 79 70 65 61 70 70 6c 69 63 61 74 69 6f |metypeapplicatio|
00000030 6e 2f 65 70 75 62 2b 7a 69 70 50 4b 03 04 0a 00 |n/epub+zipPK....|
00000040 00 00 00 00 7d bb ac 3e 00 00 00 00 00 00 00 00 |....}..>........|
00000050 00 00 00 00 09 00 00 00 4d 45 54 41 2d 49 4e 46 |........META-INF|
00000060 2f 50 4b 03 04 14 00 00 00 08 00 52 bb ac 3e c5 |/PK........R..>.|
00000070 06 1a 6f a3 00 00 00 f2 00 00 00 16 00 00 00 4d |..o............M|
00000080 45 54 41 2d 49 4e 46 2f 63 6f 6e 74 61 69 6e 65 |ETA-INF/containe|
00000090 72 2e 78 6d 6c 55 8e c1 0e c2 20 10 44 ef fd 0a |r.xmlU.... .D...|moria:Desktop tac$ hexdump -C De_Suse_MacZIP.epub |head
00000000 50 4b 03 04 0a 00 00 00 00 00 7d bb ac 3e 00 00 |PK........}..>..|
00000010 00 00 00 00 00 00 00 00 00 00 09 00 10 00 4d 45 |..............ME|
00000020 54 41 2d 49 4e 46 2f 55 58 0c 00 cd ef cb 4d 6e |TA-INF/UX.....Mn|
00000030 ee cb 4d f6 01 f6 01 50 4b 03 04 14 00 08 00 08 |..M....PK.......|
00000040 00 52 bb ac 3e 00 00 00 00 00 00 00 00 00 00 00 |.R..>...........|
00000050 00 16 00 10 00 4d 45 54 41 2d 49 4e 46 2f 63 6f |.....META-INF/co|
00000060 6e 74 61 69 6e 65 72 2e 78 6d 6c 55 58 0c 00 5e |ntainer.xmlUX..^|
00000070 05 cc 4d 1c ee cb 4d f6 01 f6 01 55 8e c1 0e c2 |..M...M....U....|
00000080 20 10 44 ef fd 0a c2 d5 b4 e8 95 40 4d 4c 3c 6b | .D........@ML<k|
00000090 e2 17 ac 74 ab 44 60 09 50 a3 7f 2f d6 a4 b1 7b |...t.D`.P../...{|
ただ証すための一篇にいとおしく焼き尽くされるためそんな河津さんの生き方ってすてきだと思うのです。
この今を抱くように生きている