Metadata-Version: 2.1
Name: simpleshare
Version: 1.3
Summary: A local file sharing utility written in Python. Uses         multicast UDP to share the list of files, and TCP to transfer the             files themselves.
Home-page: https://github.com/ssebs/simpleshare
Author: Sebastian Safari
Author-email: contact@ssebs.com
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
Requires-Dist: pyttk

# simpleshare
A local file sharing utility written in Python. Uses multicast UDP to share the list of files, and TCP to transfer the files themselves.

## Installation:
- Source:
  - Install Python 3
  - ```
    $ git clone https://github.com/ssebs/simpleshare
    $ cd simpleshare/
    $ python -m venv venv
    ```
  - Linux: 
    - `$ source ./venv/bin/activate`
  - Windows: 
    - `> .\venv\Scripts\activate`
  - ```
    (venv) $ pip install -r requirements.txt
    ```
- Binary:
  - Download a binary for your platform in the [releases page](https://github.com/ssebs/simpleshare/releases).

- PyPI:
  - `$ pip install simpleshare`
  - `$ simpleshare`

## Usage:
- CLI
  ```
  usage: simpleshare.py [-h] [--type {client,server}] [--ip IP] [FILENAME]

  Local file sharing utility. Can be used as server and as a client. Run this
  without any arguments to run GUI.

  positional arguments:
    FILENAME              Name of the file you want to share, if running as the
                          server.

  optional arguments:
    -h, --help            show this help message and exit
    --type {client,server}
                          Type, how do you want to use this tool
    --ip IP               IP address, only used if you're the server
  ```
- GUI
  - Double click the exe / binary.

## Building
- Linux:
  - `$ make`
- Windows:
  - `> .\Makefile.bat`
- `(venv) $ pyinstaller simpleshare/__main__.py --clean -F -n simpleshare`

## Screenshots
### Home
![home](img/home.png)

### Upload
![upload](img/upload.png)

### Download
![download](img/download.png)

## TODO:
- [x] Structure program
  - [x] 3 connections
    - [x] Server: Share filename (Multicast)
    - [x] Client: Reply to server saying that you want the file (UDP)
    - [x] Server: Send file to client (TCP)
  - [x] CLI
  - [x] GUI
- Server
  - [x] "Broadcast" (multicast) that you're sharing "x" file
  - [x] Have server send files if requested to IP found.
  - [x] CLI
  - [x] GUI
    - [ ] DnD
    - [x] Custom timout
- Client
  - [x] Listen to see if anyone is sharing files
  - [x] List available files
  - [x] Download files to specified file name/path
  - [x] CLI
  - [x] GUI
- [x] Make this work with 1 file, 1 client
- [ ] Make this work with 1 file, 2 clients
- [ ] Make this work with 2 files (2 servers), 1 client
- [ ] Make this work with 2 files (2 servers), 2 client
- [x] Binary output (.exe, .app, etc.)
  - [ ] Icon support
- [ ] Refactor + document
- [ ] Unit Tests

## Bugs:
- [ ] Threads won't stop properly
- [ ] Can't have 2 clients
- [ ] Can't have 2 servers
- GUI 
  - [ ] Styling
  - [x] Only Choose IP if more than 1 available
  - [ ] Share Thread issues

## License
[MIT](./LICENSE) &copy; 2019 Sebastian Safari


