# siwake

> siwake ======

Latest version **0.1.4** (published 2017-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install siwake
pnpm add siwake
yarn add siwake
bun add siwake
```

## 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.1.4 |
| Published | 2017-06-10 |
| First published | 2017-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | eiurur |
| Maintainers | eiurur |

## Links

- npm: https://www.npmjs.com/package/siwake
- Repository: https://github.com/eiurur/siwake
- Homepage: https://github.com/eiurur/siwake#readme
- Issues: https://github.com/eiurur/siwake/issues
- npm.io page: https://npm.io/package/siwake

## Dependencies (3)

- [fs-promise](https://npm.io/package/fs-promise.md) ^2.0.2
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.23.0
- [mkdirp-promise](https://npm.io/package/mkdirp-promise.md) ^5.0.1

## Recent versions

- 0.1.4 (latest) — 2017-06-10
- 0.1.3 — 2017-05-17
- 0.1.2 — 2017-05-06
- 0.1.1 — 2017-05-05
- 0.1.0 — 2017-05-04

## README

siwake
======

[![Build Status](https://travis-ci.org/eiurur/siwake.svg?branch=master)](https://travis-ci.org/eiurur/siwake)
[![bitHound Overall Score](https://www.bithound.io/github/eiurur/siwake/badges/score.svg)](https://www.bithound.io/github/eiurur/siwake)
[![bitHound Dependencies](https://www.bithound.io/github/eiurur/siwake/badges/dependencies.svg)](https://www.bithound.io/github/eiurur/siwake/master/dependencies/npm)
[![bitHound Dev Dependencies](https://www.bithound.io/github/eiurur/siwake/badges/devDependencies.svg)](https://www.bithound.io/github/eiurur/siwake/master/dependencies/npm)

# Usage

### intall

    npm i siwake -S

### Basic

    const {Siwake} = require('siwake');

    (async () => {

        const siwake = new Siwake('/path/to/output_file.txt'); 

        const dataset = [
        {
            file: '/path/to/chiya/sample.jpg',
            label: '0',
        },
        {
            directory: '/path/to/cocoa',
            label: '1',
        },
        {
            directory: '/path/to/rize',
            label: '2',
        },
        {
            directory: '/path/to/syaro',
            label: '3',
        },
        ];

        await siwake.load(dataset);

        await siwake.write(); 
        // or await siwake.write('/path/to/other_output_file.txt');

    })();

**output**

    /path/to/chiya/smplae.jpg 0 
    /path/to/rize/tumblr_o58h70edb71rri82to1_1280.jpg 2 
    /path/to/rize/tumblr_okod7d5hxa1r92e4to1_1280.jpg 2 
    /path/to/syaro/57916490_p0.jpg 3 
    /path/to/syaro/tumblr_o7f9axqwFU1qanay4o1_1280.jpg 3 
    /path/to/syaro/tumblr_oibndwVrxQ1uo8t89o1_1280.jpg 3 

### Change separator

    const {Siwake} = require('siwake');

    (async () => {

        const siwake = new Siwake('/path/to/output_file.csv', ','); 

        const dataset = [
        {
            file: '/path/to/chiya/sample.jpg',
            label: '0',
        },
        {
            directory: '/path/to/cocoa',
            label: '1',
        },
        {
            directory: '/path/to/rize',
            label: '2',
        },
        {
            directory: '/path/to/syaro',
            label: '3',
        },
        ];

        await siwake.load(dataset);

        await siwake.write(); 
        // or await siwake.write('/path/to/other_output_file.csv');

    })();

**output**

    /path/to/chiya/smplae.jpg,0 
    /path/to/rize/tumblr_o58h70edb71rri82to1_1280.jpg,2 
    /path/to/rize/tumblr_okod7d5hxa1r92e4to1_1280.jpg,2 
    /path/to/syaro/57916490_p0.jpg,3 
    /path/to/syaro/tumblr_o7f9axqwFU1qanay4o1_1280.jpg,3 
    /path/to/syaro/tumblr_oibndwVrxQ1uo8t89o1_1280.jpg,3 


# Setup

    git clone https://github.com/eiurur/siwake.git
    cd siwake
    npm install

# Development

### Watch

    npm run dev

### Test

    npm test

# License

[MIT](https://github.com/eiurur/siwake/raw/master/LICENSE)

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