Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5276accf6e | ||
|
|
7f0ff05748 | ||
|
|
b31a908750 | ||
|
|
deb8b8dc69 | ||
|
|
bf2b3539ac | ||
|
|
fdb40117df |
4 changed files with 6 additions and 6 deletions
|
|
@ -61,4 +61,4 @@ The folder name is the 11 character unique string found in the syncthing GUI. Th
|
|||
|
||||
An example: a script at the location `~/.syncthing-hooks/night-owlzz-5m` will be executed five minutes after the most recent event in the folder with the identifier `night-owlzz`.
|
||||
|
||||
Make sure your folder identifier is exactly 11 characters long and does not have an extension. Also, don't forget to `chmod +x` the script.
|
||||
Don't forget to `chmod +x` the script.
|
||||
|
|
|
|||
2
hooks.js
2
hooks.js
|
|
@ -21,7 +21,7 @@ const parseHooks = (root, hooks) =>
|
|||
hooks
|
||||
.map(x => ({
|
||||
path: path.join(root, x),
|
||||
match: x.match(/(?<folder>.{11})-(?<time>.*)/),
|
||||
match: x.match(/(?<folder>.*)-(?<time>.*)/),
|
||||
}))
|
||||
.filter(x => x.match)
|
||||
.map(x => ({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "syncthing-hooks",
|
||||
"version": "0.3.0",
|
||||
"version": "0.4.0",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"syncthing-hooks": "index.js"
|
||||
|
|
|
|||
|
|
@ -171,9 +171,9 @@ ms@2.1.3:
|
|||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
normalize-url@^4.1.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
|
||||
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
|
||||
version "4.5.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
|
||||
integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==
|
||||
|
||||
once@^1.3.1, once@^1.4.0:
|
||||
version "1.4.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue