Skip to main content

python3-aigc2md

PyPI-python3-aigc2md

convert AIGC to hugo markdown, current only support OpenWebUI API 将 AIGC 生产的内容转化为 hugo markdown 格式,当前仅支持调用 OpenWebUI API

How to Use by Github Actions

    - name: convert AIGC to hugo markdown
      uses: x-actions/python3-aigc2md@v1
      env:
        OPEN_WEBUI_JWT: "<JWT>"
        LOG_LEVEL: "DEBUG"

use as cli

$ pip install python3-aigc2md

$ aigc2md --help
usage: aigc2md [--version] [--debug] <subcommand> ...

Command-line interface for convert AIGC to hugo markdown.

Positional arguments:
  <subcommand>
    chats          chats actions.
    render         render actions.
    users          list users.
    bash-completion
                   Prints all of the commands and options to stdout so that the aigc2md.bash_completion script
                   doesn't have to hard code them.
    help           Display help about this program or one of its subcommands.

Options:
  --version        show program's version number and exit
  --debug          Print debugging output.

See "aigc2md help COMMAND" for help on a specific command.

$ aigc2md users
+--------------------------------------+--------+---------------------+---------+------------------------------------------------+------------+----------------+
|                  ID                  |  name  |        email        |   role  |                     system                     | created_at | last_active_at |
+--------------------------------------+--------+---------------------+---------+------------------------------------------------+------------+----------------+
| a856afee-389e-4fc2-9431-dbac432912a1 | 谢先斌 |   me@xiexianbin.cn  |  admin  | 使用中文回答,除代码和专用名词外尽量不使用英文 | 2024-08-11 09:35:00 |   2024-08-11 09:35:00   |
+--------------------------------------+--------+---------------------+---------+------------------------------------------------+------------+----------------+

$ aigc2md chats
+--------------------------------------+---------------------------------+---------------------+---------------------+
|                  ID                  |              title              |      updated_at     |      created_at     |
+--------------------------------------+---------------------------------+---------------------+---------------------+
| ef0bdafc-045c-41eb-aba5-c841e31c2fd8 |          😊 简单问候语          | 2024-09-16 17:20:27 | 2024-09-16 17:20:19 |
+--------------------------------------+---------------------------------+---------------------+---------------------+

$ aigc2md render --id cab178a2-ba80-4008-a72d-1eb41c21e6c4
Lama3.1介绍一下 render to /Users/xiexianbin/workspace/code/github.com/x-actions/aigc2md-python/output/Lama3.1介绍一下.md ...

Dev and Test

  • local run
# create venv
python3 -m venv .venv
source .venv/bin/activate

# install
pip3 install -r requirements.txt

# set env
export OPEN_WEBUI_JWT="<JWT>"

# dev
export PYTHONPATH=$PYTHONPATH:$(pwd)
python3 aigc2md/shell.py --help
python3 aigc2md/shell.py help xxx
  • tests
python3 -m unittest aigc2md.tests.unit.test_http.HTTPTestCase.test_http_get

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python3_aigc2md-0.2.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python3_aigc2md-0.2.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file python3_aigc2md-0.2.0.tar.gz.

File metadata

  • Download URL: python3_aigc2md-0.2.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for python3_aigc2md-0.2.0.tar.gz
Algorithm Hash digest
SHA256 23b6c6df9480b418e9d5e61315051e1307696e28c2da1512c6b45d073180e6a0
MD5 ff729759902e8f6879a2f8cc7fbbdf3a
BLAKE2b-256 f830c2e0b1d05ec1e801d044f23be885d8a9545a595255420468f6dc1c83c444

See more details on using hashes here.

File details

Details for the file python3_aigc2md-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_aigc2md-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 627b8bda3f5323c471659a4f1ae0cb4918e6f8b0e4b9c320e7651932e3010b1c
MD5 74ac4403ebccd88c433c2aea899f5c40
BLAKE2b-256 ffcb5720dabc761f572e7a3c7713cf933c868a3c2415236b4daf5a5b8eb73155

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page