Importing from an exported HTM(L) file

Asked by Chef Jeffrey on 2014-11-14

I have exported my complete collection at an earlier date. I had to re-install my OS. I forgot to copy the .db file and as result, I have to import my HTM(L) files one at a time. When I do, it shows the complete recipe in one side of the plane (window), in the other, it shows the buttons to change almost every field. My question is why don't these buttons work?

Question information

Language:
English Edit question
Status:
Answered
For:
Gourmet Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Bernhard Reiter (ockham-razor) said : #1

You don't also have an export in Gourmet's XML format, do you? (or any other more recipe specific format than HTML...) That would make importing a whole lot easier, as the HTML importer is targeted towards relatively freely formatted recipes on websites, causing you a lot of extra work here...

As for the HTML importer, Gourmet will try to make a guess at pre-parsing the recipe fields for you, and enclose parts of the imported websites in brackets, allowing you to either change the field that that pre-selected content will go into, or delete that selection altogether using the fat red minus sign next to it, after which you can change the selection as you like, and use the buttons on the right hand side to select the appropriate fields.

Anyway, that is how it is supposed to work; if it doesn't work for you, can you elaborate which behavior you're seeing instead?

Thomas Hinkle (tmhinkle) said : #2

Gourmet's HTML export, though, *is* highly regular. If you're familiar with
any sort of programming, you could probably convert from HTML into gxml
relatively easily (using XSLT or even just a bunch of reg-exp find/replaces
if you wanted to).

All that said, it would be nice if Gourmet imported it's own HTML cleanly.
We *do* have support for plugins that automate importing HTML from certain
websites -- it seems it wouldn't be too hard to add a detector to notice
Gourmet's own exports and then import those well.

I'm not necessarily saying I have time to do this at the moment, but I
might get to it if no one else wants it. If anyone out there is looking for
low-hanging fruit, this would certainly be an easy enough "first project"
for someone looking to learn Gourmet plugins and/or some basic *ml parsing.

Tom

On Sat, Nov 15, 2014 at 6:46 PM, Bernhard Reiter <
<email address hidden>> wrote:

> Question #257526 on Gourmet changed:
> https://answers.launchpad.net/gourmet/+question/257526
>
> Status: Open => Answered
>
> Bernhard Reiter proposed the following answer:
> You don't also have an export in Gourmet's XML format, do you? (or any
> other more recipe specific format than HTML...) That would make
> importing a whole lot easier, as the HTML importer is targeted towards
> relatively freely formatted recipes on websites, causing you a lot of
> extra work here...
>
> As for the HTML importer, Gourmet will try to make a guess at pre-
> parsing the recipe fields for you, and enclose parts of the imported
> websites in brackets, allowing you to either change the field that that
> pre-selected content will go into, or delete that selection altogether
> using the fat red minus sign next to it, after which you can change the
> selection as you like, and use the buttons on the right hand side to
> select the appropriate fields.
>
> Anyway, that is how it is supposed to work; if it doesn't work for you,
> can you elaborate which behavior you're seeing instead?
>
> --
> You received this question notification because you are a member of
> Gourmet Recipe Manager, which is an answer contact for Gourmet.
>

Can you help with this problem?

Provide an answer of your own, or ask Chef Jeffrey for more information if necessary.

To post a message you must log in.