5.0.0 • Published 1 year ago

opium v5.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year 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 year ago

4.2.3

2 years ago

4.2.2

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago