Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Mass Import Web URL #1007

Open
RLChristof opened this issue Oct 3, 2020 · 1 comment
Open

[Request] Mass Import Web URL #1007

RLChristof opened this issue Oct 3, 2020 · 1 comment

Comments

@RLChristof
Copy link

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

@cydanil
Copy link
Contributor

cydanil commented Oct 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants