Skip to content

Commit 32b99d9

Browse files
committed
markdown to pdf
1 parent c389402 commit 32b99d9

File tree

8 files changed

+6410
-1356
lines changed

8 files changed

+6410
-1356
lines changed

dist/all.md

Lines changed: 1762 additions & 0 deletions
Large diffs are not rendered by default.

gulpfile.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
'use strict';
2+
3+
// 필요한 모듈선언
4+
const gulp = require('gulp');
5+
const concat = require('gulp-concat');
6+
const replace = require('gulp-replace');
7+
8+
/**
9+
* watch
10+
*/
11+
gulp.task('concat-md', function() {
12+
var mdDocs = [
13+
'website/translated_docs/ko/0101-install-uninstall.md',
14+
'website/translated_docs/ko/0102-run-query.md',
15+
'website/translated_docs/ko/0103-create-query.md',
16+
'website/translated_docs/ko/0104-edit-data.md',
17+
'website/translated_docs/ko/0105-wizard.md',
18+
'website/translated_docs/ko/0201-manage-new-connections.md',
19+
'website/translated_docs/ko/0202-using-editor.md',
20+
'website/translated_docs/ko/0203-using-editor-advanced.md',
21+
'website/translated_docs/ko/0204-dbms-output.md',
22+
'website/translated_docs/ko/0204-run-sql-execution-plan.md',
23+
'website/translated_docs/ko/0205-procedure-compile.md',
24+
'website/translated_docs/ko/0206-export-import-data.md',
25+
'website/translated_docs/ko/0207-using-query-builder.md',
26+
'website/translated_docs/ko/0208-work-on-data-grid.md',
27+
'website/translated_docs/ko/0209-work-on-object-explorer.md',
28+
'website/translated_docs/ko/0210-functions-of-create.md',
29+
'website/translated_docs/ko/0211-create-report.md',
30+
'website/translated_docs/ko/0212-use-er-design.md',
31+
'website/translated_docs/ko/0213-functions-of-administrators.md',
32+
'website/translated_docs/ko/9901-set-options.md',
33+
'website/translated_docs/ko/9902-shortcut-keys.md',
34+
];
35+
gulp
36+
.src(mdDocs)
37+
.pipe(replace(/^---.+---/ms, ''))
38+
.pipe(concat('all.md'))
39+
.pipe(gulp.dest('./dist/'));
40+
});
41+
42+
// 걸프 기본 타스크
43+
gulp.task('default', ['concat-md'], function() {
44+
return true;
45+
});

make-pdf.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var markdownpdf = require('markdown-pdf');
2+
var mdDocs = ['dist/all.md'],
3+
bookPath = 'book.pdf';
4+
5+
process.env.FLAG = '0';
6+
var options = {
7+
paperFormat: 'A4',
8+
cssPath: 'pdf.css',
9+
remarkable: {
10+
html: true,
11+
breaks: true,
12+
plugins: [require('remarkable-classy')],
13+
syntax: ['footnote', 'sup', 'sub', 'table'],
14+
},
15+
};
16+
markdownpdf(options)
17+
.concat.from(mdDocs)
18+
.to(bookPath, function() {
19+
console.log('Created', bookPath);
20+
});

0 commit comments

Comments
 (0)