semvec/pypi-packages huggingface dataset:
dimentyy.tl-parse 0.0.1.dev5
Better parsing modes for telethon.TelegramClient

# Parsing library

### Absolute bloatware. 🚀

```python
from telethon import TelegramClient
from dimentyy.tl.parse import HTML

client: TelegramClient = ...

client.parse_mode = HTML(client)  # two ways of applying
parser = HTML.applied_to(client)  # preferred

# From now on, every message will be handled by the 
# new parser. It resembles default "HTML", but with
# some new features such as mentions and spoilers!
```

### Installation

```shell
pip install dimentyy.tl-parse
```

---

- ### Correct offset & length
Text formatting won't be offset! Using `len()` will actually result in the wrong length if the text contains some specific Unicode characters, such as some emojis.

- ### Mentions
```html
<!-- Telethon version, a little unreadable, right? -->
<a href="tg://user?id=490288812">dimentyy</a>

<!-- Uses real mention without replacing <a> when sending -->
<mention user_id=490288812>dimentyy</mention>
```

- ### Spoilers
```html
<spoiler>I will never update burger-bot</spoiler>

<!-- Consistent name -->
```
- `<custom_emoji document_id=123></custom_emoji>` _(needs testing!)_

### Features to come:
- Unparsing
- Fixing improper entities order _(testing)_
```html
<!-- Some clients will display that incorrectly, event -->
<b>BOLD. <i>BOTH.</b> ITALIC.</i> <!-- Even GitHub won't highlight </i> -->

<!-- So, this feature will fix that -->
<b>BOLD. <i>BOTH.</i></b><i> ITALIC.</i>
```

###### MIT license.
cicc-excel 0.4.1
Library of export pandas into excel for CICCers

## Install

`pip install cicc_excel`

## How to Use

```python
from cicc_excel.excelwriter import ExcelWriter

# create new writer
# default font is 宋体, Arial, Times New Roman
# to setup a percentage column, put a % in column name
# default col width will adjust by font_size
wb = ExcelWriter('export_file_name.xlsx', ch_font="中文字体", num_font="Number Font", en_font="English Font", first_row_color='#EEECE1', first_row_height=20, font_size=10)

#load data into writer in pandas dataframe
wb.load_data(df)

#set highlight columns by name
#color in #FFFFFF format
wb.set_hl_col_by_names('col_name', 'sheet_name', 'background_color', 'color')
wb.set_hl_col_by_names('col_name2', 'sheet_name', 'background_color2', 'color2')
#write dataframe to xlsx file
wb.write_data('sheet_name')

#hide cols
wb.hide_col(5,12,'sheet_name')

#collapse cols (have a + on top)
wb.collapse_col(5,12,'sheet_name')

#freeze cell
wb.freeze(1,4, 'sheet_name')

#set hightlight columns for another sheet
#default background color is yellow
wb.load_data(df2)
wb.set_hl_col_by_names('col_name', 'another_sheet_name')
wb.write_data('another_sheet_name')

#another sheet
wb.load_data(df3)
wb.write_data('last_sheet_name')

#save file
wb.save()
```