5.0.0 • Published 1 month ago

opium v5.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
1 month ago

Opium License NPM version

Unified file operations. Could be used to automate file operations on platforms powered by node.js.

Install

npm i opium

How to use?

import montag from 'montag';
import opium from 'opium';

const commands = opium(montag`
    put --type directory --path /tmp/hello/world/why/not
    put --type file --path /tmp/hello/tmp.js --format base64 --data aGVsbG8=
`);

commands.on('error', (error) => {
    console.error(error.message);
    commands.abort();
});

commands.on('progress', (count) => {
    console.log(count);
});

Example

drop --path /tmp/hello --files 1.txt,2.txt,3.txt
put --type file --format gzip --path /tmp/hello.txt --data "some data"
put --type directory --path /tmp/hello-dir
extract --from /tmp/hello.tar.gz --to /tmp/hello
pack --from /tmp/hello --to hello.tar.gz --files 1.txt,2.txt,3.txt
copy --from /tmp --to /tmp/2 --files 1.txt,2.txt,4.txt
move --from /tmp/1.txt --to /tmp/2.txt

License

MIT

5.0.0

1 month ago

4.2.3

7 months ago

4.2.2

7 months ago

4.1.0

7 months ago

4.0.0

7 months ago

4.2.1

7 months ago

4.2.0

7 months ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago