mrichards42 / xword

Cross-platform crossword solving
https://mrichards42.github.io/xword/
GNU General Public License v3.0
42 stars 13 forks source link

Can't add downloader sources #197

Open fncll opened 1 year ago

fncll commented 1 year ago

No matter what I do, when I hit OK after creating a new downloader source, nothing happens. No new entry appears in the list. It's as if I am canceling the operation, but I am not!

mrichards42 commented 1 year ago

Yes, apologies the downloader config is kind of a mess right now, and I'm thinking about simplifying how sources are configured so a lot of that will change when I make the time for it.

In the mean time if you're up for hand-editing some files, I am pretty sure this will work:

  1. Make sure the config directory actually exists -- or if you want to grab a recent unreleased build, this problem is fixed (builds are on appveyor, click on a build number, find the appropriate job, and look at the artifacts tab)
  2. Edit the config/download/config.lua file in the XWord config directory (see the linked issue for where that is)

    return {
      -- ... lots of stuff above this ...
      -- find the `added` section and add a source like so:
      added = {
        {
          id = "Example Source",
          name = "Example Source",
          filename = "example%Y%m%d.puz",
          url = "https://www.example.com/puzzles/%m%d%Y.puz",
          -- monday - sunday
          days = { true, true, true, true, true, true, true, },
        },
      },
      -- You might also have to add the `id` to the `order` section
      order = {
        -- existing puzzles . . .
        "Newsday",
        "LA Times",
        "USA Today",
        "Jonesin'",
        -- the new source
        "Example Source",
      },
      -- ... lots of stuff below this ...
    }

    You could also try copy/pasting one of the default sources into the added section and editing it.