Skip to content

Commit

Permalink
Updated to v0.7.4
Browse files Browse the repository at this point in the history
Updated to v0.7.4
  • Loading branch information
RaSan147 authored Apr 22, 2023
2 parents 24800e7 + b443a5a commit c18462f
Show file tree
Hide file tree
Showing 23 changed files with 3,807 additions and 3,179 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Version 0.7.4
## Client-side Changes:
* Updated Error page (with http.cat 😸)
## Server-side Changes:
* Server.py file is now separated into multiple files
* `fs_utils.py` : File system utils
* `server.py` : Server
* `exceptions.py` : Exceptions
* `arg_parser.py` : New Argument parser
* `page_templates.py` : Page templates
* `zipfly_local.py` : Zipfly local version
* Added `--no-upload` and lots of other flags
## Fixes:
* Fixed showing wrong port number
## TODO:
* On flags, remove some right click options




# Version 0.7.1 - 0.7.3
## Client-side Changes:
* Nothing to notice
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,38 @@ CHECK [FAQ](#faq) FOR FUTURE HELP AND ISSUE FIX
- `pyrobox` to launch the server with default password (SECret)
- ii) just edit the code for permanent change (see `config` class at top)

1. Optional configurations

usage: `local_server_pyrobox.py [--password PASSWORD] [--no-upload] [--no-zip] [--no-update] [--no-delete] [--no-download] [--read-only] [--view-only] [--bind ADDRESS] [--directory DIRECTORY] [--version] [-h] [port]`

# positional arguments:
| arg value | Description |
| --------------------- | ------------|
| `port` | Specify alternate port [default: 6969] |


# options:
| arg `value` | Description |
| --------------------- | ------------|
|--password `PASSWORD`, -k `PASSWORD` | Upload Password (default: SECret)|
|--directory `DIRECTORY`, -d `DIRECTORY` | Specify alternative directory [default: current directory]
|--bind `ADDRESS`, -b `ADDRESS` | Specify alternate bind address [default: all interfaces]|


# Customisation options:
| arg | Description |
| -------------------- | ------------|
|--no-upload, -nu | Files can't be uploaded (default: False)|
|--no-zip, -nz | Disable Folder->Zip downloading (default: False)|
|--no-update, -no | Disable File Updating (ie: **renaming**, **overwriting existing files**) (On upload, if file exists, will add a number at the end(default: False)|
|--no-delete, -nd | Disable File Deletion (default: False)|
|--no-download, -ndw | Disable File Downloading [**videos won't play either**] (default: False)|
|--read-only, -ro | Read Only Mode *disables upload and any modifications ie: rename, delete* (default: False)|
|--view-only, -vo | Only allowed to see file list, nothing else (default: False)|
--version, -v | show program's version number and exit|
-h, --help | show this help message and exit|


TODO:
--------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.3
0.7.4
52 changes: 52 additions & 0 deletions dev_src/arg_parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# add additional arguments to the parser

# the config must be imported from pyroboxCore
# from pyroboxCore import config

def main(config):
config.parser.add_argument('--password', '-k',
default=config.PASSWORD,
type=str,
help='Upload Password (default: %(default)s)')

config.parser.add_argument('--no-upload', '-nu',
action='store_true',
default=False,
help="Files can't be uploaded (default: %(default)s)")

config.parser.add_argument('--no-zip', '-nz',
action='store_true',
default=False,
help="Disable Folder->Zip downloading (default: %(default)s)")

config.parser.add_argument('--no-update', '-no',
action='store_true',
default=False,
help="Disable File Updating (ie: renaming, overwriting existing files) (On upload, if file exists, will add a number at the end(default: %(default)s)")

config.parser.add_argument('--no-delete', '-nd',
action='store_true',
default=False,
help="Disable File Deletion (default: %(default)s)")

config.parser.add_argument('--no-download', '-ndw',
action='store_true',
default=False,
help="Disable File Downloading [videos won't play either] (default: %(default)s)")

config.parser.add_argument('--read-only', '-ro',
action='store_true',
default=False,
help='Read Only Mode *disables upload and any modifications ie: rename, delete* (default: %(default)s)')

config.parser.add_argument('--view-only', '-vo',
action='store_true',
default=False,
help="Only allowed to see file list, nothing else (default: %(default)s)")


# config.parser.add_argument('--no-js', '-nj',
# action='store_true',
# default=False,
# help="Disable Javascript in page(default: %(default)s)")

4 changes: 4 additions & 0 deletions dev_src/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

class LimitExceed(Exception):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Loading

0 comments on commit c18462f

Please sign in to comment.