Re: help with plone.app.event
Johannes Raggam <[email protected]> Fri, 03 Apr 2015 10:11:00 +0200
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2015-04-03 at 09:52 +0200, dieter wrote: > Stefano Prestini <stefano.prestini-y6W5KEIK/[email protected]> writes: > > On plone I installed and configured plone.app.event, by clicking "save and import" events are downloaded from the webdav server and shown in plone folder with "Solgema fullcalendar" view > > > > The question is this: can I automate import from webdav server without having to click anytime the button "save and import"? > > Web applications (such as Plone) are mostly client controlled: any > action is (usually) initiated by a client. > > In your case, this means, that some client must call for the > "save and import" to initiate the webdav interaction. > > However, "client" does not necessarily mean a human user. It can be > something automatic - e.g. a periodically executed script. > > > There are essentially two kinds of automatic actions: > > 1. actions associated with some kind of other client > initiated activity. > > 2. periodically initiated actions > > For the first kind, you might be able to use a subscriber for a > Zope event -- e.g. do something when a user logs in or when events > are created/modified. > > For the second kind, you can either use Zope's "clockserver" > or an externally scheduled action (e.g. via "cron" on *Nix systems). Agreed. You can use Zope internals clockserver (which might be easier to set up authentication) or you use a cron job to call wget or something to call a the ical import url and make sure, you are authenticated as someone with necessary rights. Please note, on plone.app.event's ical iport form, after clicking save and import, all necessary info (ical url, event type) are saved, so you should not need to call wget with url parameters. i have used it once like so, but i used a custom view to import it, so this is only half of the solution: $ wget --keep-session-cookies --save-cookies cookies.txt --post-data '__ac_name=USERNAME&__ac_password=PASSWORD&form.submitted=1' https://YOUR.DOMAIN/login_form $ wget --load-cookies cookies.txt --output-document=import_response.json -r https://YOUR.DOMAIN/PATH/TO/FOLDER/@@my_import_ical there is another option: https://github.com/4teamwork/ftw.caldav is a plone.app.event caldav integration. it's experimental and i didn't try it yet... > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Plone-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/plone-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Plone-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plone-users
signature.asc
(application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlUeSxUACgkQW4mNMQxDgAf3egCcDMOIN20obfiamkyBgJrCE/H9 Nj0An0TuNR65up5z3UnxWUzLlkItQiT0 =vdFI -----END PGP SIGNATURE-----