-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 59c4f72
Showing
172 changed files
with
100,610 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# A sample Gemfile | ||
source "https://rubygems.org" | ||
|
||
gem 'review', '2.2.0' | ||
gem 'review-peg', '0.2.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
review (2.2.0) | ||
rouge | ||
rubyzip | ||
review-peg (0.2.2) | ||
rouge (3.0.0) | ||
rubyzip (1.2.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
review (= 2.2.0) | ||
review-peg (= 0.2.2) | ||
|
||
BUNDLED WITH | ||
1.10.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
"use strict"; | ||
|
||
let fs = require("fs"); | ||
let yaml = require("js-yaml"); | ||
|
||
const articles = "articles"; | ||
const bookConfig = yaml.safeLoad(fs.readFileSync(`${articles}/config.yml`, "utf8")); | ||
|
||
const reviewPrefix = process.env["REVIEW_PREFIX"] || "bundle exec "; | ||
const reviewPostfix = process.env["REVIEW_POSTFIX"] || ""; // REVIEW_POSTFIX="-peg" npm run pdf とかするとPEGでビルドできるよ | ||
const reviewPreproc = `${reviewPrefix}review-preproc${reviewPostfix}`; | ||
const reviewCompile = `${reviewPrefix}review-compile${reviewPostfix}`; | ||
const reviewPdfMaker = `${reviewPrefix}review-pdfmaker${reviewPostfix}`; | ||
const reviewEpubMaker = `${reviewPrefix}review-epubmaker${reviewPostfix}`; | ||
|
||
module.exports = grunt => { | ||
grunt.initConfig({ | ||
clean: { | ||
review: { | ||
src: [ | ||
`${articles}/${bookConfig.bookname}-*/`, // pdf, epub temp dir | ||
`${articles}/*.pdf`, | ||
`${articles}/*.epub`, | ||
`${articles}/*.html`, | ||
`${articles}/*.md`, | ||
`${articles}/*.xml`, | ||
`${articles}/*.txt` | ||
] | ||
} | ||
}, | ||
shell: { | ||
preprocess: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewPreproc} -r --tabwidth=2 *.re` | ||
}, | ||
compile2text: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewCompile} --target=text` | ||
}, | ||
compile2markdown: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewCompile} --target=markdown` | ||
}, | ||
compile2html: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewCompile} --target=html --stylesheet=style.css --chapterlink` | ||
}, | ||
compile2latex: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewCompile} --target=latex --footnotetext` | ||
}, | ||
compile2idgxml: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewCompile} --target=idgxml` | ||
}, | ||
compile2pdf: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewPdfMaker} config.yml` | ||
}, | ||
compile2epub: { | ||
options: { | ||
execOptions: { | ||
cwd: articles, | ||
} | ||
}, | ||
command: `${reviewEpubMaker} config.yml` | ||
} | ||
} | ||
}); | ||
|
||
function generateTask(target) { | ||
return ["clean", "shell:preprocess", `shell:compile2${target}`]; | ||
} | ||
|
||
grunt.registerTask( | ||
"default", | ||
"原稿をコンパイルしてPDFファイルにする", | ||
"pdf"); | ||
|
||
grunt.registerTask( | ||
"text", | ||
"原稿をコンパイルしてTextファイルにする", | ||
generateTask("text")); | ||
|
||
grunt.registerTask( | ||
"markdown", | ||
"原稿をコンパイルしてMarkdownファイルにする", | ||
generateTask("markdown")); | ||
|
||
grunt.registerTask( | ||
"html", | ||
"原稿をコンパイルしてHTMLファイルにする", | ||
generateTask("html")); | ||
|
||
grunt.registerTask( | ||
"idgxml", | ||
"原稿をコンパイルしてInDesign用XMLファイルにする", | ||
generateTask("idgxml")); | ||
|
||
grunt.registerTask( | ||
"pdf", | ||
"原稿をコンパイルしてpdfファイルにする", | ||
generateTask("pdf")); | ||
|
||
grunt.registerTask( | ||
"epub", | ||
"原稿をコンパイルしてepubファイルにする", | ||
generateTask("epub")); | ||
|
||
require('load-grunt-tasks')(grunt); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# IndieVisualLab執筆環境 | ||
|
||
## 利用ツール | ||
|
||
### Re:View | ||
|
||
Re:View使います | ||
|
||
達人出版会の中の人が開発してるそう | ||
|
||
#### インストール | ||
|
||
https://github.com/kmuto/review | ||
|
||
ここ見ればOK | ||
|
||
### md2review | ||
|
||
MarkDownを.reファイルに変換してくれるぞい | ||
|
||
Gemfileに追加してるので | ||
```bash | ||
bundle install | ||
``` | ||
|
||
で入るはず | ||
|
||
### TeX | ||
|
||
Re:View動かすのにTeXがいるのでインストール | ||
|
||
#### Macの場合 | ||
|
||
http://www2.kumagaku.ac.jp/teacher/herogw/ | ||
|
||
ここからpTeXをDownloadしてくる(Sierra 10.12.5でいけた) | ||
|
||
pTexを/Applications以下に移動して, | ||
/Applications/pTeX.app/teTeX/binにPATHを通す. | ||
|
||
.bashrcとかに | ||
```bash | ||
export PATH=$PATH:/Applications/pTeX.app/teTeX/bin | ||
``` | ||
とか書けばOK | ||
|
||
#### Macの場合 その2 | ||
上記の方法で出来なかった場合は | ||
http://qiita.com/hideaki_polisci/items/3afd204449c6cdd995c9 | ||
|
||
ここを参考にMacTexをインストールする。 | ||
|
||
.bashrcとかに | ||
```bash | ||
export PATH=$PATH:/Library/TeX/texbin | ||
``` | ||
と書いてパスを通す | ||
|
||
#### Windowsの場合 | ||
|
||
Mr.Yata「Bash on Windows使えばいける」 | ||
|
||
bash on windowsのインストールの仕方は下記参照 | ||
http://qiita.com/Aruneko/items/c79810b0b015bebf30bb | ||
|
||
bash on Windowsインストール後、bash上でRE:VIEWとTexをインストールする | ||
```bash | ||
sudo gem install review | ||
sudo apt install texlive-full | ||
sudo apt install build-essential | ||
sudo apt-get install ruby-dev | ||
sudo gem install md2review | ||
``` | ||
|
||
## Re:Viewでの執筆フロー | ||
|
||
### pdf化 | ||
|
||
```bash | ||
review-pdfmaker config.yml | ||
``` | ||
もしくは、 | ||
|
||
```bash | ||
rake pdf | ||
``` | ||
|
||
でPDF生成 | ||
|
||
### 章ごとのファイル追加 | ||
|
||
catalog.yml内に | ||
```yaml | ||
CHAPS: | ||
- Preface.re | ||
- Chapter1.re | ||
- Chapter2.re | ||
``` | ||
という風に記述すると章ごとに使いたいファイルを指定できる. | ||
### MarkDownからRe:Viewフォーマットに変換 | ||
```bash | ||
md2review hoge.md > hoge.re | ||
``` | ||
ってやるだけ | ||
|
||
|
||
|
||
|
||
# サンプルコードリポジトリ | ||
https://github.com/IndieVisualLab/UnityGraphicsProgramming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= 権利について | ||
|
||
コンテンツデータの著作権は全て著作権者に帰属します。 | ||
コンテンツデータは、再出版、展示、頒布、譲渡、貸与、翻案、公衆送信することはできません。著作権者に同意を得ない上記の行為は、著作権侵害となり、著作権法およびその他の知的財産権に関する法律ならびに条約により禁止されております。たとえば、データの一部または全部を著作権者の許諾を得ずにホームページに転載することや、社内のLANなどで配信することは違法行為となります。 | ||
著作権者は、購入者の違法行為により生じた一切の損害、損失および費用の賠償を警告なく、購入者に対して請求するものとします。 | ||
ダウンロードしたコンテンツデータの権利は著作権者が購入者に譲渡するものではありません。購入者は所持する記憶媒体にデータを保管し所持しますが、コンテンツデータの所有権その他すべての権利およびコンテンツデータに含まれるすべての知的財産権は著作権者に帰属するものとし、購入者はコンテンツデータを閲覧する権限のみが許諾されるものとします。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
\section*{権利について} | ||
|
||
コンテンツデータの著作権は全て著作権者に帰属します。 | ||
コンテンツデータは、再出版、展示、頒布、譲渡、貸与、翻案、公衆送信することはできません。著作権者に同意を得ない上記の行為は、著作権侵害となり、著作権法およびその他の知的財産権に関する法律ならびに条約により禁止されております。たとえば、データの一部または全部を著作権者の許諾を得ずにホームページに転載することや、社内のLANなどで配信することは違法行為となります。 | ||
著作権者は、購入者の違法行為により生じた一切の損害、損失および費用の賠償を警告なく、購入者に対して請求するものとします。 | ||
ダウンロードしたコンテンツデータの権利は著作権者が購入者に譲渡するものではありません。購入者は所持する記憶媒体にデータを保管し所持しますが、コンテンツデータの所有権その他すべての権利およびコンテンツデータに含まれるすべての知的財産権は著作権者に帰属するものとし、購入者はコンテンツデータを閲覧する権限のみが許諾されるものとします。 |
Oops, something went wrong.