Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hooks to find out path of uploaded file #741

Open
basxto opened this issue Nov 5, 2017 · 2 comments
Open

Allow hooks to find out path of uploaded file #741

basxto opened this issue Nov 5, 2017 · 2 comments
Labels
feature need:reporter feedback feedback from reporter required need:support support/help/contribution is required
Milestone

Comments

@basxto
Copy link

basxto commented Nov 5, 2017

Allowing a %(path)s in hooks would be enough.

Expected value would be something like /basxto/7db902ed-4e71-a1ce-0521-b0a18b8d4141/9430b3eb-10a9-497a-9668-877deb4376e9.vcf

This would allow to use git repositories per addressbook or calendar

$COLLECTION=collection-root$(dirname %(path)s);
if [ ! -d ${COLLECTION}/.git ]; then
  true;
else
  cd ${COLLECTION};
  git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s)
fi
@Unrud Unrud added the feature label Nov 30, 2017
@kimpenhaus
Copy link

I would like to see the type (addressbook or calendar and task) in the hook as well.

I currently have a hook to sync an addressbook to a phonebook on my phone box (with automated import). I would like to trigger the phonebook sync only if there are changes in a certain addressbook.

As far as I can tell from the documentation this is currently not possible. So the trigger gets called every time there is a change in the filesystem which leeds to a phonebook sync even there is only an entry added to the calendar.

@pbiering pbiering added this to the 3.3.x milestone Nov 24, 2024
@pbiering pbiering added need:reporter feedback feedback from reporter required need:support support/help/contribution is required labels Nov 24, 2024
@pbiering
Copy link
Collaborator

placeholder replacement is done in file

https://github.com/Kozea/Radicale/blob/master/radicale/storage/multifilesystem/lock.py

                command = self._hook % {
                    "user": shlex.quote(user or "Anonymous")}

-> please provide tested PR with additional placeholder you want to have supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature need:reporter feedback feedback from reporter required need:support support/help/contribution is required
Projects
None yet
Development

No branches or pull requests

4 participants