Socket
Socket
Sign inDemoInstall

tistory-cli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tistory-cli

The simplest command line tool for Tistory, the Korean blogging platform


Maintainers
1

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 SecretStorage ๊ธฐ๋Šฅ์„ ์œ„ํ•ด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํŒจํ‚ค์ง€๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • 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๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ง์ ‘ ๋กœ๊ทธ์ธํ•˜๋ฏ€๋กœ, ์™ธ๋ถ€ ์„œ๋น„์Šค์— ๋น„๋ฐ€ ์ •๋ณด๋ฅผ ๋‚จ๊ธฐ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ์†Œ์Šค์ฝ”๋“œ, ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋“ฑ์— credential๋ฅผ ์ €์žฅํ•˜์ง€ ์•Š๊ณ , ์šด์˜ ์ฒด์ œ ๋ ˆ๋ฒจ์˜ ๋น„๋ฐ€ ์ €์žฅ์†Œ์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
  • Git commit message ์Šคํƒ€์ผ๋กœ ์ œ๋ชฉ/๋‚ด์šฉ ๊ตฌ๋ถ„ํ•ด์„œ Markdown ํŒŒ์ผ์„ ์ž‘์„ฑํ•ด์„œ Tistory์— ๋น„๊ณต๊ฐœ๊ธ€๋กœ ์—…๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.
  • ์นดํ…Œ๊ณ ๋ฆฌ์™€ slug๋Š” ์„ค์ • ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
  • ๊ณต๊ฐœ๊ธ€๋กœ ์—…๋กœ๋“œ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ํƒœ๊ทธ ์ถ”๊ฐ€ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Oauth Setting

  1. Tistory --> ๊ฐ€์ด๋“œ --> ์˜คํ”ˆAPI ๊ฐ€์ด๋“œ --> ํด๋ผ์ด์–ธํŠธ ๋“ฑ๋ก
  2. Callback ๊ฒฝ๋กœ๋ฅผ http://localhost:8888(๊ธฐ๋ณธ๊ฐ’, ๋‹ค๋ฅธ ํฌํŠธ๋ฅผ ์›ํ•  ์‹œ .redirect-uri ํŒŒ์ผ์— ํ•ด๋‹น ์ฃผ์†Œ๋ฅผ ์ผ์น˜ํ•˜๊ฒŒ ์จ ๋†“์œผ๋ฉด ๋จ)๋กœ ์„ค์ •ํ•ด์„œ ํด๋ผ์ด์–ธํŠธ ๋“ฑ๋ก์„ ์™„๋ฃŒํ•ฉ๋‹ˆ๋‹ค.
  3. tistory login ์‹คํ–‰ํ•˜๋ฉด (OS ๊ณ„์ • ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์š”๊ตฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค), ๋กœ๊ทธ์ธํ•  ํŽ˜์ด์ง€๋ฅผ ์ฝ˜์†”์— ๋„์›Œ์ค๋‹ˆ๋‹ค.
  4. ๋ธŒ๋ผ์šฐ์ €๋กœ ํ•ด๋‹น ์ฃผ์†Œ๋กœ ๋“ค์–ด๊ฐ€์„œ Tistory ๋กœ๊ทธ์ธ์„ ํ•ด์„œ API ํ† ํฐ์„ ๋ฐ›์•„์˜ต๋‹ˆ๋‹ค.
  5. ์ฝ˜์†”์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‚˜์˜ค๋ฉด ๋กœ๊ทธ์ธ์ด ๋๋‚ฉ๋‹ˆ๋‹ค.

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. ๋กœ๊ทธ์ธ์„ ํ•ฉ๋‹ˆ๋‹ค (Oauth Setting ์ฐธ์กฐ).
  2. tistory category <blog_name>์„ ํ†ตํ•ด ๋ณธ์ธ ๋ธ”๋กœ๊ทธ์˜ ์นดํ…Œ๊ณ ๋ฆฌ ์•„์ด๋””๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
$ 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. <slug>.md ํŒŒ์ผ์„ Git commit message์ฒ˜๋Ÿผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค (์ฒซ ์ค„ ์ œ๋ชฉ, ํ•œ ์ค„ ๋„์šฐ๊ณ  ๋‚ด์šฉ ์‹œ์ž‘). ๊ธ€ ๋‚ด์šฉ์€ Markdown ํ˜•์‹์— ๋งž์ถ”์–ด ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. (ํŒŒ์ผ๋ช…: tistory-cli-test.md)
[์ œ๋ชฉ]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 post <blog_name> <category_id> <slug>.md๋กœ ํฌ์ŠคํŒ…์„ ํ•œ ํ›„, 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์—์„œ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc