Skip to content

Commit

Permalink
Merge branch 'PWA'
Browse files Browse the repository at this point in the history
  • Loading branch information
RaSan147 committed Nov 20, 2023
2 parents 40a6d3b + 8e4cc7d commit 5b44aa6
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@

* File Hosting system (Serve files from local Storage system)
* Access Shared File System from Multiple Devices
* Has optional account system (Admin can add users or allow signup) (Check ***Advanced Account System*** section)
* Set Server Permission (Check ***Customization Options*** section)

## Extra FEATURES

* 🔽 DOWNLOAD AND VIDEO STREAM WITH **PAUSE AND RESUME**
* 🔼 UPLOAD WITH **PASSWORD**
* 🔼 UPLOAD WITH **PASSWORD** (User password or server-wide password)
* 👌 HTML5 drag and drop uploader
* 📈 MULTIPLE FILE **UPLOAD**
* 📝 RENAME
* 📁 FOLDER DOWNLOAD as **ZIP** (uses temp folder)
* ⏯ VIDEO PLAYER
*Built-in VIDEO PLAYER
* 🔁 **DELETE FILE** (MOVE TO RECYCLE BIN)
* 🔥 PERMANENTLY DELETE
*`File manager` like `NAVIGATION BAR`
Expand All @@ -39,12 +41,13 @@
* 🌐 (Didn't test yet) If you are using REAL IP AND ALLOW PYTHON TO USE PUBLIC NETWORK, YOUR SERVER CAN BE VISIBLE AROUND THE GLOBE. (also vulnerable, since you can't control access *yet*)
* 🧬 Clone entire directory from Host to Client with least changes (last modified preserved)
* 🔜 More comming soon
* All of these without the need of any internet connection (having connection will provide better experience)

## Server side requirement

* Python 3.7 or higher. Older support available.[^1]
* Basic knowledge about Python
* `send2trash`, `natsort` pip package (if missing, will be auto installed when the code runs)
* `send2trash`, `natsort` python modules

[^1]: [<=3.4 compatibility] is on the way.

Expand Down Expand Up @@ -107,13 +110,14 @@ usage: `local_server_pyrobox.py [--password PASSWORD] [--no-upload] [--no-zip] [

## Options

| arg `value` | Description |
| Flags/Arg `value` | Description |
| --------------------- | ------------|
|--password `PASSWORD`, -k `PASSWORD` | Upload Password (GUESTS users and Nameless server users must use it to upload files)(default: SECret)|
|--directory `DIRECTORY`, -d `DIRECTORY` | Specify alternative directory [default: current directory]
|--bind `ADDRESS`, -b `ADDRESS` | Specify alternate bind address [default: all interfaces]|
|--version, -v | show program's version number and exit|
|-h, --help | show this help message and exit|
|--no-extra-log | Disable file path and [= + - #] based logs (default: False)|

## Customization Options

Expand All @@ -137,6 +141,14 @@ usage: `local_server_pyrobox.py [--password PASSWORD] [--no-upload] [--no-zip] [
|--admin-id `ADMIN_ID`, -aid `ADMIN_ID` | Admin ID (default: None)|
|--admin-pass `ADMIN_PASS`, -ak `ADMIN_PASS` | Admin Password (default: None)|
|--no-signup, -ns | Disable Signing up (Only admin can add user from admin page)(default: False)|
|--no-guest-allowed, -ng | Disable Guest Access (default: False)|

## Account Example

1. `pyrobox -n "My Server1" -aid "admin" -ak "admin123" -k "Guest_pass"` # will allow anyone to access the server, but they must use `Guest_pass` to upload files
1. `pyrobox -n "My Server2" -aid "admin" -ak "admin123" -ng` # If someone wants to access the server they must sign up via signup page first. No guest allowed
1. `pyrobox -n "My Server3" -aid "admin" -ak "admin123" -ng -ns` # Only admin can access the server. No guest allowed, no signup allowed. Admin can add user from admin page


## TODO

Expand All @@ -145,7 +157,6 @@ usage: `local_server_pyrobox.py [--password PASSWORD] [--no-upload] [--no-zip] [
* https://github.com/RaSan147/pyrobox/issues/36 Add side bar to do something 🤔
* check output ip and port accuracy on multiple os
* https://github.com/RaSan147/pyrobox/issues/37 Backup code if Reload causes unhandled issue and can't be accessed
* https://github.com/RaSan147/pyrobox/issues/39 User login and user based permission set. 🔑
* Add more flags to disable specific features

## Support for more features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.2
4 changes: 2 additions & 2 deletions dev_src/pyroboxCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import atexit
import os

__version__ = "0.9.0"
__version__ = "0.9.2"
enc = "utf-8"
__all__ = [
"HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler",
Expand Down Expand Up @@ -185,7 +185,7 @@ def parse_default_args(self, port=0, directory="", bind=None):
help=('[Option] show this help message and exit'))


parser.add_argument('-nxl','--no-extra-log',
parser.add_argument('--no-extra-log',
action='store_true',
default=False,
help="[Flag] Disable file path and [= + - #] based logs (default: %(default)s)")
Expand Down
1 change: 0 additions & 1 deletion dev_src/script_global.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ class Tools {
enable_debug() {
const that = this;
if (!config.allow_Debugging) {
alert("Debugging is not allowed");
return;
}
if (config.Debugging) {
Expand Down
6 changes: 3 additions & 3 deletions run_setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os, shutil

# clear dist folder
# shutil.rmtree("dist", ignore_errors=True)
shutil.rmtree("dist", ignore_errors=True)

# os.system("python -m build")
os.system("python -m build")

with open('VERSION', 'r') as f:
version = f.read().strip()
Expand All @@ -13,4 +13,4 @@
# os.system("pyrobox 45454")

# post to pypi
# os.system("twine upload dist/*")
os.system("twine upload dist/*")
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyrobox
version = 0.9.0
version = 0.9.2
author = Rasan
author_email= [email protected]
description = Personal DropBox for Private Network
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
install_requires=[
'natsort',
"send2trash",
"msgpack"
],
entry_points='''
[console_scripts]
Expand Down
1 change: 0 additions & 1 deletion src/_page_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,6 @@ class Tools {
enable_debug() {
const that = this;
if (!config.allow_Debugging) {
alert("Debugging is not allowed");
return;
}
if (config.Debugging) {
Expand Down
4 changes: 2 additions & 2 deletions src/pyroboxCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import atexit
import os

__version__ = "0.9.0"
__version__ = "0.9.2"
enc = "utf-8"
DEV_MODE = False

Expand Down Expand Up @@ -188,7 +188,7 @@ def parse_default_args(self, port=0, directory="", bind=None):
help=('[Option] show this help message and exit'))


parser.add_argument('-nxl','--no-extra-log',
parser.add_argument('--no-extra-log',
action='store_true',
default=False,
help="[Flag] Disable file path and [= + - #] based logs (default: %(default)s)")
Expand Down

0 comments on commit 5b44aa6

Please sign in to comment.