zipstream
zipstream
A command line tool that allows you to easily share files and directories over the network
Installation
Snap-specific information
Due to the snap's confined nature, the application can only access files in the user's home directory.
To access files under /media
or /mnt
directories you have to manually connect the snap
to the removable-media
interface by running the following command in a terminal
sudo snap connect zipstream:removable-media
Build from source
Clone the repository:
git clone https://github.com/mamantoha/zipstream.git
Switch to repo-directory
cd zipstream
Build:
shards build
Copy ./bin/zipstream
to executable path.
Enjoy!
Usage
Help message:
NAME
zipstream - is a command line tool that allows you to easily share files and directories over the network
VERSION
0.9.1
SYNOPSIS
zipstream PATH [options]
If PATH is not specified it point to current directory
OPTIONS
-h, --help Show this message
-H HOST, --host=HOST Specifies the host (default: `0.0.0.0`)
-p PORT, --port=PORT Specifies the port (default: `8090`)
-f FORMAT, --format=FORMAT Specifies the format of output archive, zip, tar or tgz (default: `zip`)
-o FILENAME, --output=FILENAME Specifies the output file name without extension (default: `download`)
-e PATH, --endpoint=PATH Specifies the URL path to the resource (default: ``)
--user=user Specify the username user for file retrieval
--password=password Specify the password password for file retrieval
Sharing a directory (all the files in it):
$ zipstream -f tar /media/disk/music --user=admin --password=passwd -o music -e dl
_ _
(_) | |
_____ _ __ ___| |_ _ __ ___ __ _ _ __ ___
|_ / | '_ \/ __| __| '__/ _ \/ _` | '_ ` _ \
/ /| | |_) \__ \ |_| | | __/ (_| | | | | | |
/___|_| .__/|___/\__|_| \___|\__,_|_| |_| |_|
| |
|_|
Serving `/media/disk/music` as `music.tar`
To download the file please use one of the commands below:
wget --content-disposition --user admin --password passwd http://0.0.0.0:8090/dl
curl -OJ --user admin:passwd http://0.0.0.0:8090/dl
Or place all files into current folder:
wget -O- --user admin --password passwd http://0.0.0.0:8090/dl | tar -xvf -
curl --user admin:passwd http://0.0.0.0:8090/dl | tar -xvf -
Or just open in browser: http://0.0.0.0:8090/dl
Contributing
- Fork it (https://github.com/mamantoha/zipstream/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Anton Maminov - creator and maintainer