copyparty 1.7.1__tar.gz → 1.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. {copyparty-1.7.1 → copyparty-1.7.2}/PKG-INFO +28 -4
  2. {copyparty-1.7.1 → copyparty-1.7.2}/README.md +27 -3
  3. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/__version__.py +2 -2
  4. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/authsrv.py +9 -0
  5. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/httpcli.py +1 -1
  6. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/up2k.py +1 -1
  7. copyparty-1.7.2/copyparty/web/browser.js.gz +0 -0
  8. copyparty-1.7.2/copyparty/web/up2k.js.gz +0 -0
  9. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/PKG-INFO +28 -4
  10. copyparty-1.7.1/copyparty/web/browser.js.gz +0 -0
  11. copyparty-1.7.1/copyparty/web/up2k.js.gz +0 -0
  12. {copyparty-1.7.1 → copyparty-1.7.2}/LICENSE +0 -0
  13. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/__init__.py +0 -0
  14. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/__main__.py +0 -0
  15. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/bos/__init__.py +0 -0
  16. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/bos/bos.py +0 -0
  17. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/bos/path.py +0 -0
  18. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/broker_mp.py +0 -0
  19. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/broker_mpw.py +0 -0
  20. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/broker_thr.py +0 -0
  21. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/broker_util.py +0 -0
  22. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/cfg.py +0 -0
  23. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/dxml.py +0 -0
  24. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/fsutil.py +0 -0
  25. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/ftpd.py +0 -0
  26. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/httpconn.py +0 -0
  27. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/httpsrv.py +0 -0
  28. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/ico.py +0 -0
  29. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/mdns.py +0 -0
  30. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/mtag.py +0 -0
  31. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/multicast.py +0 -0
  32. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/res/COPYING.txt +0 -0
  33. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/res/__init__.py +0 -0
  34. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/res/insecure.pem +0 -0
  35. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/smbd.py +0 -0
  36. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/ssdp.py +0 -0
  37. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/star.py +0 -0
  38. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/__init__.py +0 -0
  39. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/__init__.py +0 -0
  40. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/bimap.py +0 -0
  41. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/bit.py +0 -0
  42. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/buffer.py +0 -0
  43. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/dns.py +0 -0
  44. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/label.py +0 -0
  45. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/lex.py +0 -0
  46. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/dnslib/ranges.py +0 -0
  47. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/ifaddr/__init__.py +0 -0
  48. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/ifaddr/_posix.py +0 -0
  49. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/ifaddr/_shared.py +0 -0
  50. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/ifaddr/_win32.py +0 -0
  51. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/qrcodegen.py +0 -0
  52. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/stolen/surrogateescape.py +0 -0
  53. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/sutil.py +0 -0
  54. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/svchub.py +0 -0
  55. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/szip.py +0 -0
  56. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/tcpsrv.py +0 -0
  57. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/th_cli.py +0 -0
  58. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/th_srv.py +0 -0
  59. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/u2idx.py +0 -0
  60. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/util.py +0 -0
  61. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/a/__init__.py +0 -0
  62. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/a/partyfuse.py +0 -0
  63. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/a/u2c.py +0 -0
  64. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/a/webdav-cfg.bat +0 -0
  65. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/baguettebox.js.gz +0 -0
  66. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/browser.css.gz +0 -0
  67. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/browser.html +0 -0
  68. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/browser2.html +0 -0
  69. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/cf.html +0 -0
  70. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dbg-audio.js.gz +0 -0
  71. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dd/2.png +0 -0
  72. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dd/3.png +0 -0
  73. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dd/4.png +0 -0
  74. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dd/5.png +0 -0
  75. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/dd/__init__.py +0 -0
  76. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/__init__.py +0 -0
  77. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/easymde.css.gz +0 -0
  78. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/easymde.js.gz +0 -0
  79. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/marked.js.gz +0 -0
  80. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/mini-fa.css.gz +0 -0
  81. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/mini-fa.woff +0 -0
  82. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/prism.css.gz +0 -0
  83. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/prism.js.gz +0 -0
  84. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/prismd.css.gz +0 -0
  85. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/scp.woff2 +0 -0
  86. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/sha512.ac.js.gz +0 -0
  87. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/deps/sha512.hw.js.gz +0 -0
  88. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/md.css.gz +0 -0
  89. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/md.html +0 -0
  90. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/md.js.gz +0 -0
  91. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/md2.css.gz +0 -0
  92. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/md2.js.gz +0 -0
  93. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/mde.css.gz +0 -0
  94. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/mde.html +0 -0
  95. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/mde.js.gz +0 -0
  96. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/msg.css.gz +0 -0
  97. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/msg.html +0 -0
  98. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/splash.css.gz +0 -0
  99. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/splash.html +0 -0
  100. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/splash.js.gz +0 -0
  101. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/svcs.html +0 -0
  102. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/svcs.js.gz +0 -0
  103. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/ui.css.gz +0 -0
  104. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/util.js.gz +0 -0
  105. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty/web/w.hash.js.gz +0 -0
  106. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/SOURCES.txt +0 -0
  107. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/dependency_links.txt +0 -0
  108. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/entry_points.txt +0 -0
  109. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/requires.txt +0 -0
  110. {copyparty-1.7.1 → copyparty-1.7.2}/copyparty.egg-info/top_level.txt +0 -0
  111. {copyparty-1.7.1 → copyparty-1.7.2}/pyproject.toml +0 -0
  112. {copyparty-1.7.1 → copyparty-1.7.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: copyparty
3
- Version: 1.7.1
3
+ Version: 1.7.2
4
4
  Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
5
5
  Author-email: ed <copyparty@ocv.me>
6
6
  License: MIT
@@ -168,7 +168,7 @@ enable thumbnails (images/audio/video), media indexing, and audio transcoding by
168
168
 
169
169
  running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
170
170
 
171
- or see [complete windows example](./docs/examples/windows.md)
171
+ or see [some usage examples](#complete-examples) for inspiration, or the [complete windows example](./docs/examples/windows.md)
172
172
 
173
173
  some recommended options:
174
174
  * `-e2dsa` enables general [file indexing](#file-indexing)
@@ -1200,9 +1200,33 @@ see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where
1200
1200
 
1201
1201
  ## complete examples
1202
1202
 
1203
- * [running on windows](./docs/examples/windows.md)
1203
+ * see [running on windows](./docs/examples/windows.md) for a fancy windows setup
1204
1204
 
1205
- * read-only music server
1205
+ * or use any of the examples below, just replace `python copyparty-sfx.py` with `copyparty.exe` if you're using the exe edition
1206
+
1207
+ * allow anyone to download or upload files into the current folder:
1208
+ `python copyparty-sfx.py`
1209
+
1210
+ * enable searching and music indexing with `-e2dsa -e2ts`
1211
+
1212
+ * start an FTP server on port 3921 with `--ftp 3921`
1213
+
1214
+ * announce it on your LAN with `-z` so it appears in windows/Linux file managers
1215
+
1216
+ * anyone can upload, but nobody can see any files (even the uploader):
1217
+ `python copyparty-sfx.py -e2dsa -v .::w`
1218
+
1219
+ * block uploads if there's less than 4 GiB free disk space with `--df 4`
1220
+
1221
+ * show a popup on new uploads with `--xau bin/hooks/notify.py`
1222
+
1223
+ * anyone can upload, and receive "secret" links for each upload they do:
1224
+ `python copyparty-sfx.py -e2dsa -v .::wG:c,fk=8`
1225
+
1226
+ * anyone can browse, only `kevin` (password `okgo`) can upload/move/delete files:
1227
+ `python copyparty-sfx.py -e2dsa -a kevin:okgo -v .::r:rwmd,kevin`
1228
+
1229
+ * read-only music server:
1206
1230
  `python copyparty-sfx.py -v /mnt/nas/music:/music:r -e2dsa -e2ts --no-robots --force-js --theme 2`
1207
1231
 
1208
1232
  * ...with bpm and key scanning
@@ -126,7 +126,7 @@ enable thumbnails (images/audio/video), media indexing, and audio transcoding by
126
126
 
127
127
  running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
128
128
 
129
- or see [complete windows example](./docs/examples/windows.md)
129
+ or see [some usage examples](#complete-examples) for inspiration, or the [complete windows example](./docs/examples/windows.md)
130
130
 
131
131
  some recommended options:
132
132
  * `-e2dsa` enables general [file indexing](#file-indexing)
@@ -1158,9 +1158,33 @@ see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where
1158
1158
 
1159
1159
  ## complete examples
1160
1160
 
1161
- * [running on windows](./docs/examples/windows.md)
1161
+ * see [running on windows](./docs/examples/windows.md) for a fancy windows setup
1162
1162
 
1163
- * read-only music server
1163
+ * or use any of the examples below, just replace `python copyparty-sfx.py` with `copyparty.exe` if you're using the exe edition
1164
+
1165
+ * allow anyone to download or upload files into the current folder:
1166
+ `python copyparty-sfx.py`
1167
+
1168
+ * enable searching and music indexing with `-e2dsa -e2ts`
1169
+
1170
+ * start an FTP server on port 3921 with `--ftp 3921`
1171
+
1172
+ * announce it on your LAN with `-z` so it appears in windows/Linux file managers
1173
+
1174
+ * anyone can upload, but nobody can see any files (even the uploader):
1175
+ `python copyparty-sfx.py -e2dsa -v .::w`
1176
+
1177
+ * block uploads if there's less than 4 GiB free disk space with `--df 4`
1178
+
1179
+ * show a popup on new uploads with `--xau bin/hooks/notify.py`
1180
+
1181
+ * anyone can upload, and receive "secret" links for each upload they do:
1182
+ `python copyparty-sfx.py -e2dsa -v .::wG:c,fk=8`
1183
+
1184
+ * anyone can browse, only `kevin` (password `okgo`) can upload/move/delete files:
1185
+ `python copyparty-sfx.py -e2dsa -a kevin:okgo -v .::r:rwmd,kevin`
1186
+
1187
+ * read-only music server:
1164
1188
  `python copyparty-sfx.py -v /mnt/nas/music:/music:r -e2dsa -e2ts --no-robots --force-js --theme 2`
1165
1189
 
1166
1190
  * ...with bpm and key scanning
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
 
3
- VERSION = (1, 7, 1)
3
+ VERSION = (1, 7, 2)
4
4
  CODENAME = "unlinked"
5
- BUILD_DT = (2023, 5, 7)
5
+ BUILD_DT = (2023, 5, 13)
6
6
 
7
7
  S_VERSION = ".".join(map(str, VERSION))
8
8
  S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
@@ -834,6 +834,9 @@ class AuthSrv(object):
834
834
  if not ln.split("#")[0].strip():
835
835
  continue
836
836
 
837
+ if re.match(r"^\[.*\]:$", ln):
838
+ ln = ln[:-1]
839
+
837
840
  subsection = ln in (catx, catf)
838
841
  if ln.startswith("[") or subsection:
839
842
  self._e()
@@ -1571,6 +1574,12 @@ class AuthSrv(object):
1571
1574
  if t:
1572
1575
  self.log("\n\033[{}\033[0m\n".format(t))
1573
1576
 
1577
+ zv, _ = vfs.get("/", "*", False, False)
1578
+ zs = zv.realpath.lower()
1579
+ if zs in ("/", "c:\\") or zs.startswith(r"c:\windows"):
1580
+ t = "you are sharing a system directory: {}\n"
1581
+ self.log(t.format(zv.realpath), c=1)
1582
+
1574
1583
  try:
1575
1584
  zv, _ = vfs.get("/", "*", False, True)
1576
1585
  if self.warn_anonwrite and os.getcwd() == zv.realpath:
@@ -722,7 +722,7 @@ class HttpCli(object):
722
722
 
723
723
  def handle_get(self) :
724
724
  if self.do_log:
725
- logmsg = "%4s %s @%s" % (self.mode, self.req, self.uname)
725
+ logmsg = "%-4s %s @%s" % (self.mode, self.req, self.uname)
726
726
 
727
727
  if "range" in self.headers:
728
728
  try:
@@ -2561,7 +2561,7 @@ class Up2k(object):
2561
2561
 
2562
2562
  try:
2563
2563
  if "hardlink" in flags:
2564
- os.link(fsenc(src), fsenc(dst))
2564
+ os.link(fsenc(absreal(src)), fsenc(dst))
2565
2565
  linked = True
2566
2566
  except Exception as ex:
2567
2567
  self.log("cannot hardlink: " + repr(ex))
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: copyparty
3
- Version: 1.7.1
3
+ Version: 1.7.2
4
4
  Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
5
5
  Author-email: ed <copyparty@ocv.me>
6
6
  License: MIT
@@ -168,7 +168,7 @@ enable thumbnails (images/audio/video), media indexing, and audio transcoding by
168
168
 
169
169
  running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
170
170
 
171
- or see [complete windows example](./docs/examples/windows.md)
171
+ or see [some usage examples](#complete-examples) for inspiration, or the [complete windows example](./docs/examples/windows.md)
172
172
 
173
173
  some recommended options:
174
174
  * `-e2dsa` enables general [file indexing](#file-indexing)
@@ -1200,9 +1200,33 @@ see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where
1200
1200
 
1201
1201
  ## complete examples
1202
1202
 
1203
- * [running on windows](./docs/examples/windows.md)
1203
+ * see [running on windows](./docs/examples/windows.md) for a fancy windows setup
1204
1204
 
1205
- * read-only music server
1205
+ * or use any of the examples below, just replace `python copyparty-sfx.py` with `copyparty.exe` if you're using the exe edition
1206
+
1207
+ * allow anyone to download or upload files into the current folder:
1208
+ `python copyparty-sfx.py`
1209
+
1210
+ * enable searching and music indexing with `-e2dsa -e2ts`
1211
+
1212
+ * start an FTP server on port 3921 with `--ftp 3921`
1213
+
1214
+ * announce it on your LAN with `-z` so it appears in windows/Linux file managers
1215
+
1216
+ * anyone can upload, but nobody can see any files (even the uploader):
1217
+ `python copyparty-sfx.py -e2dsa -v .::w`
1218
+
1219
+ * block uploads if there's less than 4 GiB free disk space with `--df 4`
1220
+
1221
+ * show a popup on new uploads with `--xau bin/hooks/notify.py`
1222
+
1223
+ * anyone can upload, and receive "secret" links for each upload they do:
1224
+ `python copyparty-sfx.py -e2dsa -v .::wG:c,fk=8`
1225
+
1226
+ * anyone can browse, only `kevin` (password `okgo`) can upload/move/delete files:
1227
+ `python copyparty-sfx.py -e2dsa -a kevin:okgo -v .::r:rwmd,kevin`
1228
+
1229
+ * read-only music server:
1206
1230
  `python copyparty-sfx.py -v /mnt/nas/music:/music:r -e2dsa -e2ts --no-robots --force-js --theme 2`
1207
1231
 
1208
1232
  * ...with bpm and key scanning
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes