From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Tyree Subject: Re: org-cook Date: Sun, 16 Mar 2014 05:25:25 +1100 Message-ID: References: <87mwgr4b2b.wl%egh@e6h.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd752a86ad82b04f4a94ff0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOtGz-0002Qt-KR for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 14:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOtGx-0002vl-4A for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 14:25:29 -0400 Received: from mail-ie0-x22e.google.com ([2607:f8b0:4001:c03::22e]:64178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOtGw-0002vg-T2 for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 14:25:27 -0400 Received: by mail-ie0-f174.google.com with SMTP id rp18so3796121iec.5 for ; Sat, 15 Mar 2014 11:25:26 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xebar Saram Cc: Erik Hetzner , org mode --047d7bd752a86ad82b04f4a94ff0 Content-Type: text/plain; charset=ISO-8859-1 Pandoc can pull a web page, convert to Markdown and then to Org. That doesn't do all you want, but maybe a start. Cheers, Alan On 16 March 2014 05:03, Xebar Saram wrote: > Thanks so much for the tips Erik > > i will explore the ingredients in table idea as suggested. do you know > perhaps of a way to quick format online recipes to an org table (that is > webpage html to org table) or perhaps a way to convert already entered > recipes in my org files to tables > > kind regards > > Z. > > > On Sat, Mar 15, 2014 at 7:38 PM, Erik Hetzner wrote: > >> At Sat, 15 Mar 2014 09:24:23 +0200, >> Xebar Saram wrote: >> > >> > Dear Eric and org users >> > >> > i am a new(ish) org user and an avid cooker. i have started using >> > orgmodeas my recipe notebook and stumbled upon the old org-cook >> > thread. >> > Is there so documentation on this? do you still use it? >> > are there any other ideas/suggestions on using orgmode as a recipe >> notebook? >> > what i would mainly love is a way to "scrape" recipes off websites into >> org >> >> Hi Xebar, >> >> I still use org to manage my recipes, but I don't use the org-cook >> features. It was kind of a proof of concept, and I think it could >> prove useful, but it turns out I don't often need to convert between >> units. >> >> I have been trying out the format described in [1]. I used to use a >> format like: >> >> Grate zest from 3 of them. Combine. Add: >> - 2 tbsp peanut oil >> - 2 chicken bouillon cubes, crumbled >> - 5 onions, thinly julienned >> - salt and pepper >> >> But the new one looks like: >> >> Grate zest from 3 of them. Combine. Add: >> | 2 tbsp | peanut oil | | >> | 2 cubes | chicken bouillon | crumbled | >> | 5 | onions, | thinly julienned | >> | | salt and pepper | | >> >> I think the table structure should make it easier to manipulate, >> change units, or create shopping lists. (But I create shopping lists >> by hand.) >> >> One hack I do use is the following function: >> >> (defun org-random-element () >> "Choose a random element from the buffer." >> (interactive) >> (let ((element-start -1) >> (count 1)) >> (while (not (org-first-sibling-p)) >> (org-goto-sibling t)) >> (save-excursion >> (while (org-goto-sibling) >> (setq count (+ 1 count)))) >> (org-forward-heading-same-level (random count)))) >> >> This chooses a random element from a list of headings. I use this to >> plan meals. I just keep running the function until I see something >> that I feel like cooking. >> >> Hope that helps! >> >> best, Erik >> >> 1. >> http://sachachua.com/blog/2012/06/emacs-org-grocery-lists-batch-cooking/ >> >> -- >> Sent from my free software system . >> > > -- Alan L Tyree http://www2.austlii.edu.au/~alan Tel: 04 2748 6206 --047d7bd752a86ad82b04f4a94ff0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Pandoc can pull a web page, convert to Markdown = and then to Org. That doesn't do all you want, but maybe a start.

Cheers,
Alan


<= div class=3D"gmail_quote"> On 16 March 2014 05:03, Xebar Saram <zeltakc@gmail.com> wrot= e:
Thanks so much for the tips Erik

i will= explore the ingredients in table idea as suggested. do you know perhaps of= a way to quick format online recipes to an org table (that is webpage html= to org table) or perhaps a way to convert already entered recipes in my or= g files to tables

kind regards

Z.


On Sat, Mar 15, 2014 at 7:38 PM, Erik Hetzner <egh@e6h.o= rg> wrote:
At Sat, 15 Mar 2014 09:24:23 +0200,
Xebar Saram wrote:
>
> Dear Eric and org users
>
> i am a new(ish) org user and an avid cooker. i have started using
> orgmodeas my recipe notebook and stumbled upon the old org-cook<= br>
> thread.
> Is there so documentation on this? do you still use it?
> are there any other ideas/suggestions on using orgmode as a recipe not= ebook?
> what i would mainly love is a way to "scrape" recipes off we= bsites into org

Hi Xebar,

I still use org to manage my recipes, but I don’t use the org-cook features. It was kind of a proof of concept, and I think it could
prove useful, but it turns out I don’t often need to convert between<= br> units.

I have been trying out the format described in [1]. I used to use a
format like:

  Grate zest from 3 of them. Combine. Add:
  - 2 tbsp peanut oil
  - 2 chicken bouillon cubes, crumbled
  - 5 onions, thinly julienned
  - salt and pepper

But the new one looks like:

  Grate zest from 3 of them. Combine. Add:
  | 2 tbsp  | peanut oil       |     &nb= sp;            |
  | 2 cubes | chicken bouillon | crumbled         = |
  | 5       | onions,          = ;| thinly julienned |
  |         | salt and pepper  |    = ;              |

I think the table structure should make it easier to manipulate,
change units, or create shopping lists. (But I create shopping lists
by hand.)

One hack I do use is the following function:

(defun org-random-element ()
  "Choose a random element from the buffer."
  (interactive)
  (let ((element-start -1)
        (count 1))
    (while (not (org-first-sibling-p))
      (org-goto-sibling t))
    (save-excursion
      (while (org-goto-sibling)
              (setq count (+ 1 count))))=
    (org-forward-heading-same-level (random count))))

This chooses a random element from a list of headings. I use this to
plan meals. I just keep running the function until I see something
that I feel like cooking.

Hope that helps!

best, Erik

1. http://sachachua.com/blog/2012/06/emacs-org-= grocery-lists-batch-cooking/

--
Sent from my free software system <http://fsf.org/>.




--
Alan L Tyre= e                    http://www2.aust= lii.edu.au/~alan
Tel:  04 2748 6206
--047d7bd752a86ad82b04f4a94ff0--