Skip to content

Convert all source code to one markdown file, useful to print and read.

Notifications You must be signed in to change notification settings

leafOfTree/source2one

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soure2one

将源代码整合到一个 markdown 文件,方便打印和阅读。

Convert all source code to one markdown file, useful to print and read.

Usage

// generate files in folder "src" to "src.source.md", ignore __test__
source2one src -i __test__

Install

npm install source2one -g

Options

-i: ignore files, seprated by ,

source2one src -i *.md,__test__

-h, --help: show help info

To html/pdf

pandoc: markdown to html

wkhtmltopdf: html to pdf

Example

test/core/core.js:

core content

test/plugin/plugin.js:

plugin content
plugin content2

After running source2one test, output test.source.md:

# test
generated at 2018-5-14 12:48:17

## TOC

⃞ test/core/core.js (lines: 1)

⃞ test/plugins/plugin.js (lines: 2)

## Content

test/core/core.js (lines: 1)
```
core content
```

test/plugins/plugin.js (lines: 2)
```
plugin content
plugin content2
```

About

Convert all source code to one markdown file, useful to print and read.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published