semvec/pypi-packages huggingface dataset:
qq-chat-history 1.1.7
A tool to extract QQ chat history.
License: MIT
Requires Python: >=3.9,<4.0

# QQ 聊天记录提取器

## 简介

从 QQ 聊天记录文件中提取聊天信息，仅支持 `txt` 格式的聊天记录。


## 安装

使用 `pip` 安装，要求 `Python 3.9` 或以上版本。

```bash
> pip install -U qq-chat-history
```

## 使用

最简单的启动方式如下，它会自动在当前目录下创建 `output.json` 进行输出（如果安装到虚拟环境请确保已激活）。

```bash
> qq-chat-history /path/to/file.txt
```

启动时输入 `--help` 参数查看更多配置项。

```bash
> qq-chat-history --help
```

或者，可以作为一个第三方库使用，如下：

```python
import qq_chat_history

lines = '''
=========
假装我是 QQ 自动生成的文件头
=========

1883-03-07 11:22:33 A<someone@example.com>
Text A1
Text A2

1883-03-07 12:34:56 B(123123)
Text B

1883-03-07 13:24:36 C(456456)
Text C

1883-03-07 22:00:51 A<someone@example.com>
Text D
'''.strip().splitlines()

# 这里的 lines 也可以是文件对象或者以字符串或者 Path 对象表示的文件路径。
for msg in qq_chat_history.parse(lines):
    print(msg.date, msg.id, msg.name, msg.content)
```

注意 `parse` 方法返回的是一个 `Body` 对象，一般以 `Iterable[Message]` 的形式使用。当然 `Body` 也提供了几个函数，~虽然一般也没什么用~。

## Tips

+ 如果当作一个第三方库来用，例如 `find_xxx` 方法，可以从数据中查找指定 `id` 或 `name` 的消息；`save` 方法可以将数据以 `yaml` 或 `json` 格式保存到文件中，虽然这个工作一般都直接以 `CLI` 模式启动来完成。

+ 函数 `parse` 可以处理多样的类型。

  + `Iterable[str]`：迭代每行的可迭代对象，如 `list` 或 `tuple` 等。
  + `TextIOBase`：文本文件对象，如用 `open` 打开的文本文件，或者 `io.StringIO` 都属于文本文件对象。
  + `str`, `Path`：文件路径，如 `./data.txt`。

  这些参数都将以对应的方法来构造 `Body` 对象。
conda-xdgpatch 0.2
Patch for conda to use XDG-locations.
License: MIT
Requires Python: >=3.8.0,<4.0
Keywords: conda,xdg,sitecustomize

[![Testing](https://img.shields.io/github/actions/workflow/status/libranet/conda-xdgpatch/testing.yaml?branch=main&longCache=true&style=flat-square&label=tests&logo=GitHub%20Actions&logoColor=fff")](https://github.com/libranet/conda-xdgpatch/actions/workflows/testing.yaml)
[![Read the Docs](https://readthedocs.org/projects/conda-xdgpatch/badge/?version=latest)](https://conda-xdgpatch.readthedocs.io/en/latest/)
[![PyPi Package](https://img.shields.io/pypi/v/conda-xdgpatch?color=%2334D058&label=pypi%20package)](https://pypi.org/project/conda-xdgpatch/)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/conda-xdgpatch/blob/main/docs/license.md)



## Installation

On your base conda-installation, install via pip:

```bash
> cd /opt/tools/conda
> bin/pip install conda-xdgpatch
```



## Usage

Just use conda to create conda-environments.


## Registered sitecustomize-entrypoint

The ``conda_xdgpatch.patch``-function is registered as a ``sitecustomize``-entrypoint in our pyproject.toml_:

``` toml
    [tool.poetry.plugins]
    [tool.poetry.plugins."sitecustomize"]
    conda_xdgpatch = "conda_xdgpatch:patch"
```

Sitecustomize and all its registered entrypoints will be executed at the start of *every* python-process.
For more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)


## Compatibility

 [![Python Version](https://img.shields.io/pypi/pyversions/conda-xdgpatch?:alt:PyPI-PythonVersion)](https://pypi.org/project/conda-xdgpatch/)
 [![PyPI - Implementation](https://img.shields.io/pypi/implementation/conda-xdgpatch?:alt:PyPI-Implementation)](https://pypi.org/project/conda-xdgpatch/)

``conda-xdgpatch``  works on Python 3.8+, including PyPy3. Tested until Python 3.11,


## Notable dependencies

- [conda](http://pypi.python.org/pypi/conda
- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)
flake8-import-relative-two 0.2.0
Flake8 plugin that checks for relative imports up to a maximum of level two
License: MIT
Requires Python: >=3.10,<4.0
Keywords: flake8-plugin,linting,absolute-imports,relative-imports

# flake8-import-relative-two
============================
*Flake8 plugin that checks for relative imports up to a maximum of level two*

**Current Development Version:**

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bartoszcholewa/flake8-import-relative-two/ci_tests.yml?branch=main&logo=github)](https://github.com/bartoszcholewa/flake8-import-relative-two/actions)
[![codecov](https://codecov.io/gh/bartoszcholewa/flake8-import-relative-two/graph/badge.svg?token=RQ7LU60OYQ)](https://codecov.io/gh/bartoszcholewa/flake8-import-relative-two)

**Most Recent Stable Release:**

[![pypi](https://img.shields.io/pypi/v/flake8-import-relative-two.svg?logo=pypi)](https://pypi.org/project/flake8-import-relative-two)
![pypi](https://img.shields.io/pypi/pyversions/flake8-import-relative-two.svg?logo=python)

**Info:**

[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/bartoszcholewa/flake8-import-relative-two/blob/stable/LICENSE.txt)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Downloads](https://pepy.tech/badge/flake8-import-relative-two/month)](https://pepy.tech/project/flake8-import-relative-two)

----

Plugin created for linting relative imports up to a maximum of level two.
One of private projects I work on has a rule that forbids relative imports deeper than two levels and need to be converted to absolute imports.

Plugin created based on [flake8-absolute-import](https://github.com/bskinn/flake8-absolute-import) by Brian Skinn,
with help from [youtube video](https://www.youtube.com/watch?v=ot5Z4KQPBL8&t=926s&ab_channel=anthonywritescode)


`flake8-import-relative-two` uses a direct check of the AST for each
`from ...x import y` statement to flag relative imports deeper than two levels.

Relative imports raise the ``IRT1`` error code:

```python
from foo import bar   # OK
from .foo import bar   # OK
from ..foo import bar   # OK
from ...foo import bar  # IRT1
```


Available on [PyPI](https://pypi.python.org/pypi/flake8-import-relative-two)(`pip install flake8-import-relative-two`).

`flake8` should automatically detect and load the plugin.

`flake8`>=6.0 is required.

Source on [GitHub](https://github.com/bartoszcholewa/flake8-import-relative-two)

Bug reports and feature requests are welcomed at the [Issues](https://github.com/bartoszcholewa/flake8-import-relative-two/issues) page there.

Copyright (c) Bartosz Cholewa 2023

The `lake8-import-relative-two` documentation (including docstrings and README) is licensed under a
[Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/) (CC-BY).

The `lake8-import-relative-two` codebase is released under the [MIT License](https://opensource.org/licenses/MIT). See
[LICENSE.txt](https://github.com/bartoszcholewa/flake8-import-relative-two/blob/main/LICENSE.txt) for
full license terms.