-
Notifications
You must be signed in to change notification settings - Fork 10
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
automatically create (recurring) events from pretix #196
Comments
@friep sounds like a really nice feature! Maybe we could use the GitHub Actions schedule function to trigger the synchronization once per day? Maybe we could also mark the cancelled events as cancelled so that events don't mystically disappear? |
@friep sounds a nice idea.
Let's take https://raw.githubusercontent.com/CorrelAid/hugo-website/main/content/en/events/2021-08/open-onboarding-call.md as an example event. I am wondering how we can get all the required data from the pretix API response https://docs.pretix.eu/en/latest/api/resources/events.html#resource-description e.g. fields like |
@Peter554 thanks for your response! i definitely did not think this through 100% before posting the issue so you definetely have a point re. potential "missing" data. i'd definitely be willing to drop some customization on the website end (e.g. i'll create a test event later and post the API response data here. @jandix re cancelled events: would you keep a list of events then in the repo and do comparisons? or how would you go about it? |
sorry for the late response! major drawback: the actual description is not returned, i.e. that'd need to be done with web scraping (looks doable). also to extract a good slug suggestion from the title would be a challenge.
|
@friep thanks for posting that response
hmm that is odd, and annoying. I didn't use pretix before so am stabbing in the dark a bit, but would you have any idea what the pretix "Item" resource is https://docs.pretix.eu/en/latest/api/resources/items.html#get--api-v1-organizers-(organizer)-events-(event)-items- ? It seems to me that "Events" have "Items", and "Items" have descriptions. So maybe we should actually be looking there for the description.
I'm not quite sure what that means. In the response you posted the Event contains the slug, so I don't really understand what you mean by "extract a good slug"? |
If we use Python we could try to parse the meta fields in the files and add specific meta fields that are linked to the data from petrix. Maybe it is even possible to introduce an additional meta field that represents a unique identifier that can be linked to the petrix API (e.g.: I would like to avoid adding an additional "database" (CSV, JSON, SQLite, etc.) if we can use the filesystem. |
@Peter554 i think the items are just analogous for ticket types or similar things. it's a very complex tool with lots of options and options. we only use it to approx 30% of capacity. @jandix yes re your points. i'll be in contact with you over slack, i think we should have a call (if possible from your side) so that we can come up with a more detailed plan maybe and answer any other open questions.. |
FYI I created a draft PR. Already opened a few threads I am aware will need discussing. Feel free to reply in the PR, or else we can discuss in a call some time. |
our 'source of truth' for events is our pretix shop: https://pretix.eu/correlaid/ . currently we don't always remember to create the corresponding events on our website so visitors on our website don't get the full view of all our activities (or at least those represented on pretix).
we could use its API to automatically create the corresponding events for the website for the next month or so. this is especially interesting for recurring events such as the open onboarding call. the service should not commit to main directly but instead open a branch and make a PR.
technical implementation ideas:
The text was updated successfully, but these errors were encountered: