Giter VIP home page Giter VIP logo

ass_tag_parser's Issues

Don't raise an exception, simply have a class for unknow tag

Currently, ass_tag_parser can't parse VSFilterMod tag which is totally ok, because they have they are useless.

But, it would be better if it could not raise an exception. It should simply have a class for unknowtag.

Here is the code I have:

result = parse_ass(
    r"{\fnJester\fsc20}test"
)
print(result)

What it currently does:
ass_tag_parser.errors.BadAssTagArgument: syntax error at pos 16: \fs requires an integer

What it could do:
[AssTagListOpening(), AssTagFontName(name='Jester'), AssUnknowTag(text=fsc20), AssTagListEnding(), AssText(text='test')]

This package cannot be installed on non-English windows systems

PS C:\xxx> pip install ass-tag-parser
Collecting ass-tag-parser
  Using cached https://xxx/ass_tag_parser-2.3.tar.gz (16 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-1s17sz2y\\ass-tag-parser\\setup.py'"'"'; __file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-1s17sz2y\\ass-tag-parser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\xxx\AppData\Local\Temp\pip-pip-egg-info-7kr7ks__'
         cwd: C:\Users\xxx\AppData\Local\Temp\pip-install-1s17sz2y\ass-tag-parser\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\xxx\AppData\Local\Temp\pip-install-1s17sz2y\ass-tag-parser\setup.py", line 11, in <module>
        long_description=(Path(__file__).parent / "README.md").read_text(),
      File "c:\python38\lib\pathlib.py", line 1236, in read_text
        return f.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 601: illegal multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

There are different default encodings in these operating systems (for open etc.)

\fs should accept float number

Currently, if we do parse_ass(r"{\fs146.38}example"), it will print: ass_tag_parser.errors.BadAssTagArgument: syntax error at pos 10: \fs requires an integer

\fs can handle float number, so we should not be limited to integer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.