Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [hovudstraum]
pull_request:
branches: [hovudstraum]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ specify `--shr /foobar` to enable this feature; a toplevel virtual folder named
* you can name it whatever, `foobar` is just an example
* if you're using config files, put `shr: /foobar` inside the `[global]` section instead

users can delete their own shares in the controlpanel, and a list of privileged users (`--shr-adm`) are allowed to see and/or delet any share on the server
users can delete their own shares in the controlpanel, and a list of privileged users (`--shr-adm`) are allowed to see and/or delete any share on the server

after a share has expired, it remains visible in the controlpanel for `--shr-rt` minutes (default is 1 day), and the owner can revive it by extending the expiration time there

Expand Down Expand Up @@ -2689,7 +2689,7 @@ sync folders to/from copyparty

NOTE: full bidirectional sync, like what [nextcloud](https://docs.nextcloud.com/server/latest/user_manual/sv/files/desktop_mobile_sync.html) and [syncthing](https://syncthing.net/) does, will never be supported! Only single-direction sync (server-to-client, or client-to-server) is possible with copyparty

* if you want bidirectional sync, then copyparty and syncthing *should* be entirely safe to combine; they should be able to collaborate on the same folders without causing any trouble for eachother. Many people do this, and there have been no issues so far. But, if you *do* encounter any problems, please [file a copyparty bug](https://github.com/9001/copyparty/issues/new/choose) and I'll try to help -- just keep in mind I've never used syncthing before :-)
* if you want bidirectional sync, then copyparty and syncthing *should* be entirely safe to combine; they should be able to collaborate on the same folders without causing any trouble for each other. Many people do this, and there have been no issues so far. But, if you *do* encounter any problems, please [file a copyparty bug](https://github.com/9001/copyparty/issues/new/choose) and I'll try to help -- just keep in mind I've never used syncthing before :-)

the commandline uploader [u2c.py](https://github.com/9001/copyparty/tree/hovudstraum/bin#u2cpy) with `--dr` is the best way to sync a folder to copyparty; verifies checksums and does files in parallel, and deletes unexpected files on the server after upload has finished which makes file-renames really cheap (it'll rename serverside and skip uploading)

Expand Down
2 changes: 1 addition & 1 deletion bin/mtag/geotag.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
uses exiftool to geotag images based on embedded gps coordinates in exif data

adds four new metadata keys:
.gps_lat = latitute
.gps_lat = latitude
.gps_lon = longitude
.masl = meters above sea level
city = "city, subregion, region"
Expand Down
4 changes: 2 additions & 2 deletions bin/mtag/very-bad-idea.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def open_url(txt):
for _ in range(20):
sp.call(["xdotool", "key", "ctrl+w"]) # closes the open tab correctly
# else:
# sp.call(["xdotool", "getactivewindow", "windowminimize"]) # minimizes the focused windo
# sp.call(["xdotool", "getactivewindow", "windowminimize"]) # minimizes the focused window

# mpv is probably smart enough to use streamlink automatically
if try_mpv(txt):
Expand All @@ -166,7 +166,7 @@ def open_url(txt):
# nope,
# close any error messages:
sp.call(["xdotool", "search", "--name", "Error", "windowclose"])
# sp.call(["xdotool", "key", "ctrl+alt+d"]) # doesnt work at all
# sp.call(["xdotool", "key", "ctrl+alt+d"]) # does not work at all
# sp.call(["xdotool", "keydown", "--delay", "100", "ctrl+alt+d"])
# sp.call(["xdotool", "keyup", "ctrl+alt+d"])
sp.call(["xdg-open", txt])
Expand Down
2 changes: 1 addition & 1 deletion contrib/media-osd-bgone.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# then create a shortcut to that bat-file and move the shortcut here:
# %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
#
# and now this will autorun on bootup
# and now this will autorun on boot-up


Add-Type -TypeDefinition @"
Expand Down
2 changes: 1 addition & 1 deletion contrib/nixos/modules/copyparty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ in
name: value:
lib.attrsets.nameValuePair (value.path) {
d = {
#: in front of things means it wont change it if the directory already exists.
#: in front of things means it won't change it if the directory already exists.
group = ":${cfg.group}";
user = ":${cfg.user}";
mode = ":${
Expand Down
4 changes: 2 additions & 2 deletions contrib/plugins/meadup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var hambagas = [
"https://www.youtube.com/watch?v=pFA3KGp4GuU"
];

// keybaord,
// keyboard,
// onscreen keyboard by @steinuil
function initKeybaord(BASE_URL, HAMBAGA, consoleLog, consoleError) {
document.querySelector('.keybaord-container').innerHTML = `
Expand Down Expand Up @@ -373,7 +373,7 @@ function initKeybaord(BASE_URL, HAMBAGA, consoleLog, consoleError) {
}


// keybaord integration
// keyboard integration
(function () {
var o = mknod('div');
clmod(o, 'keybaord-container', 1);
Expand Down
2 changes: 1 addition & 1 deletion contrib/zfs-tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def set_pagesize(db_path):

# https://www.sqlite.org/pragma.html#pragma_page_size
# `- disable wal; set pagesize; vacuum
# (copyparty will reenable wal if necessary)
# (copyparty will re-enable wal if necessary)

with sqlite3.connect(db_path) as db:
db.execute("pragma journal_mode=delete")
Expand Down
2 changes: 1 addition & 1 deletion copyparty/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ def add_db_general(ap, hcores):
ap2.add_argument("--no-idx", metavar="PTN", type=u, default=noidx, help="regex: disable indexing of matching absolute-filesystem-paths during e2ds folder scan (must be specified as one big regex, not multiple times) (volflag=noidx)")
ap2.add_argument("--no-dirsz", action="store_true", help="do not show total recursive size of folders in listings, show inode size instead; slightly faster (volflag=nodirsz)")
ap2.add_argument("--re-dirsz", action="store_true", help="if the directory-sizes in the UI are bonkers, use this along with \033[33m-e2dsa\033[0m to rebuild the index from scratch")
ap2.add_argument("--no-dhash", action="store_true", help="disable rescan acceleration; do full database integrity check -- makes the db ~5%% smaller and bootup/rescans 3~10x slower")
ap2.add_argument("--no-dhash", action="store_true", help="disable rescan acceleration; do full database integrity check -- makes the db ~5%% smaller and boot-up/rescans 3~10x slower")
ap2.add_argument("--re-dhash", action="store_true", help="force a cache rebuild on startup; enable this once if it gets out of sync (should never be necessary)")
ap2.add_argument("--no-forget", action="store_true", help="never forget indexed files, even when deleted from disk -- makes it impossible to ever upload the same file twice -- only useful for offloading uploads to a cloud service or something (volflag=noforget)")
ap2.add_argument("--forget-ip", metavar="MIN", type=int, default=0, help="remove uploader-IP from database (and make unpost impossible) \033[33mMIN\033[0m minutes after upload, for GDPR reasons. Default [\033[32m0\033[0m] is never-forget. [\033[32m1440\033[0m]=day, [\033[32m10080\033[0m]=week, [\033[32m43200\033[0m]=month. (volflag=forget_ip)")
Expand Down
2 changes: 1 addition & 1 deletion copyparty/authsrv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2648,7 +2648,7 @@ def _reload(self, verbosity: int = 9) -> None:

for mtp in local_only_mtp:
if mtp not in local_mte:
t = 'volume "/{}" defines metadata tag "{}", but doesnt use it in "-mte" (or with "cmte" in its volflags)'
t = 'volume "/{}" defines metadata tag "{}", but does not use it in "-mte" (or with "cmte" in its volflags)'
self.log(t.format(vol.vpath, mtp), 1)
errors = True

Expand Down
2 changes: 1 addition & 1 deletion copyparty/cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _gen_srv(log: "RootLogger", args, netdevs: dict[str, Netdev]):
try:
expiry, inf = _read_crt(args, "srv.pem")
if "sans" not in inf:
raise Exception("no useable cert found")
raise Exception("no usable cert found")

expired = time.time() + args.crt_sdays * 60 * 60 * 24 * 0.5 > expiry
if expired:
Expand Down
4 changes: 2 additions & 2 deletions copyparty/httpcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ def handle_options(self) -> bool:
oh["Dav"] = "1, 2"
oh["Ms-Author-Via"] = "DAV"

# winxp-webdav doesnt know what 204 is
# winxp-webdav does not know what 204 is
self.send_headers(0, 200)
return True

Expand Down Expand Up @@ -2320,7 +2320,7 @@ def dump_to_file(self, is_put: bool) -> tuple[int, str, str, str, int, str, str]
open_ka = {"fun": lzma.open, "preset": lv[alg]}
open_a = ["wb"]
else:
self.log("fallthrough? thats a bug", 1)
self.log("fallthrough? that's a bug", 1)

suffix = "-{:.6f}-{}".format(time.time(), self.dip())
nameless = not fn
Expand Down
2 changes: 1 addition & 1 deletion copyparty/mdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def run(self) -> None:
self.build_replies()
Daemon(self.send_probes)
zf = time.time() + 2
self.probing = zf # cant unicast so give everyone an extra sec
self.probing = zf # can't unicast so give everyone an extra sec
self.unsolicited = [zf, zf + 1, zf + 3, zf + 7] # rfc-8.3

try:
Expand Down
2 changes: 1 addition & 1 deletion copyparty/mtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def parse_ffprobe(
if v2 is None or zf > v2:
ret[rk] = zf
except:
# sqlite doesnt care but the code below does
# sqlite does not care but the code below does
if v1 not in ["N/A"]:
ret[rk] = v1
else:
Expand Down
2 changes: 1 addition & 1 deletion copyparty/stolen/ifaddr/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
#: `{846EE342-7039-11DE-9D20-806E6F6E6963}`.
self.name = name

#: Human readable name of the adpater. On Linux this
#: Human readable name of the adapter. On Linux this
#: is currently the same as :attr:`name`. On Windows
#: this is the name of the device.
self.nice_name = nice_name
Expand Down
2 changes: 1 addition & 1 deletion copyparty/svchub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ def run(self) -> None:
pass

self.shutdown()
# cant join; eats signals on win10
# can't join; eats signals on win10
while not self.stopped:
time.sleep(0.1)
else:
Expand Down
2 changes: 1 addition & 1 deletion copyparty/szip.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def gen_hdr(
# infozip-macos: 0100 0000 a481 (spec-ver 1e03) file:644
# infozip-macos: 0100 0100 0080 (spec-ver 1e03) file:000
# win10-zip: 0000 2000 0000 (spec-ver xx00) FILE_ATTRIBUTE_ARCHIVE
ret += b"\x00\x00\x00\x00\xa4\x81" # unx
ret += b"\x00\x00\x00\x00\xa4\x81" # unix
# ret += b"\x00\x00\x20\x00\x00\x00" # fat

# 4b local-header-ofs
Expand Down
4 changes: 2 additions & 2 deletions copyparty/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ if (1)
"m3u_clip": "m3u playlist now copied to clipboard\n\nyou should create a new textfile named something.m3u and paste the playlist in that document; this will make it playable",

"gt_vau": "don't show videos, just play the audio\">🎧",
"gt_msel": "enable file selection; ctrl-click a file to override$N$N<em>when active: doubleclick a file / folder to open it</em>$N$NHotkey: S\">multiselect",
"gt_msel": "enable file selection; ctrl-click a file to override$N$N<em>when active: double-click a file / folder to open it</em>$N$NHotkey: S\">multiselect",
"gt_crop": "center-crop thumbnails\">crop",
"gt_3x": "hi-res thumbnails\">3x",
"gt_zoom": "zoom",
Expand Down Expand Up @@ -2236,7 +2236,7 @@ var vbar = (function () {

setTimeout(function () {
if (IPHONE && mp.au && mul < 0.9 && mp.au.volume == 1)
toast.inf(6, 'volume doesnt work because <a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW11" target="_blank">apple says no</a>');
toast.inf(6, 'volume does not work because <a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW11" target="_blank">apple says no</a>');
}, 1);
}
can.onmousedown = function (e) {
Expand Down
2 changes: 1 addition & 1 deletion copyparty/web/md.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<a id="save" href="{{ arg_base }}edit" tt="Hotkey: ctrl-s">save</a>
<a id="sbs" href="#" tt="editor and preview side by side">sbs</a>
<a id="nsbs" href="#" tt="switch between editor and preview$NHotkey: ctrl-e">editor</a>
<div id="toolsbox">
<div id="toolbox">
<a id="tools" href="#">tools</a>
<a id="fmt_table" href="#">prettify table (ctrl-k)</a>
<a id="iter_uni" href="#">non-ascii: iterate (ctrl-u)</a>
Expand Down
2 changes: 1 addition & 1 deletion copyparty/web/shares.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<a id="xpnd" href="#">files</a>
<a href="{{ r }}/?h">control-panel</a>

<span>axs = perms (read,write,move,delet)</span>
<span>axs = perms (read,write,move,delete)</span>
<span>nf = numFiles (0=dir)</span>
<span>min/hrs = time left</span>

Expand Down
2 changes: 1 addition & 1 deletion copyparty/web/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ function xhrchk(xhr, prefix, e404, lvl, tag) {
var errtxt = ((xhr.response && xhr.response.err) || xhr.responseText) || '',
suf = '',
fun = toast[lvl || 'err'],
is_cf = /[Cc]loud[f]lare|>Just a mo[m]ent|#cf-b[u]bbles|Chec[k]ing your br[o]wser|\/chall[e]nge-platform|"chall[e]nge-error|nable Ja[v]aScript and cook/.test(errtxt);
is_cf = /[Cc]loud[f]lare|>Just a mo[m]ent|#cf-b[u]bbles|Chec[k]ing your br[o]wser|\/chall[e]nge-platform|"chall[e]nge-error|nable Ja[v]aScript and cook/.test(errtxt); # codespell:ignore

if (errtxt.startsWith('<pre>'))
suf = '\n\nerror-details: «' + unpre(errtxt).split('\n')[0].trim() + '»';
Expand Down
Loading