Giter Club home page Giter Club logo

txtstyle's People

Contributors

arjixwastaken avatar armandino avatar armanep avatar jmoudrik avatar konishchevdmitry avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

txtstyle's Issues

Some things are deprecated with python 3.11

FYI

If you use python 3.11 or newer and run $ sudo python setup.py install, you will get the warning:

running install
/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer, pypa/build or
        other standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer, pypa/build or
        other standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  self.initialize_options()
running bdist_egg
running egg_info
writing TxtStyle.egg-info/PKG-INFO
writing dependency_links to TxtStyle.egg-info/dependency_links.txt
writing entry points to TxtStyle.egg-info/entry_points.txt
writing top-level names to TxtStyle.egg-info/top_level.txt
reading manifest file 'TxtStyle.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'tests'
adding license file 'LICENSE.txt'
writing manifest file 'TxtStyle.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/txts.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/txtsconf.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/transformer.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/confparser.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/linestyleprocessor.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/version.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/__init__.py -> build/bdist.linux-x86_64/egg/txtstyle
copying build/lib/txtstyle/palette.py -> build/bdist.linux-x86_64/egg/txtstyle
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/txts.py to txts.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/txtsconf.py to txtsconf.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/transformer.py to transformer.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/confparser.py to confparser.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/linestyleprocessor.py to linestyleprocessor.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/version.py to version.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/__init__.py to __init__.cpython-311.pyc
byte-compiling build/bdist.linux-x86_64/egg/txtstyle/palette.py to palette.cpython-311.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying TxtStyle.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TxtStyle.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TxtStyle.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TxtStyle.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TxtStyle.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/TxtStyle-1.1.2-py3.11.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing TxtStyle-1.1.2-py3.11.egg
Removing /usr/lib/python3.11/site-packages/TxtStyle-1.1.2-py3.11.egg
Copying TxtStyle-1.1.2-py3.11.egg to /usr/lib/python3.11/site-packages
TxtStyle 1.1.2 is already the active version in easy-install.pth
Installing txts script to /usr/bin

Installed /usr/lib/python3.11/site-packages/TxtStyle-1.1.2-py3.11.egg
Processing dependencies for TxtStyle==1.1.2
Finished processing dependencies for TxtStyle==1.1.2

cant run TxtSyle

heare the output from cli

ifconfig | txts -n ifconfig
Traceback (most recent call last):
File "/usr/local/bin/txts", line 33, in
sys.exit(load_entry_point('TxtStyle==1.1.1', 'console_scripts', 'txts')())
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/txts.py", line 163, in main
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/txts.py", line 50, in transform
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/txts.py", line 77, in _transform_pipe
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/txts.py", line 85, in _style
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/transformer.py", line 62, in style
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/linestyleprocessor.py", line 21, in get_style_map
File "/usr/local/lib/python3.6/dist-packages/TxtStyle-1.1.1-py3.6.egg/txtstyle/linestyleprocessor.py", line 59, in find_regions
AttributeError: module 're' has no attribute 'Pattern'

First word cannot be highlighted if any large log file output is much faster than working of txtstyle

My config of Java:

[Style="java"]
white on-green bold: regex("INFO")

There is the large log file in docker container.

When I run docker logs <container name > -f | txts -n java

Every first word "INFO" was not highlighted in some lines, but rest other lines are highlighted when "INFO" is not first word.

Because the output of Docker log is much faster than working of txtstyle.

image

...
INFO: No context init parameter 'facelets.REFRESH_PERIOD' found, using default value '-1'.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'javax.faces.FACELETS_RESOURCE_RESOLVER' found.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'facelets.RESOURCE_RESOLVER' found.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'org.apache.myfaces.MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW' found, using default value 'false'.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'facelets.DECORATORS' found.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'facelets.SKIP_COMMENTS' found.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'org.apache.myfaces.WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE' found, using default value 'true'.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
INFO: No context init parameter 'org.apache.myfaces.CACHE_EL_EXPRESSIONS' found, using default value 'noCache'.
Jul 05, 2022 2:14:05 PM org.apache.myfaces.webapp.WebConfigParamsLogger logWebContextParams
...

When I run cat <log.file> | txts -n java, that is the same as the log, but that works fine.

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.