Skip to main content

just a simple code sharing tool powered by gist.

Project description

灵感来自于 @教主 的 42qucc: https://bitbucket.org/zuroc/42qu-notepadhttp://p.pe.vc/:help

基于 gist 的代码分享工具,可以很方便和你的小伙伴在命令行分享代码片段。

安装

sudo pip install python-gist-note

使用

USAGE:

1. 获取 gist 内容(写入到 file.py):
gn gist-id-or-url > file.py

2. 新建 gist (根据 file.py 文件的内容):
gn [options] < file.py

OPTIONS:

--help, -h: 显示本帮助

-f: 可选,新建 gist 时,新建的 gist 的文件名,默认为:gistfile1.txt

-m: 可选,新建 gist 时,新建的 gist 描述,默认为空

使用场景举例:

李雷想把自己机器上的 app.py 分享给韩梅梅,李雷操作如下:

$ gn -f app.py -m 'this is a test python file' < app.py
https://gist.github.com/38821b0f84959c525379edb258f0243f
38821b0f84959c525379edb258f0243f

李雷将获得的 gist id 或 url 发送给韩梅梅,然后韩梅梅操作如下:

$ gn 38821b0f84959c525379edb258f0243fc > app.py

注意

  1. 因为是匿名,所以只能在线查看不能编辑,将来有可能增加用户

  2. 生成的 url 可读性比较差,考虑加入短域名

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

python-gist-note-0.2.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

python_gist_note-0.2.2-py2-none-any.whl (7.2 kB view details)

Uploaded Python 2

File details

Details for the file python-gist-note-0.2.2.tar.gz.

File metadata

File hashes

Hashes for python-gist-note-0.2.2.tar.gz
Algorithm Hash digest
SHA256 118815adcb5408ceb6f6b262ba807124b396778e783904df16d37be099f54aca
MD5 4165089198c5ae58698846e12bf404c5
BLAKE2b-256 798e9aa69f2995edf64c1279823a9e0e107e945418503f831bfbd3cfe5115cde

See more details on using hashes here.

File details

Details for the file python_gist_note-0.2.2-py2-none-any.whl.

File metadata

File hashes

Hashes for python_gist_note-0.2.2-py2-none-any.whl
Algorithm Hash digest
SHA256 fa42aca5c4f345cf75037a9f3a8d94b360138fffaf5fb2bbc9886c6f954d7ca3
MD5 2130517163a7f81fbcf4b5bea260ab98
BLAKE2b-256 02e9bc41f7faa5d38bdcf901329f8025e609b6a90985bc01d311f9f0dfc6bf41

See more details on using hashes here.

Supported by

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