Skip to main content

灵感来自于 @教主 的 42qucc: https://bitbucket.org/zuroc/42qu-notepad, http://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 可读性比较差,考虑加入短域名

Metadata

Release files for python-gist-note 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-gist-note 0.2.0
File Size Uploaded
python-gist-note-0.2.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gist-note 0.2.0
File Interpreter ABI Platform
python_gist_note-0.2.0-py2-none-any.whl Python 2 none any Details

Total release size: 10.2 kB

Release files / python-gist-note-0.2.0.tar.gz

Download URL python-gist-note-0.2.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7faa3c8d96d81fe5be7cc6130c413fea67e71b5c1e2c8cf809b1d6098fa4239d
BLAKE2b-256 checksum
How to use checksums
8ab6d92822fe97d6a52c68ab6fd87b2b86b6414181485ebd0caf06e98a5d6c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_gist_note-0.2.0-py2-none-any.whl

Download URL python_gist_note-0.2.0-py2-none-any.whl
Size 6.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
24a26fe1cc3bd3e5825be55b034fe5ed4e4a91b45e26b6b27958517bc460732d
BLAKE2b-256 checksum
How to use checksums
894d5b576321a8ef6d65b4f6b09c90ed247fce37c85f08b9cacff81e0a27bfc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.1

1 release file

0.1.0

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page