docogen

0.1.6 • Public • Published

docoGen

npm version npm downloads

A document generation tool within your masterpiece.

docoGen

  • The coverage :
    • Convert to Latex pdf (latest support, work in progress)
    • Convert to Markdown pdf (deprecate currently)
    • Convert to html (latest support, work in progress)
      • please import package: docoGen-webui
      • currently need to clone the source code to use

See More in Wiki

  • Contain the latest support and usage explanation.

Prerequisite

  • Dependencies of node-latex-pdf. (need to install MiKTeX to generate LaTeX document)
    • You can use install_dep.sh or install_dep.bat to install dependencies
  • Using the file extension which named .docogen, and just store json format in it.
    • these files treated as configuration dependency to your generated result.
    • More information (Still working on it, see test/script/ to see current support)
  • New feature: support markdown format!
    • After version 0.1.0, you can now edit .md to writing docoGen!
    • System will transform markdown to docoGen format.
    • See the example in test/md_script/example.md
    • More detail information will be append on docoGen wiki.
  • Within docogen running, MikTex will asked you to install multiple required package with docogen.
    • It will takes minutes to complete the packages dependency installation.
    • For Window user, if you install MikTeX with option each install will be notified, then the first setup will pop out several windows to ask for permission. This is the docoGen format dependencies, It's safety to let it installed.

Usage

For Developer

  • Git clone with submodule
    • It will clone the example scripts
git clone --recursive https://github.com/toolbuddy/docoGen.git

For User

  • Install
npm install docogen --save
  • Install dependencies (after install docoGen package)

    • The install scripts are under docoGen package.
    • Window user
    $ ./node_modules/docogen/install_dep.bat
    
    • Linux User
    $ bash ./node_modules/docogen/install_dep.sh
    
  • Example: Generate LaTeX pdf from docoGen script

    • src_path: the source path to your project root, and it will get all docogen files.
    • dest_path: the destination directory to store those generated pdf.
    • options: the user-defined go here. (JSON object format)
      • output: specify the output pdf filename.
const docogen = require('docogen');
 
// convert docogen to latex (pdf format), with absolute path
docogen.generate_latexpdf( src_path , dest_path , options ,(err,msg)=>{
    console.log(msg);
});
  • See all current support method in test/! Enjoy!

Some practical usage

  • Example - project usage
    • using doc.js as entry to take advantage of docoGen
    • then generate the pdf from scripts under script/.

Join us

Slack Status

Author

Package Sidebar

Install

npm i docogen

Weekly Downloads

3

Version

0.1.6

License

GPL-3.0

Unpacked Size

137 kB

Total Files

11

Last publish

Collaborators

  • kevinbird61