# fill-territory-record-pdf

> CLI for fill territory record form pdf from a csv

Latest version **0.0.2** (published 2022-12-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install fill-territory-record-pdf
pnpm add fill-territory-record-pdf
yarn add fill-territory-record-pdf
bun add fill-territory-record-pdf
```

Provides the command `fill-territory-record-pdf`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-12-08 |
| First published | 2022-12-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.2.1 |
| Dependencies | 2 |
| Unpacked size | 58.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Giorgio De la Barrera |
| Maintainers | giodelabarrera |

## Links

- npm: https://www.npmjs.com/package/fill-territory-record-pdf
- Repository: https://github.com/giodelabarrera/fill-territory-record-pdf
- Homepage: https://github.com/giodelabarrera/fill-territory-record-pdf#readme
- Issues: https://github.com/giodelabarrera/fill-territory-record-pdf/issues
- npm.io page: https://npm.io/package/fill-territory-record-pdf

## Dependencies (2)

- [pdf-lib](https://npm.io/package/pdf-lib.md) ^1.17.1
- [@fast-csv/parse](https://npm.io/package/@fast-csv/parse.md) ^4.3.6

## Recent versions

- 0.0.2 (latest) — 2022-12-08
- 0.0.1 — 2022-12-04

## README

<div align="center">
<h1>fill-territory-record-pdf 🗂</h1>

<p>CLI for fill territory record form pdf</p>
</div>

---

## Usage

```bash
npx fill-territory-record-pdf [CSVFILE] [FROM_TERRITORY]
```

### Arguments

`CSVFILE`

- type: `String`

Territory record CSV file to read and fill pdf

```bash
# Run command and read csv from home
npx fill-territory-record-pdf ~/territory-record.csv

# Run command and read csv from current dir
npx fill-territory-record-pdf my-record.csv

# Run command and read csv from your custom path
npx fill-territory-record-pdf /my/custom/path/record.csv
```

##### CSV structure

**Fields**

| field name    | type     | required       | description           |
| ------------- | -------- | -------------- | --------------------- |
| `territory`   | `Number` | `required`     | Territory number      |
| `publisher`   | `String` | `required`     | Publisher name        |
| `started_at`  | `Date`   | `required`     | Start date of record  |
| `finished_at` | `Date`   | `not required` | Finish date of record |

**Example**

| **territory** | **publisher**   | **started_at** | **finished_at** |
| ------------- | --------------- | -------------- | --------------- |
| 1             | Dennis Schulist | 2018-10-11     | 2019-06-02      |
| 2             | Kurtis Weissnat | 2019-10-17     |                 |

`FROM_TERRITORY`

- type: `Number`

Number of territory number to consider in CSV file and fill pdf

```bash
# Run command and consider territory record from number 1
npx fill-territory-record-pdf [CSV_FILE] 1

# Run command and consider territory record from number 11
npx fill-territory-record-pdf [CSV_FILE] 11
```

### Flags

`--outDir`

- default: `process.cwd()` current folder of command is executed
- type: `String`

Specify an output folder for filled territory record pdf

```bash
# Run command and specify downloads folder as output for pdf
npx fill-territory-record-pdf [CSV_FILE] [FROM_TERRITORY] --outDir '~/Downloads'

# Run command and specify folder as output for pdf
npx fill-territory-record-pdf [CSV_FILE] [FROM_TERRITORY] --outDir './2022-31-08'
```

---
_Source: https://npm.io/package/fill-territory-record-pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
