Skip to main content

A simlpe tool for Tujian

Project description

Tu

Build Status PyPI - Downloads PyPI

一个使用 Python3 编写的 Tujian 的简易工具。
One Each Make use Python3 Make up write of Tujian of simple easy work With.

图片保存于当前目录下的 Tujian 文件夹。
Figure sheet Guarantee Save to when before Head record under of Tujian Text Pieces folder.

如果你无法理解,你可以使用 PyTujian path 来打印存储图片的路径。
Such as fruit you no law Reason solution, you can To Make use PyTujian path Come hit Seal Save Store Figure sheet of road path.

请使用 Python3 运行此工具。
please Make use Python3 Transport Row this work With.

此工具仅支持简体中文。
this work With only support ** hold simple body in Text **.

如何使用 Usage

pip3 instal PyTujian
PyTujian

获取图片 Get Pictures

使用 PyTujian today 来获取当日图片,
使用 PyTujian all 来获取所有图片,
使用 PyTujian get <PID> 来获取指定图片,
使用 PyTujian archive <TID> 来获得指定分类下的图片归档(不含当日图片).

TID 可使用 PyTujian sort 来获取,
PID 为图片的 UUID.

保存的图片命名格式如下:

日期-分类名_标题_PID.发布者.jpeg

查询信息 Inqire

使用 PyTujian info <PID> 来查询单张图片的详细信息.
PID 为图片的 UUID.

投稿 Submission

使用以下命令来进行投稿:

PyTujian upload xxx.yml

需要提供参数: 一个 YAML 文件

YAML 文件

YAML 是什么请自行百度

此处提供一个完整的示例文件:

name: xxxx
mail: xxx@xx.xx
pics:
  - title: 示例图片1
    sort: e5771003-b4ed-11e8-a8ea-0202761b0892
    content: |-
      示例图片1
    path: F:\Pictures\001.png
  - title: 示例图片2
    sort: e5771003-b4ed-11e8-a8ea-0202761b0892
    content: |-
      示例图片2
    link: http://example.com/001.png

用户数据 Profile

作为投稿者,你需要提供你的部分信息:

name: 你的昵称
mail: 你的邮箱地址

图片 Pictures

作为投稿者,你需要提供需投稿的图片.

所有的图片作为一个 list:

pics:
  - title: 示例图片1
    sort: e5771003-b4ed-11e8-a8ea-0202761b0892
    content: |-
      示例图片1
    path: F:\Pictures\001.png
  - title: 示例图片2
    sort: e5771003-b4ed-11e8-a8ea-0202761b0892
    content: |-
      示例图片2
    path: http://example.com/001.png

对于单张图片:

  - title: 图片名称
    sort: 图片分类 TID
    content: |-
      图片简介
      图片简介
      图片简介
    path: 图片本地地址
    link: 图片网络地址

TID 可使用 PyTujian sort 来获取.

pathlink 仅需提供其中一个,

如果使用单行的 content ,仅需这样:

    ...
    content: 图片简介
    ...

如果使用多行的 content ,请这样:

    ...
    content: |-
      图片简介
      图片简介
      图片简介
    ...

其他 Others

没有更多了

Project details


Download files

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

Source Distribution

PyTujian-0.0.47.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

PyTujian-0.0.47-py3.7.egg (20.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page