-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
New Importer - RecetteTek #578
New Importer - RecetteTek #578
Conversation
thanks for the PR, sounds really good from the description. i will give it a test and try to get it into the next release |
dfcace5
to
1bc5af1
Compare
I've updated the image importing, it will now retrieve the image that is in the export file first and if that fails it will then attempt to download the image from the original location. |
As an additional question, is there a recommended location to store the original source url of the recipe? For now i've just copied what other importers have done and placed it at the bottom of a step, however, I noticed that the recipe DB object contains two fields: Link and Cors Link |
You have done it correctly, i have no special field for "source URL" like many other recipe managers have as i do not really think that this is very useful. The link and cors link fields are leftovers of the old external recipe system that just produced links to external recipes. |
i made the decision to append the url to the end of the description field, i feel that makes more sense than having it added to the first step in the recipe. Is there a way to add the ingredients directly to the recipe rather than one of the steps? |
No ingredients are always linked to a step. Also all instructions are so you will need to add at least one step to the imported recipe. I recommend adding the source URL to the text as the description will be shown on the search page from the next update on which will probably not look good. Also it will be consistent with all other importers |
No problem, i've moved the source URL out of the description and back into the step. |
This PR adds an importer for RecetteTek - https://www.recettetek.com/en/
It is currently possible to import either a single recipe or import all exported recipes at once.
RecetteTek allows a user to export their recipes as either an '.RTK' file or an '.HTML' file, this importer supports only the RTK format.
It will also attempt to download the original image that RecetteTek initially imported, but if that fails it will not import any image. The recipe export from RecetteTek does include the original images locally, but I have yet to look at the best way to import those.
A lot of the fields that RecetteTek have are free-form, so things like serving size, prep time, cooking time etc will fail to import if there is anything other than an integer in the field. (Maybe a parser could be built for this for use by all importers, similar to the ingredient parser?)
Unlike some of the other importers, I've split out a lot of the value parsing into their own try/catch blocks to get as much info as possible, I'm sure there is probably a better way to do this though :)
RecetteTek also allows videos to be inserted as a recipes instructions, in this case there will be no ingredients or description.