thinkle / gourmet

Gourmet Recipe Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Request] Mass Import Web URL

RLChristof opened this issue · comments

Requesting that the Import function be altered slightly to allow more than one recipe at a time to be imported.

It's a nice idea.
This would requires changes to ImportManager.offer_web_import where the method could be updated so:

  def offer_web_import(self, parent: Gtk.Window = None) -> None:
        """Offer to import URLs.

        Once a page is downloaded, it can be treated by any of our
        normal plugins for acting on files, or by special web-aware
        plugins.
        """
        sublabel = _('Enter URLs of recipes archive or website.')
        urls = de.getEntry(label=_('Enter website addresses'),
                           sublabel=sublabel,
                           entryLabel=_('Enter URLs:'),
                           entryTip=_('Enter the addresses of recipes, one per line.'),
                           default_character_width=60)
        if urls is None:
            return

       urls = urls.split('\n')
       for url in urls:
           self.import_url(url)

gourmet.gtk_extra.dialog_extras.getEntry may have to be modified or subclassed to show a bigger input field, where urls are entered one per line.