-
Notifications
You must be signed in to change notification settings - Fork 3
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
Export to paprika recipe manager #22
Export to paprika recipe manager #22
Conversation
Hi Dorthe, wow, this looks great 😃! Now I finally have an excuse to play around with Paprika. I just tried an export and it worked. Maybe it's also possible to export all of the recipes? There are some minor changes I'd like to add to your PR (httpx instead of requests because of mypy, avoid making http calls in the tests), but I would definitely like to merge it. Thanks a lot! Viele Grüße aus Düsseldorf |
…s type stubs for mypy and also because httpx is used everywhere else some typos + staticmethod decorators.. replaced dir with directory to avoid shadowing builtin dir
Exporting all recipes is pretty easy. You just have to create multiple gz files and wrap that into a zip file. Do you want me to add this ("if user does not add oid as parameter then export everything")? Paprika seems to use the uuid to determine if it has to update an existing recipe or create a new entry. Right now I am creating a uuid each time I am exporting. For experting everything I would test if I could take the kpncook oid (which is static). So it would be a kind of "sync" and you could export multiple times everything and only the new recipes would be created in Paprika (bad luck if you changed stuff in Paprika though). And: I am happy to see your changes, I actually learned a lot from your code (e.g. I did not know flit yet). :-) |
Sounds great!
In the
Thanks :), I didn't know about flit until last year, too. Do you know about pre-commit hooks? They are configured via |
…issing if cover is None and None could not be unpacked in a tuple..)
just a quick update: I worked on the "export all recipes" mini-feature, it's almost done. I am still working on how to correctly do a 404 test with httpx and pytest-mock (sometimes linked images from the kptncook recipes do not longer exist at Cloudfround). To be continued. |
…arameters all recipes to Paprika, when a recipe id is added as parameter one recipe is exported
…rying to exclude from pyupgrade by adding it as a standalone type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good!
Thanks a lot again for your PR 😀 and pointing me to Paprika
Just released 0.0.10 🥳 |
Hi Jochen,
this code picks one recipe from the local repo and creates the format required by Paprika Recipe Manager (in German right now).
This is basically a gz of a json file, which has to be wrapped in a zip file.
Maybe you are interested to merge..
Viele Grüße aus Köln
Dorthe