韩国博客平台Tistory最简单的命令行工具

tistory-cli的Python项目详细描述


Tistory-CLI

A command line tool for Tistory, the Korean blogging platform. It conveys Markdown files to your Tistory blog.

This project is currently in alpha stage and supports the minimal features: To post an article. It supports Linux only.

是为了韩国Tistory使用者的工具,以后用韩文说明。

Dependencies

为了

Linux Secret Storage功能,需要以下包装。

  • libsecret
  • gnome-keyring

大部分的Linux分发板都基本安装了。Arch Linux的情况是gnome-keyring是基本的,所以要单独安装。

Installation

通过

pip可轻松安装。在系统环境或所需的虚拟环境中

$ pip install tistory-cli
如果想在

或源直接安装(果然在自己想要的环境下)

$ git clone https://github.com/dgkim5360/tistory-cli-python.git
$ cd tistory-cli-python
$ python setup.py install

Features and Non-features

    使用
  • 本人的client/secret key直接登录,不会给外部服务留下秘密信息。
  • 不保存
  • 源代码、环境变量等crediential,保存在{a1}中。
  • Git commit message风格区分题目/内容,制作Markdown文件,在Tistory上传非公开文章。
  • 类别和slug可以设置。
  • 上传
  • 公开文字不做
  • 上传
  • 图片不做
  • 添加
  • 标签不做

Oauth Setting

  1. Tistory-gt;导游-gt;开放API导游-gt;客户端注册
  2. Callback路径设定为http://localhost:8888(想要基本值,其他端口时.redirect-uri文件中的相应地址一致),完成客户端注册。
  3. tistory login运行后(可能要求OS账户密码),将要登录的页面上传到控制台上。
  4. 通过
  5. 浏览器进入该地址,登录Tistory获得API代币。
  6. 如果在《li》控制台上出现以下内容,登录就会结束。

Usage

$ tistory
USAGE:
    tistory login
    tistory logout
    tistory purge

    tistory category <blog_name>
    tistory post <blog_name> <category_id> <file_path>
  • tistory login:确认所有的秘密信息,如果没有就登录。
  • tistory logout:只删除Access token。
  • tistory purge:删除所有的秘密信息。
  • tistory category:接收该博客的类别信息。
  • tistory post:读取文件上传到相应的博客和分类中。

Step-by-step Tutorial

    登录
  1. 通过
  2. ^{}确认本人博客的分类ID。
$ tistory category dgkim5360
ID      Name
--      ----
880607  HTML+CSS
880608  Django
886608  Bootstrap
892553  Python
892554  Javascript
894029  GNU-Linux
896354  뻘글
897315  Cloud
907471  etc
908711  Front-end
912687  Machine Learning
931755  NBA
933686  Elastic
937655  Flask
951477  Javascript
959045  Travelogue
990157  Rust
  1. ^{}文件像Git commit message一样填写(第一行题目,一行开始内容)。文章内容是按照Markdown的格式来写的。(文件名:^{})
[제목]Hello Tistory!

# Tistory-cli 테스트 중입니다.

아래는 list
* hello
  * tistory
  * bye
* tistory

1. hello
  1. tistory
  1. bye
1. tistory

이것은 [링크](http://dgkim5360.tistory.com)

Inline `code text`도 써봅니다.
  1. ^{}确定后,在Tistory确认。完成任务后,该Markdown文档的文件前会加上Tistory系统的ID值(以下例子中有191)。
$ tistory post dgkim5360 896354 path/to/tistory-cli-test.md

$ ls path/to
191_tistory-cli-test.md
    添加
  1. 所需的图像,添加标签,公开设置在Tistory中解决。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java IntelliJ找不到依赖项选项卡   java向字符串数组string[]添加元素并在Junit中测试结果   如何在eclipse中获取活动java项目的名称   如何使用java在mysql中插入时间   java ArrayList更新了插入一行,但Jtable仍然没有刷新   如何在JavaSwing中命名坐标(点)   java Matcher/模式不打印   java错误地设置了arraylist   使用UsernamePasswordCredential提供程序的java列表Azure AD   java在HTTP请求中设置UTC时间   未加载事件:jquery完整日历Java集成   java Maven插件依赖项无法从内部repo解析依赖项   Maven更新重置Java版本   java如何向中添加图片。带有Apache POI XWPF的docx,但不指定其大小   Java最大函数递归