dypsloom-docu-trial

1.1.2 • Public • Published

THIS IS A TRIAL MODULE PLEASE DONT USE

Description

Takes a .md file and splits it up by its by sections in a directory tree.TO decide how the tree level gets created, the following syntax is needed ¿ H1 ¿¿ H2 ¿¿¿ H3 which are to be placed on top of the corresponding markdown headers

H1

H2

H3

The full .md file gets and gets transformed into a .pdf with standard header and content table, and output files are located inside the unpacked folder. This can be done for a single file using the 'dypsloom docu' command, or for a whole project with several md files use 'dypsloom-docu-start'. In addition, a watch can be set to a project, and spliting and reconversion will happen automatically.

Requirements

Machine

  • install npm menneu as global
  • python v ^2.8 with numpy library installed

Md files

Every .md file to be transformed need to contain

---
title: title of the file
date: yyyy-mm-dd
version: 0.0.0
---

The title will be the name will be the name of the folder where everythng is unpacked as well as will give the name to the outcomming pdf file.

Commands from command window

dypsloom-docu

Once the module is installed globally, the command dypsloon-docu can transform a single file.

--in    path of the '.md' file 
--out   path of the output folder with the syntax "/path/to/outfolder/"

if the --in argument is not defined an example .md will be unpacked. If the --out argument is not chosen, the current working folder chosen to unpack the example or the folder where the --in md file is located in case an specific file has been selected.

//general syntax
dypsloom-docu --in "path/to/file.md" --out "path/to/outfolder/"

//examples
dypsloom-docu
dypsloom-docu --in "C:\Users\isabe\Desktop\dyp\example2.md" --out "C:\Users\isabe\Desktop\dyp\hello\"
dypsloom-docu --in "./example2.md" --out "./hello/"
dypsloom-docu  --out "./hello/"

dypsloom-start-docu

Once the module is installed globally, the command dypsloon-start-docu can transform automatically all the md files within a project folder

--dir   path of the project folder with the md files "/path/to/projectfolder/" - required 
--out   path of the output folder with the syntax "/path/to/outfolder/"

By default, all files are automatically unpacked within the project directory where the .md files are, therefore --out argument is optional.

//general syntax
dypsloom-docu --dir "/path/to/projectfolder/" --out "path/to/outfolder/"

//examples 
    //to unpack current directory
dypsloom-start-docu --dir './' 
    // to unpack in a different folder
dypsloom-start-docu --dir './' --out './hello/'

dypsloom-docu-watch

Once the module is installed globally, the command dypsloon-docu-watch can create a watch on all .md files within the project folder. To exit watch press ctrl+C

--dir   path of the project folder with the md files "/path/to/projectfolder/"
--out   path of the output folder with the syntax "/path/to/outfolder/"

By default, all files are automatically unpacked within the project directory where the .md files are, therefore --out argument is optional.

//general syntax
dypsloom-docu --dir "/path/to/projectfolder/" --out "path/to/outfolder/"
//examples
dypsloom-docu-watch --dir './' --out './hello/'
    //to unpack current directory
dypsloom-docu-watch --dir './'

Current problem: this watch uses fs.watch, which depending on the machine can fire several times. Because of this reason it could give an error saying that the file already exists. This error shows at the second firing, meaning that the file is updated - please ignore.

Programatic version

//app.js

const dyp = require('dypsloom-docu');  
dyp.split_pdf_convert(pathI, pathOut);

Package Sidebar

Install

npm i dypsloom-docu-trial

Weekly Downloads

3

Version

1.1.2

License

MIT

Unpacked Size

1.17 MB

Total Files

21

Last publish

Collaborators

  • dypsloom
  • itsabell