Code Monkey home page Code Monkey logo

danmakuc's Introduction

Hi there, I'm HFrost0 👋

  • 🔭 I'm currently working as a Software Developer.
  • 🌱 I'm deeply interested in Machine Learning.
  • 💬 Happy to discuss anything related to Engineering, ML, or tech in general.

danmakuc's People

Contributors

hfrost0 avatar qbnu avatar yzqzss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

danmakuc's Issues

filter支持多条的正则表达式

原有的filter参数仅支持单条正则表达式, 向下兼容可以考虑使用\n分割的多条正则表达式, 不考虑兼容的话传字符串数组也行

google.protobuf.message.DecodeError: Error parsing message

Windows 10,python 3.10,danmukuC 0.22

无法处理任何弹幕文件,提示错误

danmakuC .\[SweetSub]_Do_It_Yourself___-_02_[WebRip][1080P][AVC_8bit][CHS].xml -o 1.ass
Traceback (most recent call last):
  File "runpy.py", line 196, in _run_module_as_main
  File "runpy.py", line 86, in _run_code
  File "C:\Users\volks\Downloads\mpv\Scripts\danmakuC.exe\__main__.py", line 7, in <module>
  File "C:\Users\volks\Downloads\mpv\lib\site-packages\danmakuC\__main__.py", line 61, in main
    output = proto2ass(
  File "C:\Users\volks\Downloads\mpv\lib\site-packages\danmakuC\bilibili.py", line 25, in proto2ass
    target.ParseFromString(proto_bytes)
google.protobuf.message.DecodeError: Error parsing message

FR: 去除重复的弹幕

对于一些热门番剧, 大量的重复弹幕影响观感, 可以添加一个选项, 使用std::unordered_map<std::string, unsigned int>统计重复弹幕, 并在重复弹幕的第一条后加上 x%d, 或者不统计直接丢弃重复弹幕

正则表达式对utf-8处理有问题

platform: Windows

from danmakuC.ass import Ass
import re

regex = '[人12a34b]'
text = '从'

print(re.search(regex, text))
# None
ass = Ass(1920, 1080, 0, 'sans-serif', 25, 1, 5, 5, regex, False)
print(ass.add_comment(0, 0, text, 25, 0, 0xffffff))
# False

re模块未匹配, 但add_comment里被过滤了, 可能是的utf-8为b'\xe4\xba\xba', b'\xe4\xbb\x8e', []内被按字节匹配了

报错Library not loaded: /opt/homebrew/opt/fmt/lib/libfmt.9.dylib

Traceback (most recent call last):
  File "/Users/whitewater/miniconda3/bin/bilix", line 5, in <module>
    from bilix.__main__ import main
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/bilix/__init__.py", line 1, in <module>
    from .download import *
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/bilix/download/__init__.py", line 5, in <module>
    from .downloader_bilibili import DownloaderBilibili
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/bilix/download/downloader_bilibili.py", line 9, in <module>
    import bilix.api.bilibili as api
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/bilix/api/bilibili.py", line 8, in <module>
    from danmakuC.bilibili import parse_view
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/danmakuC/__init__.py", line 6, in <module>
    from . import bilibili, niconico
  File "/Users/whitewater/miniconda3/lib/python3.10/site-packages/danmakuC/bilibili.py", line 3, in <module>
    from ._c.ass import Ass
ImportError: dlopen(/Users/whitewater/miniconda3/lib/python3.10/site-packages/danmakuC/_c/ass.cpython-310-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/fmt/lib/libfmt.9.dylib
 Referenced from: <5A0345A5-2999-38C9-AE6E-DEA86B6F46FD> /Users/whitewater/miniconda3/lib/python3.10/site-packages/danmakuC/_c/ass.cpython-310-darwin.so
  Reason: tried: '/opt/homebrew/opt/fmt/lib/libfmt.9.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/fmt/lib/libfmt.9.dylib' (no such file), '/opt/homebrew/opt/fmt/lib/libfmt.9.dylib' (no such file), '/usr/local/lib/libfmt.9.dylib' (no such file), '/usr/lib/libfmt.9.dylib' (no such file, not in dyld cache)
(base) whitewater@MadBookAir ~ %

refer to these content to reinstall libtool and libffi via brew, still report the same error
参考这些内容用brew重装了libtool和libffi,还是一样报错

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.