diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 00000000..d7645f76 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,15 @@ +### [`copyparty.bat`](copyparty.bat) +* launches copyparty with no arguments (anon read+write within same folder) +* intended for windows machines with no python.exe in PATH +* works on windows, linux and macos +* assumes `copyparty-sfx.py` was renamed to `copyparty.py` in the same folder as `copyparty.bat` + +### [`index.html`](index.html) +* drop-in redirect from an httpd to copyparty +* assumes the webserver and copyparty is running on the same server/IP +* modify `10.13.1.1` as necessary if you wish to support browsers without javascript + +# OS integration +init-scripts to start copyparty as a service +* [`systemd/copyparty.service`](systemd/copyparty.service) +* [`openrc/copyparty`](openrc/copyparty) diff --git a/contrib/copyparty.bat b/contrib/copyparty.bat new file mode 100644 index 00000000..919b80b2 --- /dev/null +++ b/contrib/copyparty.bat @@ -0,0 +1,33 @@ +exec python "$(dirname "$0")"/copyparty.py + +@rem on linux, the above will execute and the script will terminate +@rem on windows, the rest of this script will run + +@echo off +cls + +set py= +for /f %%i in ('where python 2^>nul') do ( + set "py=%%i" + goto c1 +) +:c1 + +if [%py%] == [] ( + for /f %%i in ('where /r "%localappdata%\programs\python" python 2^>nul') do ( + set "py=%%i" + goto c2 + ) +) +:c2 + +if [%py%] == [] set "py=c:\python27\python.exe" + +if not exist "%py%" ( + echo could not find python + echo( + pause + exit /b +) + +start cmd /c %py% "%~dp0\copyparty.py" diff --git a/contrib/index.html b/contrib/index.html new file mode 100644 index 00000000..7ad0b87b --- /dev/null +++ b/contrib/index.html @@ -0,0 +1,43 @@ + + + +
+ +