compression, argparse

This commit is contained in:
dash
2017-05-29 13:00:51 +02:00
parent 23952703c5
commit b07dee4cfe
4 changed files with 233 additions and 260 deletions

View File

@@ -21,23 +21,55 @@ virtualenv .
source bin/activate
pip install -r requirements.txt
```
# Fork()
## Usage
pgpfs is simple to use. It is able to both `store` and `fetch` documents from
the keyserver. Here are examples of usage:
Patched pgpfs code from https://github.com/aestetix/pgpfs.
Has now:
### `store`
To store the file sample.mp3 and save the Key Allocation Table (kat) in
sample.kat, run:
```
python pgpfs.py store sample.mp3 sample.kat
```
This will create a file called sample.kat to be used when you want to retrieve
your file.
- argparse
- compression / decompression
### `fetch`
To fetch the file sample.mp3 from the keyserver, assuming the kat file is called
sample.kat, run:
```
python pgpfs.py fetch sample.kat sample.mp3
```
# TODO
- add threading
- add encryption
# TODO for someone with time and skills
- Building an vfs based on pgpfs, implementation ideas welcome :)
# USAGE
./pgpfs.py -h
usage: pgpfs.py [-h] -a ACTION [-k KAT] [-s STORE] [--keyserver KEYSERVER]
[--pgpfspath PGPFSPATH] [--gpgbinary PGPFSBIN]
https://github.com/aestetix/pgpfs
optional arguments:
-h, --help show this help message and exit
-a ACTION, --action ACTION
action to do: store or fetch
-k KAT, --katfile KAT
if fetch specify KAT file
-s STORE, --storefile STORE
if store specify file for upload
--keyserver KEYSERVER
specify keyserver
--pgpfspath PGPFSPATH
specify path for pgpfs
--gpgbinary PGPFSBIN specify path for pgpfs binary(patched gpg bin)
# Upload
./pgpfs.py -a store -s somefile.ext -k somefile.kat
# Download
./pgpfs.py -a store -s example.gif -k sample.kat
# NOTE
Please note that you need the gpg patched code from here:
https://github.com/aestetix/gpg
Compile and place somewhere. Adjust --gpgbinary accoringly.
Also you need to run an entropy source:
rndg -r /dev/urandom