معرفی شرکت ها


ansipants-0.2


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Convert ANSI art to HTML
ویژگی مقدار
سیستم عامل -
نام فایل ansipants-0.2
نام ansipants
نسخه کتابخانه 0.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Matt Westcott
ایمیل نویسنده matthew@west.co.tt
آدرس صفحه اصلی https://github.com/demozoo/ansipants/
آدرس اینترنتی https://pypi.org/project/ansipants/
مجوز BSD
# ansipants A Python module and command-line utility for converting .ANS format ANSI art to HTML. ## Installation pip install ansipants ## Command-line usage python -m ansipants input.ans > output.html For additional options, run `python -m ansipants --help`. The output is a fragment of HTML, in UTF-8 encoding, intended to be inserted into a preformatted text element (`<pre>...</pre>`). Further styling is up to you - for the proper MS-DOS experience, [The Ultimate Oldschool PC Font Pack by VileR](https://int10h.org/oldschool-pc-fonts/) is recommended. ## Python API Example code: ```python from ansipants import ANSIDecoder with open('input.ans', 'rt', encoding='cp437') as f: decoder = ANSIDecoder(f) print(decoder.as_html()) ``` class **ansipants.ANSIDecoder**_(stream=None, palette='vga', width=80, strict=False)_ Parameters: * `stream` - the ANSI input data as a file-like object. This should be opened for reading in text mode, which means you'll need to specify the appropriate encoding - for ANSI art created for DOS this will most likely be `cp437`. * `palette` - the colour palette to use; either `'vga'` or `'workbench'` * `width` - the number of columns the text should wrap at * `strict` - If True, the decoder will raise an `ansipants.ANSIDecodeError` exception on any unrecognised or malformed escape codes; if False, it will skip past them. **ANSIDecoder.as_html**_()_ Returns the HTML output as a string. **ANSIDecoder.as_html_lines**_()_ Returns the HTML output as an iterator, yielding one line at a time. ## Author Matt Westcott matt@west.co.tt


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl ansipants-0.2:

    pip install ansipants-0.2.whl


نصب پکیج tar.gz ansipants-0.2:

    pip install ansipants-0.2.tar.gz