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

#476 Import recipes with multiple instruction steps (for a custom Co… #1303

Conversation

MarcusWolschon
Copy link
Contributor

  • Implement a custom scraper for Cookidoo with handling of stite specific formatings
  • Implement the ability to manually or automatically import multi-step receipts by using the "Header 1" markdown
  • automatically assign ingredients to the first step that mentions them when importing a multi step receipt

@vabene1111
Copy link
Collaborator

i dont see how this respects what we have written in previous issues and in the discussion we had in discord ?

How can the user quickly and easily decide if he wants to split steps or not ?

What happens when i import from a page that gives me 25 steps? do i get 25 markdown headers ?

how is this represented in the frontend? i do not see any changes to the importer UI ?

@vabene1111 vabene1111 self-requested a review January 13, 2022 16:59
@MarcusWolschon
Copy link
Contributor Author

MarcusWolschon commented Jan 13, 2022

You change it by choosing 'manual' after reviewing the preview and noticing that manual adjustment is needed and then editing the markdown before using the "import" button.
Exactly the MVP I outlined on discord.

It's currently only used for this one site that is known to have reasonable steps since the receipts there are not user supplied. (no json+ld offered for the user supplied receipts)

@MarcusWolschon
Copy link
Contributor Author

MarcusWolschon commented Jan 13, 2022

I lack the expertise and insight to extend the preview page. That could be done on the feature branch before considering to merge this into the development branch or on the development branch after the next release is split off.

I've done what I can do for this feature.
My own practical issue is solved by using this in the dev environment and exporting the receipts for my live system.
Now a JavaScript developer is needed to do the UI changes and get this production ready. (merge import and edit,...)

@MarcusWolschon
Copy link
Contributor Author

MarcusWolschon commented Jan 14, 2022

Improvements:

  1. preview shows steps preformated
  2. preview and preview-editing shows a text about the use of markdown
  3. text of the header is used as the name of the step
  4. localised default step names for English and German

The Cookidoo importer is probably already pretty useful for many users without the changes to cookbook/templates/url_import.html and cookbook/views/data.py
I can split that off.

@vabene1111
Copy link
Collaborator

i will review this after my vacation and decide how we proceed

…BLE_IMPORT_STEPS=1 similar to ENABLE_PDF_EXPORT=1
@MarcusWolschon
Copy link
Contributor Author

@vabene1111 I added an environment variable ENABLE_IMPORT_STEPS similar to ENABLE_PDF_EXPORT, so the experimental feature has to be explicitly enabled by the admin.

@vabene1111
Copy link
Collaborator

closed for compliance reasons

@vabene1111 vabene1111 closed this Jan 18, 2022
@MarcusWolschon
Copy link
Contributor Author

MarcusWolschon commented Jan 20, 2022

  1. Added unit test case for the "cookidoo" scraper,
  2. improved the translations
  3. added the ability to work with complex receips that have grouped steps. (generating not only level 1 but also level 2,... headers in the instructions)
  4. fixed support for cookidoo.at and cookidoo.ch in the cookidoo scraper
  5. added a checkbox during import to enable the creation of steps similar to "all keywords"
    grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants