Chobbes / org-chef

A package for making a cookbook and managing recipes with org-mode.
MIT License
327 stars 33 forks source link

Errors with Recipes Pulled from BudgetBytes.com #14

Closed coltoneakins closed 6 years ago

coltoneakins commented 6 years ago

Description: This issue is two-fold.

Using the org-capture-template given yields the following error when providing any URL from BudgetBytes.com:

org-capture: Capture template ‘c’: Template is not a valid Org entry or tree

However, this error does not appear for recipes from other popular sites such as AllRecipes.com (I used the http://allrecipes.com/recipe/85452/homemade-black-bean-veggie-burgers/ in this project's README.md to test this).

Also, as an alternative to using the capture template, the function org-chef-insert-recipe does work but it fails to grab the 'Directions' / instructions for the recipe.

Steps to Reproduce: Issue 1: Error with the Org Capture Template

  1. Set up your org-capture-templates. Here are mine. Basically, the same as the sample given in this project's README.md
(setq org-capture-templates
        '(
          ("p" "Protocol" entry (file+olp "/home/ceakins/gdrive/Notes/botbot.org" "Python OOP" "Resources")
                   "* %?[[%:link][%:description]] %U\n%i\n" :prepend t)
          ("L" "Protocol Link" entry (file+olp "/home/ceakins/gdrive/Notes/botbot.org" "Python OOP" "Resources")
           "* %?[[%:link][%:description]] %U\n" :prepend t)
          ("c" "Cookbook" entry (file  "/home/ceakins/gdrive/Notes/cookbook.org")
           "%(org-chef-get-recipe-from-url)")
          ))
  1. Use org-capture.
  2. Supply any URL from BudgetBytes.com (for example, https://www.budgetbytes.com/homemade-crepes/).
  3. The template cannot be inserted into the org file. Error: org-capture: Capture template ‘c’: Template is not a valid Org entry or tree

Issue 2: Error with the function org-chef-insert-recipe

  1. Open any org file.
  2. Use org-chef-insert-recipe`.
  3. Supply a URL from BudgetBytes.com.
  4. Notice that the 'Directions' for the recipe are not pulled.
Chobbes commented 6 years ago

Hi there! Thanks for reporting this issue. I believe it should work now, I have just pushed a fix. Please let me know if you have further problems, or if it is solved for you.

coltoneakins commented 6 years ago

I tested both use cases that I had mentioned above. The package is now working as intended. Thank you for looking at this so promptly.

As a side note: Combined with Orgzly on my phone, I find this package so helpful when I shop for groceries for my family. Thank you. for creating this. This package is excellent.

Chobbes commented 6 years ago

Awesome, I'm so glad to hear that :). If you have any features or anything that would make org-chef even better for you, please feel free to add them to the issue tracker. If it's easy enough to do, I'll probably get around to it pretty quickly :).

I'm definitely curious about using org-chef more for grocery lists. I was thinking of setting up some way to automatically populate a grocery list from org-chef... Maybe even keep track of pantry contents, haha (though, that's probably too much burden unless you have everything in org... units become a problem again). But I'm glad that orgzly is working well for you for peeking at ingredients on your phone!