My personal recipe organizer

Add your own websites

Your favorite site is currently not supported ? If you are not afraid by html, xml, xpath or regular expressions, you can now try to support your favorite website by yourself !

My CookBook uses different algorithms to import a recipe. One of them is to use a site definition that describes a recipe page.

MyCookBook is now open to get user generated site definitions.

The site definition is a json file that contains xpath and regular expressions that are used by My Cookbook to extract the different information of a recipe in the HTML code.

 

We will present here some tutorial and link to get started.

  1. Get Firefox
  2. Get Java JRE
  3. Get the RecipeFox add on, and install it in firefox. You can download it here : download page
  4. Check if RecipeFox already supports your site.
    Click on the “Show the Sites” button. Look in the sites list if you can find the website you would like to add. If yes, select it and export it
  5. If you can’t find it in the list, you can write a new RecipeFox site def
    On the recipe fox Website you can read a nice tutorial.
    Here are the recipefox fields that are used in My Cookbook:

    • Recipe URL pattern (mandatory)
    • Title (mandatory)
    • Ingredients
    • Directions
    • Image URL
    • Yield
    • Prep. time
    • Cook time
    • Categories

    Then export your RecipeFox site def

  6. Convert it to My CookBook site def :
    Open the .json file you have generated with RecipeFox. You will have something like that :

    At the end of the file, just before the characters ‘}]’, add the language of the website:
    ,"siteLang":"xxx". Replace xxx by adapted values.
    siteLang is the iso code of the language of the website
    For our example, you will have :
    [...]
    ,"yieldunitRegexp":"","siteLang":"en"}]
  7. Copy your .json file on your device in the directory Android/data/fr.cookbook/files/sitesdef/ or Android/data/fr.cookbookpro/files/sitesdef/
  8. Delete the file Android/data/fr.cookbook/files/sitesdef/siteDef.list
  9. Try to import a recipe into MyCookBook
  10. Optional : You can send us your file to publish it to all My CookBook users

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

74 thoughts on “Add your own websites”