# svmconv

> Node.js converter plugin for StarView Metafiles

Latest version **0.0.5** (published 2015-03-18) · MIT license · 0 weekly downloads

## Install

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

## 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.5 |
| Published | 2015-03-18 |
| First published | 2015-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Serge Glazun |
| Maintainers | tagrim |
| Keywords | svm, starview, metafile, openoffice, libreoffice, svmconv |

## Links

- npm: https://www.npmjs.com/package/svmconv
- Repository: https://github.com/Infostroy/svmconv
- Issues: https://github.com/Infostroy/svmconv/issues
- npm.io page: https://npm.io/package/svmconv

## Dependencies (2)

- [fs](https://npm.io/package/fs.md) ~0.0.2
- [canvas](https://npm.io/package/canvas.md) ^1.2.1

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2015-03-18
- 0.0.4 — 2015-02-27
- 0.0.3 — 2015-02-26
- 0.0.2 — 2015-02-25

## README

# StarView Metafile converter

## Installation

	npm install svmconv

## Important information

SVM file contains plots rendered into BITMAP file w/o alpha channel.
This causes that the resulting file placed onto canvas with black background.
To fix this - **all points that have color rgb(0, 0, 0) are changed to rgb(255, 255, 255)**.

Please note this when converting svm.

## Usage

```js
var Parser = require('svmconv')
  , fs     = require('fs');

fs.open('Source.svm', 'r', function(err, fd) {
    fs.fstat(fd, function(err, stats) {
        var bufferSize = stats.size,
            chunkSize  = 512,
            buffer     = new Buffer(bufferSize),
            bytesRead  = 0;

        while (bytesRead < bufferSize) {
            if ((bytesRead + chunkSize) > bufferSize) {
                chunkSize = (bufferSize - bytesRead);
            }
            fs.read(fd, buffer, bytesRead, chunkSize, bytesRead);
            bytesRead += chunkSize;
        }

        var parser = new Parser();
        parser.parse(buffer, 'Source.svm', true);
        fs.close(fd);
    });
});
```

or

```js
...
    // set 'render to file' flag as false
    parser.parse(buffer, 'Source.svm', false);
...
```

## License 

The MIT License (MIT)

Copyright (c) 2015, Infostroy Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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