Skip to content

Conversation

@m4rc1e
Copy link
Collaborator

@m4rc1e m4rc1e commented Nov 15, 2023

This PR allows users to use a file containing a regex string to filter out characters.

@madig could you please test this (don't have a win machine to hand)? Here's you test string with the required mods.

[!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\\\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}~ ¡¢£¥§¨©ª«®¯°²³´·¸¹º»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĊċČčĎďĐđĒēĖėĘęĚěĞğĠġĢģĦħĪīĮįİıIJijĶķĹĺĻļĽľĿŁłŃńŅņŇňŊŋŌōŐőŒœŔŕŖŗŘřŚśŞşŠšŢţŤťŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžǍȘșȚțȷˆˇ˘˙˚˛˜˝]

Fixes #88

@m4rc1e
Copy link
Collaborator Author

m4rc1e commented Nov 21, 2023

@madig still interested in this?

@madig
Copy link

madig commented Nov 21, 2023

Sorry, I dropped off of GitHub recently.

Something's not going as planned when I paste the string above into a file:

❯ poetry run diffenator2 diff --fonts-before ../bla.ttf --fonts-after ../blaa.ttf --characters-file a
ninja: error: build.ninja:27: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:29: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:28: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:29: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:29: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:29: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:28: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:28: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:30: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:29: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:27: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:28: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:28: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
ninja: error: build.ninja:27: bad $-escape (literal $ must be written as $$)
      [!"#$%&'\(\)*+,-.\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'\[\...
          ^ near here
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/nikolaus/diffenator2/src/diffenator2/__main__.py", line 100, in main
    build_index_page(args.out)
  File "/home/nikolaus/diffenator2/src/diffenator2/html.py", line 178, in build_index_page
    assert len(html_files) > 0, f"No html docs found in {fp}."
AssertionError: No html docs found in out.

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

Successfully merging this pull request may close these issues.

Support --characters from a file

2 participants