taw / magic-preconstructed-decks

Magic: the Gathering Preconstructed Decks
7 stars 10 forks source link

Threre is a colon in a deck name #84

Closed 8ullyMaguire closed 11 months ago

8ullyMaguire commented 11 months ago

In order to enable downloading everything at once, it is necessary to filter out forbidden characters from deck names.

The following characters are forbidden:

I'm doing something like this when converting from .json to .dck:

FORBIDDEN_CHARS = ['<', '>', ':', '"', '/', '\\', '|', '?', '*']

def clean_deck_name(name)
  name.downcase.gsub(' ', '_').delete(FORBIDDEN_CHARS.join)
end
8ullyMaguire commented 11 months ago

Although this is not really something I want, just an observation.

magreenblatt commented 11 months ago

Please also rename the file that currently contains a colon.

Checking out that file fails on Windows with:

error: invalid path 'data/cmd/pagl/Angels: They're Just Like Us but Cooler and with Wings.txt'

The workaround is to run git config core.protectNTFS false first (or git clone -c core.protectNTFS=false <repo_url> for a new checkout), however that file is then deleted in the local checkout:

Changes not staged for commit:
        deleted:    data/cmd/pagl/Angels: They're Just Like Us but Cooler and with Wings.txt
taw commented 11 months ago

Yeah, I can change it.

taw commented 11 months ago

I renamed that one file. Are there any other problematic files?

magreenblatt commented 11 months ago

Just the one, thanks.On Nov 3, 2023, at 08:46, Tomasz Wegrzanowski @.***> wrote: I renamed that one file. Are there any other problematic files?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

taw commented 11 months ago

OK, closing it as done then.