mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
change xm examples to reject users without write-access; #68
This commit is contained in:
parent
64de3e01e8
commit
99edba4fd9
|
@ -2,7 +2,7 @@ standalone programs which are executed by copyparty when an event happens (uploa
|
||||||
|
|
||||||
these programs either take zero arguments, or a filepath (the affected file), or a json message with filepath + additional info
|
these programs either take zero arguments, or a filepath (the affected file), or a json message with filepath + additional info
|
||||||
|
|
||||||
run copyparty with `--help-hooks` for usage details / hook type explanations (xbu/xau/xiu/xbr/xar/xbd/xad)
|
run copyparty with `--help-hooks` for usage details / hook type explanations (xm/xbu/xau/xiu/xbr/xar/xbd/xad/xban)
|
||||||
|
|
||||||
> **note:** in addition to event hooks (the stuff described here), copyparty has another api to run your programs/scripts while providing way more information such as audio tags / video codecs / etc and optionally daisychaining data between scripts in a processing pipeline; if that's what you want then see [mtp plugins](../mtag/) instead
|
> **note:** in addition to event hooks (the stuff described here), copyparty has another api to run your programs/scripts while providing way more information such as audio tags / video codecs / etc and optionally daisychaining data between scripts in a processing pipeline; if that's what you want then see [mtp plugins](../mtag/) instead
|
||||||
|
|
||||||
|
|
|
@ -23,17 +23,18 @@ because the keyword "anime" is in the DESTS config below
|
||||||
needs python3
|
needs python3
|
||||||
|
|
||||||
example usage as global config (not a good idea):
|
example usage as global config (not a good idea):
|
||||||
python copyparty-sfx.py --xm f,j,t60,bin/hooks/qbittorrent-magnet.py
|
python copyparty-sfx.py --xm aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
|
||||||
|
|
||||||
parameters explained,
|
parameters explained,
|
||||||
xm = execute on message (📟)
|
xm = execute on message (📟)
|
||||||
|
aw = only users with write-access can use this
|
||||||
f = fork; don't delay other hooks while this is running
|
f = fork; don't delay other hooks while this is running
|
||||||
j = provide message information as json (not just the text)
|
j = provide message information as json (not just the text)
|
||||||
t60 = abort if qbittorrent has to think about it for more than 1 min
|
t60 = abort if qbittorrent has to think about it for more than 1 min
|
||||||
|
|
||||||
example usage as a volflag (per-volume config, much better):
|
example usage as a volflag (per-volume config, much better):
|
||||||
-v srv/qb:qb:A,ed:c,xm=f,j,t60,bin/hooks/qbittorrent-magnet.py
|
-v srv/qb:qb:A,ed:c,xm=aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
(share filesystem-path srv/qb as volume /qb with Admin for user 'ed',
|
(share filesystem-path srv/qb as volume /qb with Admin for user 'ed',
|
||||||
running this plugin on all messages with the params explained above)
|
running this plugin on all messages with the params explained above)
|
||||||
|
@ -44,7 +45,7 @@ example usage as a volflag in a copyparty config file:
|
||||||
accs:
|
accs:
|
||||||
A: ed
|
A: ed
|
||||||
flags:
|
flags:
|
||||||
xm: f,j,t60,bin/hooks/qbittorrent-magnet.py
|
xm: aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
|
||||||
|
|
||||||
the volflag examples only kicks in if you send the torrent magnet
|
the volflag examples only kicks in if you send the torrent magnet
|
||||||
while you're in the /qb folder (or any folder below there)
|
while you're in the /qb folder (or any folder below there)
|
||||||
|
|
|
@ -12,18 +12,19 @@ application/x-www-form-urlencoded (for example using the
|
||||||
📟 message-to-server-log in the web-ui)
|
📟 message-to-server-log in the web-ui)
|
||||||
|
|
||||||
example usage as global config:
|
example usage as global config:
|
||||||
--xm f,j,t3600,bin/hooks/wget.py
|
--xm aw,f,j,t3600,bin/hooks/wget.py
|
||||||
|
|
||||||
parameters explained,
|
parameters explained,
|
||||||
xm = execute on message-to-server-log
|
xm = execute on message-to-server-log
|
||||||
|
aw = only users with write-access can use this
|
||||||
f = fork; don't delay other hooks while this is running
|
f = fork; don't delay other hooks while this is running
|
||||||
j = provide message information as json (not just the text)
|
j = provide message information as json (not just the text)
|
||||||
c3 = mute all output
|
c3 = mute all output
|
||||||
t3600 = timeout and abort download after 1 hour
|
t3600 = timeout and abort download after 1 hour
|
||||||
|
|
||||||
example usage as a volflag (per-volume config):
|
example usage as a volflag (per-volume config):
|
||||||
-v srv/inc:inc:r:rw,ed:c,xm=f,j,t3600,bin/hooks/wget.py
|
-v srv/inc:inc:r:rw,ed:c,xm=aw,f,j,t3600,bin/hooks/wget.py
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
(share filesystem-path srv/inc as volume /inc,
|
(share filesystem-path srv/inc as volume /inc,
|
||||||
readable by everyone, read-write for user 'ed',
|
readable by everyone, read-write for user 'ed',
|
||||||
|
@ -36,7 +37,7 @@ example usage as a volflag in a copyparty config file:
|
||||||
r: *
|
r: *
|
||||||
rw: ed
|
rw: ed
|
||||||
flags:
|
flags:
|
||||||
xm: f,j,t3600,bin/hooks/wget.py
|
xm: aw,f,j,t3600,bin/hooks/wget.py
|
||||||
|
|
||||||
the volflag examples only kicks in if you send the message
|
the volflag examples only kicks in if you send the message
|
||||||
while you're in the /inc folder (or any folder below there)
|
while you're in the /inc folder (or any folder below there)
|
||||||
|
|
Loading…
Reference in a new issue