# dypsloom-docu-trial

> Splits an md file by sections and converts the full version to a pdf. It unpacks the whole files under one folder in the selected folder

Latest version **1.1.2** (published 2020-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install dypsloom-docu-trial
pnpm add dypsloom-docu-trial
yarn add dypsloom-docu-trial
bun add dypsloom-docu-trial
```

Provides the commands `dypsloom-docu`, `dypsloom-docu-watch`, `dypsloom-start-docu`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2020-07-03 |
| First published | 2020-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Isabel Medina |
| Maintainers | dypsloom, itsabell |
| Keywords | Dypsloom, Markdown, Documentation, PDF, Split |

## Links

- npm: https://www.npmjs.com/package/dypsloom-docu-trial
- npm.io page: https://npm.io/package/dypsloom-docu-trial

## Dependencies (5)

- [yargs](https://npm.io/package/yargs.md) ^15.3.1
- [menneu](https://npm.io/package/menneu.md) ^0.2.2
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.4
- [python-shell](https://npm.io/package/python-shell.md) ^2.0.1
- [@open-wc/webpack-import-meta-loader](https://npm.io/package/@open-wc/webpack-import-meta-loader.md) ^0.4.7

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2020-07-03
- 1.1.1 — 2020-07-03
- 1.1.0 — 2020-07-03
- 1.0.0 — 2020-06-11

## README

# 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);
```

---
_Source: https://npm.io/package/dypsloom-docu-trial · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
