diff --git "a/contents/traditional-mandarin/00-00-\345\220\215\345\256\266\346\216\250\350\226\246.md" "b/contents/traditional-mandarin/0-0-\345\220\215\345\256\266\346\216\250\350\226\246.md" similarity index 100% rename from "contents/traditional-mandarin/00-00-\345\220\215\345\256\266\346\216\250\350\226\246.md" rename to "contents/traditional-mandarin/0-0-\345\220\215\345\256\266\346\216\250\350\226\246.md" diff --git "a/contents/traditional-mandarin/00-01-\351\227\234\346\226\274\344\275\234\350\200\205\347\276\244.md" "b/contents/traditional-mandarin/0-1-\351\227\234\346\226\274\344\275\234\350\200\205\347\276\244.md" similarity index 100% rename from "contents/traditional-mandarin/00-01-\351\227\234\346\226\274\344\275\234\350\200\205\347\276\244.md" rename to "contents/traditional-mandarin/0-1-\351\227\234\346\226\274\344\275\234\350\200\205\347\276\244.md" diff --git "a/contents/traditional-mandarin/00-02-\346\211\276\345\210\260\344\275\240\347\232\204\351\201\223\350\267\257.md" "b/contents/traditional-mandarin/0-2-\346\211\276\345\210\260\344\275\240\347\232\204\351\201\223\350\267\257.md" similarity index 100% rename from "contents/traditional-mandarin/00-02-\346\211\276\345\210\260\344\275\240\347\232\204\351\201\223\350\267\257.md" rename to "contents/traditional-mandarin/0-2-\346\211\276\345\210\260\344\275\240\347\232\204\351\201\223\350\267\257.md" diff --git "a/contents/traditional-mandarin/00-03-\350\207\264\350\254\235.md" "b/contents/traditional-mandarin/0-3-\350\207\264\350\254\235.md" similarity index 100% rename from "contents/traditional-mandarin/00-03-\350\207\264\350\254\235.md" rename to "contents/traditional-mandarin/0-3-\350\207\264\350\254\235.md" diff --git "a/contents/traditional-mandarin/01-\346\225\270\344\275\215\350\247\200\347\205\247.md" "b/contents/traditional-mandarin/1-\346\225\270\344\275\215\350\247\200\347\205\247.md" similarity index 100% rename from "contents/traditional-mandarin/01-\346\225\270\344\275\215\350\247\200\347\205\247.md" rename to "contents/traditional-mandarin/1-\346\225\270\344\275\215\350\247\200\347\205\247.md" diff --git "a/contents/traditional-mandarin/02-00-\350\263\207\350\250\212\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273\357\274\232\346\227\245\347\233\212\346\223\264\345\244\247\347\232\204\351\264\273\346\272\235.md" "b/contents/traditional-mandarin/2-0-\350\263\207\350\250\212\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273\357\274\232\346\227\245\347\233\212\346\223\264\345\244\247\347\232\204\351\264\273\346\272\235.md" similarity index 100% rename from "contents/traditional-mandarin/02-00-\350\263\207\350\250\212\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273\357\274\232\346\227\245\347\233\212\346\223\264\345\244\247\347\232\204\351\264\273\346\272\235.md" rename to "contents/traditional-mandarin/2-0-\350\263\207\350\250\212\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273\357\274\232\346\227\245\347\233\212\346\223\264\345\244\247\347\232\204\351\264\273\346\272\235.md" diff --git "a/contents/traditional-mandarin/02-01-\347\216\211\345\261\261\350\246\226\351\207\216.md" "b/contents/traditional-mandarin/2-1-\347\216\211\345\261\261\350\246\226\351\207\216.md" similarity index 100% rename from "contents/traditional-mandarin/02-01-\347\216\211\345\261\261\350\246\226\351\207\216.md" rename to "contents/traditional-mandarin/2-1-\347\216\211\345\261\261\350\246\226\351\207\216.md" diff --git "a/contents/traditional-mandarin/02-02-\346\225\270\344\275\215\346\260\221\344\270\273\347\232\204\346\227\245\345\270\270.md" "b/contents/traditional-mandarin/2-2-\346\225\270\344\275\215\346\260\221\344\270\273\347\232\204\346\227\245\345\270\270.md" similarity index 100% rename from "contents/traditional-mandarin/02-02-\346\225\270\344\275\215\346\260\221\344\270\273\347\232\204\346\227\245\345\270\270.md" rename to "contents/traditional-mandarin/2-2-\346\225\270\344\275\215\346\260\221\344\270\273\347\232\204\346\227\245\345\270\270.md" diff --git "a/contents/traditional-mandarin/03-00-\344\275\225\350\254\202\345\244\232\345\205\203\345\256\207\345\256\231\357\274\237.md" "b/contents/traditional-mandarin/3-0-\344\275\225\350\254\202\345\244\232\345\205\203\345\256\207\345\256\231\357\274\237.md" similarity index 100% rename from "contents/traditional-mandarin/03-00-\344\275\225\350\254\202\345\244\232\345\205\203\345\256\207\345\256\231\357\274\237.md" rename to "contents/traditional-mandarin/3-0-\344\275\225\350\254\202\345\244\232\345\205\203\345\256\207\345\256\231\357\274\237.md" diff --git "a/contents/traditional-mandarin/03-01-\346\264\273\345\234\250\342\277\273\344\270\226\347\225\214.md" "b/contents/traditional-mandarin/3-1-\346\264\273\345\234\250\342\277\273\344\270\226\347\225\214.md" similarity index 100% rename from "contents/traditional-mandarin/03-01-\346\264\273\345\234\250\342\277\273\344\270\226\347\225\214.md" rename to "contents/traditional-mandarin/3-1-\346\264\273\345\234\250\342\277\273\344\270\226\347\225\214.md" diff --git "a/contents/traditional-mandarin/03-02-\347\233\270\351\200\243\347\232\204\347\244\276\346\234\203.md" "b/contents/traditional-mandarin/3-2-\347\233\270\351\200\243\347\232\204\347\244\276\346\234\203.md" similarity index 100% rename from "contents/traditional-mandarin/03-02-\347\233\270\351\200\243\347\232\204\347\244\276\346\234\203.md" rename to "contents/traditional-mandarin/3-2-\347\233\270\351\200\243\347\232\204\347\244\276\346\234\203.md" diff --git "a/contents/traditional-mandarin/03-03-\346\210\221\345\200\221\351\201\272\345\277\230\347\232\204\351\201\223.md" "b/contents/traditional-mandarin/3-3-\346\210\221\345\200\221\351\201\272\345\277\230\347\232\204\351\201\223.md" similarity index 100% rename from "contents/traditional-mandarin/03-03-\346\210\221\345\200\221\351\201\272\345\277\230\347\232\204\351\201\223.md" rename to "contents/traditional-mandarin/3-3-\346\210\221\345\200\221\351\201\272\345\277\230\347\232\204\351\201\223.md" diff --git "a/contents/traditional-mandarin/04-00-\346\254\212\345\210\251\343\200\201\344\275\234\346\245\255\347\263\273\347\265\261\350\210\207\346\225\270\344\275\215\350\207\252\347\224\261.md" "b/contents/traditional-mandarin/4-0-\346\254\212\345\210\251\343\200\201\344\275\234\346\245\255\347\263\273\347\265\261\350\210\207\346\225\270\344\275\215\350\207\252\347\224\261.md" similarity index 100% rename from "contents/traditional-mandarin/04-00-\346\254\212\345\210\251\343\200\201\344\275\234\346\245\255\347\263\273\347\265\261\350\210\207\346\225\270\344\275\215\350\207\252\347\224\261.md" rename to "contents/traditional-mandarin/4-0-\346\254\212\345\210\251\343\200\201\344\275\234\346\245\255\347\263\273\347\265\261\350\210\207\346\225\270\344\275\215\350\207\252\347\224\261.md" diff --git "a/contents/traditional-mandarin/04-01-\350\272\253\345\210\206\350\210\207\344\272\272\346\240\274\346\254\212.md" "b/contents/traditional-mandarin/4-1-\350\272\253\345\210\206\350\210\207\344\272\272\346\240\274\346\254\212.md" similarity index 100% rename from "contents/traditional-mandarin/04-01-\350\272\253\345\210\206\350\210\207\344\272\272\346\240\274\346\254\212.md" rename to "contents/traditional-mandarin/4-1-\350\272\253\345\210\206\350\210\207\344\272\272\346\240\274\346\254\212.md" diff --git "a/contents/traditional-mandarin/04-02-\347\265\220\347\244\276\350\210\207\345\244\232\345\205\203\345\205\254\347\234\276.md" "b/contents/traditional-mandarin/4-2-\347\265\220\347\244\276\350\210\207\345\244\232\345\205\203\345\205\254\347\234\276.md" similarity index 100% rename from "contents/traditional-mandarin/04-02-\347\265\220\347\244\276\350\210\207\345\244\232\345\205\203\345\205\254\347\234\276.md" rename to "contents/traditional-mandarin/4-2-\347\265\220\347\244\276\350\210\207\345\244\232\345\205\203\345\205\254\347\234\276.md" diff --git "a/contents/traditional-mandarin/04-03-\345\225\206\346\245\255\350\210\207\344\277\241\344\273\273.md" "b/contents/traditional-mandarin/4-3-\345\225\206\346\245\255\350\210\207\344\277\241\344\273\273.md" similarity index 100% rename from "contents/traditional-mandarin/04-03-\345\225\206\346\245\255\350\210\207\344\277\241\344\273\273.md" rename to "contents/traditional-mandarin/4-3-\345\225\206\346\245\255\350\210\207\344\277\241\344\273\273.md" diff --git "a/contents/traditional-mandarin/04-04-\350\262\241\347\224\242\350\210\207\345\220\210\347\264\204.md" "b/contents/traditional-mandarin/4-4-\350\262\241\347\224\242\350\210\207\345\220\210\347\264\204.md" similarity index 100% rename from "contents/traditional-mandarin/04-04-\350\262\241\347\224\242\350\210\207\345\220\210\347\264\204.md" rename to "contents/traditional-mandarin/4-4-\350\262\241\347\224\242\350\210\207\345\220\210\347\264\204.md" diff --git "a/contents/traditional-mandarin/04-05-\345\255\230\345\217\226\346\254\212.md" "b/contents/traditional-mandarin/4-5-\345\255\230\345\217\226\346\254\212.md" similarity index 100% rename from "contents/traditional-mandarin/04-05-\345\255\230\345\217\226\346\254\212.md" rename to "contents/traditional-mandarin/4-5-\345\255\230\345\217\226\346\254\212.md" diff --git "a/contents/traditional-mandarin/05-00-\345\215\224\344\275\234\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273.md" "b/contents/traditional-mandarin/5-0-\345\215\224\344\275\234\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273.md" similarity index 100% rename from "contents/traditional-mandarin/05-00-\345\215\224\344\275\234\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273.md" rename to "contents/traditional-mandarin/5-0-\345\215\224\344\275\234\346\212\200\350\241\223\350\210\207\346\260\221\344\270\273.md" diff --git "a/contents/traditional-mandarin/05-01-\345\276\214\347\254\246\350\231\237\344\272\244\346\265\201.md" "b/contents/traditional-mandarin/5-1-\345\276\214\347\254\246\350\231\237\344\272\244\346\265\201.md" similarity index 100% rename from "contents/traditional-mandarin/05-01-\345\276\214\347\254\246\350\231\237\344\272\244\346\265\201.md" rename to "contents/traditional-mandarin/5-1-\345\276\214\347\254\246\350\231\237\344\272\244\346\265\201.md" diff --git "a/contents/traditional-mandarin/05-02-\346\262\211\346\265\270\345\274\217\345\205\261\344\272\253\345\257\246\345\242\203.md" "b/contents/traditional-mandarin/5-2-\346\262\211\346\265\270\345\274\217\345\205\261\344\272\253\345\257\246\345\242\203.md" similarity index 100% rename from "contents/traditional-mandarin/05-02-\346\262\211\346\265\270\345\274\217\345\205\261\344\272\253\345\257\246\345\242\203.md" rename to "contents/traditional-mandarin/5-2-\346\262\211\346\265\270\345\274\217\345\205\261\344\272\253\345\257\246\345\242\203.md" diff --git "a/contents/traditional-mandarin/05-03-\345\211\265\346\204\217\345\215\224\344\275\234.md" "b/contents/traditional-mandarin/5-3-\345\211\265\346\204\217\345\215\224\344\275\234.md" similarity index 100% rename from "contents/traditional-mandarin/05-03-\345\211\265\346\204\217\345\215\224\344\275\234.md" rename to "contents/traditional-mandarin/5-3-\345\211\265\346\204\217\345\215\224\344\275\234.md" diff --git "a/contents/traditional-mandarin/05-04-\346\223\264\345\242\236\345\257\251\350\255\260.md" "b/contents/traditional-mandarin/5-4-\346\223\264\345\242\236\345\257\251\350\255\260.md" similarity index 100% rename from "contents/traditional-mandarin/05-04-\346\223\264\345\242\236\345\257\251\350\255\260.md" rename to "contents/traditional-mandarin/5-4-\346\223\264\345\242\236\345\257\251\350\255\260.md" diff --git "a/contents/traditional-mandarin/05-05-\351\201\251\346\207\211\345\274\217\350\241\214\346\224\277.md" "b/contents/traditional-mandarin/5-5-\351\201\251\346\207\211\345\274\217\350\241\214\346\224\277.md" similarity index 100% rename from "contents/traditional-mandarin/05-05-\351\201\251\346\207\211\345\274\217\350\241\214\346\224\277.md" rename to "contents/traditional-mandarin/5-5-\351\201\251\346\207\211\345\274\217\350\241\214\346\224\277.md" diff --git "a/contents/traditional-mandarin/05-06-\342\277\273\346\212\225\347\245\250.md" "b/contents/traditional-mandarin/5-6-\342\277\273\346\212\225\347\245\250.md" similarity index 100% rename from "contents/traditional-mandarin/05-06-\342\277\273\346\212\225\347\245\250.md" rename to "contents/traditional-mandarin/5-6-\342\277\273\346\212\225\347\245\250.md" diff --git "a/contents/traditional-mandarin/05-07-\347\244\276\346\234\203\345\270\202\345\240\264.md" "b/contents/traditional-mandarin/5-7-\347\244\276\346\234\203\345\270\202\345\240\264.md" similarity index 100% rename from "contents/traditional-mandarin/05-07-\347\244\276\346\234\203\345\270\202\345\240\264.md" rename to "contents/traditional-mandarin/5-7-\347\244\276\346\234\203\345\270\202\345\240\264.md" diff --git "a/contents/traditional-mandarin/06-00-\345\276\236\342\277\273\345\210\260\347\217\276\345\257\246\347\244\276\346\234\203.md" "b/contents/traditional-mandarin/6-0-\345\276\236\342\277\273\345\210\260\347\217\276\345\257\246\347\244\276\346\234\203.md" similarity index 100% rename from "contents/traditional-mandarin/06-00-\345\276\236\342\277\273\345\210\260\347\217\276\345\257\246\347\244\276\346\234\203.md" rename to "contents/traditional-mandarin/6-0-\345\276\236\342\277\273\345\210\260\347\217\276\345\257\246\347\244\276\346\234\203.md" diff --git "a/contents/traditional-mandarin/06-01-\350\201\267\345\240\264.md" "b/contents/traditional-mandarin/6-1-\350\201\267\345\240\264.md" similarity index 100% rename from "contents/traditional-mandarin/06-01-\350\201\267\345\240\264.md" rename to "contents/traditional-mandarin/6-1-\350\201\267\345\240\264.md" diff --git "a/contents/traditional-mandarin/06-02-\345\201\245\345\272\267.md" "b/contents/traditional-mandarin/6-2-\345\201\245\345\272\267.md" similarity index 100% rename from "contents/traditional-mandarin/06-02-\345\201\245\345\272\267.md" rename to "contents/traditional-mandarin/6-2-\345\201\245\345\272\267.md" diff --git "a/contents/traditional-mandarin/06-03-\345\252\222\351\253\224.md" "b/contents/traditional-mandarin/6-3-\345\252\222\351\253\224.md" similarity index 100% rename from "contents/traditional-mandarin/06-03-\345\252\222\351\253\224.md" rename to "contents/traditional-mandarin/6-3-\345\252\222\351\253\224.md" diff --git "a/contents/traditional-mandarin/06-04-\347\222\260\345\242\203.md" "b/contents/traditional-mandarin/6-4-\347\222\260\345\242\203.md" similarity index 100% rename from "contents/traditional-mandarin/06-04-\347\222\260\345\242\203.md" rename to "contents/traditional-mandarin/6-4-\347\222\260\345\242\203.md" diff --git "a/contents/traditional-mandarin/07-00-\346\224\277\347\255\226.md" "b/contents/traditional-mandarin/7-0-\346\224\277\347\255\226.md" similarity index 100% rename from "contents/traditional-mandarin/07-00-\346\224\277\347\255\226.md" rename to "contents/traditional-mandarin/7-0-\346\224\277\347\255\226.md" diff --git "a/contents/traditional-mandarin/07-01-\347\265\220\350\252\236.md" "b/contents/traditional-mandarin/7-1-\347\265\220\350\252\236.md" similarity index 100% rename from "contents/traditional-mandarin/07-01-\347\265\220\350\252\236.md" rename to "contents/traditional-mandarin/7-1-\347\265\220\350\252\236.md" diff --git "a/contents/traditional-mandarin/08-\347\260\241\344\273\213.md" "b/contents/traditional-mandarin/8-\347\260\241\344\273\213.md" similarity index 100% rename from "contents/traditional-mandarin/08-\347\260\241\344\273\213.md" rename to "contents/traditional-mandarin/8-\347\260\241\344\273\213.md" diff --git a/scripts/make-book-zh-tw.pl b/scripts/make-book-zh-tw.pl index 73615237..756eb778 100644 --- a/scripts/make-book-zh-tw.pl +++ b/scripts/make-book-zh-tw.pl @@ -22,7 +22,7 @@ --- HEADER -$all .= (read_file($_) =~ s/^#+\s+(.+)/\n**$1**/rg). "\n\n" for glob("contents/traditional-mandarin/00-0[13]-*.md"); +$all .= (read_file($_) =~ s/^#+\s+(.+)/\n**$1**/rg). "\n\n" for glob("contents/traditional-mandarin/0-[13]-*.md"); sub read_file { my $filename = shift; @@ -46,7 +46,7 @@ sub write_file { 6 => "六、影響", 7 => "七、前行", ); -for (sort ) { +for (sort ) { my $basename = s,.*/([-\d]+)-.*,$1,r; my $s = int($basename =~ s/-.*//r); if (my $section_name = delete $Sections{$s}) { @@ -68,9 +68,9 @@ sub write_file { write_file('traditional-mandarin.md', $all); write_file( - '00-01.tex', ( + '0-1.tex', ( map { read_file($_) =~ s/\*\*(.*?)\*\*/\\textbf{$1}/rg =~ s/^#+\s+(.+)/\\textbf{$1}/rg =~ s/&/\\&/rg } - glob 'contents/traditional-mandarin/00-02-*.md' + glob 'contents/traditional-mandarin/0-2-*.md' ) ); @@ -84,7 +84,7 @@ sub write_file { . system << '.'; -docker run --rm --volume "$(pwd):/data" --user $(id -u):$(id -g) audreyt/pandoc-plurality-book traditional-mandarin.md -o tmp.pdf --include-before-body=00-01.tex --toc --toc-depth=2 -s --pdf-engine=xelatex -V CJKmainfont='Noto Sans CJK TC' -V fontsize=20pt -V documentclass=extreport -f markdown-implicit_figures --filter=/data/scripts/emoji_filter.js +docker run --rm --volume "$(pwd):/data" --user $(id -u):$(id -g) audreyt/pandoc-plurality-book traditional-mandarin.md -o tmp.pdf --include-before-body=0-1.tex --toc --toc-depth=2 -s --pdf-engine=xelatex -V CJKmainfont='Noto Sans CJK TC' -V fontsize=20pt -V documentclass=extreport -f markdown-implicit_figures --filter=/data/scripts/emoji_filter.js . system << '.'; @@ -99,4 +99,4 @@ sub write_file { unlink 'tmp.pdf'; unlink 'tmp.tex'; -unlink '01-01.tex'; +unlink '1-1.tex'; diff --git a/scripts/make-book.pl b/scripts/make-book.pl index 938ebdad..3cce3871 100644 --- a/scripts/make-book.pl +++ b/scripts/make-book.pl @@ -23,7 +23,7 @@ --- HEADER -$all .= (read_file($_) =~ s/^#+\s+(.+)/\n**$1**/rg). "\n\n" for glob("contents/english/00-0[13]-*.md"); +$all .= (read_file($_) =~ s/^#+\s+(.+)/\n**$1**/rg). "\n\n" for glob("contents/english/0-[13]-*.md"); sub read_file { my $filename = shift; @@ -47,7 +47,7 @@ sub write_file { 6 => "Section 6: Impact", 7 => "Section 7: Forward", ); -for (sort ) { +for (sort ) { my $basename = s,.*/([-\d]+)-.*,$1,r; my $s = int($basename =~ s/-.*//r); if (my $section_name = delete $Sections{$s}) { @@ -66,9 +66,9 @@ sub write_file { write_file('english.md', $all); write_file( - '00-01.tex', ( + '0-1.tex', ( map { read_file($_) =~ s/\*\*(.*?)\*\*/\\textbf{$1}/rg =~ s/^#+\s+(.+)/\\textbf{$1}/rg =~ s/&/\\&/rg } - glob 'contents/english/00-02-*.md' + glob 'contents/english/0-2-*.md' ) ); @@ -81,7 +81,7 @@ sub write_file { . system << '.'; -docker run --rm --volume "$(pwd):/data" --user $(id -u):$(id -g) audreyt/pandoc-plurality-book english.md -o tmp.pdf --include-before-body=00-01.tex --toc --toc-depth=2 -s --pdf-engine=xelatex -V CJKmainfont='Noto Sans CJK TC' -V fontsize=18pt -V documentclass=extreport -f markdown-implicit_figures --filter=/data/scripts/emoji_filter.js +docker run --rm --volume "$(pwd):/data" --user $(id -u):$(id -g) audreyt/pandoc-plurality-book english.md -o tmp.pdf --include-before-body=0-1.tex --toc --toc-depth=2 -s --pdf-engine=xelatex -V CJKmainfont='Noto Sans CJK TC' -V fontsize=18pt -V documentclass=extreport -f markdown-implicit_figures --filter=/data/scripts/emoji_filter.js . system << '.'; @@ -96,4 +96,4 @@ sub write_file { unlink 'tmp.pdf'; unlink 'tmp.tex'; -unlink '01-01.tex'; +unlink '1-1.tex';