细线鬼仓api
ghostlord的Python项目详细描述
幽灵领主
ghost lord是基于web的粘贴服务GHOSTBIN的cli版本。这个 程序允许您在终端的帮助下放置和接收来自鬼怪箱的粘贴。
功能
- 直接从本地存储中粘贴
- 获取粘贴并直接保存到本地存储中
- 发布时加密粘贴
- 过帐时设置到期限制
- 自动语言检测(基于文件扩展名)
依赖关系
要求
- cfscrape
- argparse
- 兰度
注意:建议使用pip安装需求
$ pip install -r requirements.txt
如果收到任何类型的拒绝权限错误,请使用上面
中的--user
标志
如何使用
发布数据
粘贴
$ python bin.py --put [TEXT/FILE NAME]
使用
auto
语言检测粘贴$ python bin.py --put [TEXT/FILE NAME] --lang auto
获取数据
获取粘贴
$ python bin.py --get [PASTE ID/PASTE URL]
获取粘贴并保存
$ python bin.py --get [PASTE ID/PASTE URL] -o [FILENAME]
不:有关详细信息,请参见help。
帮助
usage: bin.py [-h] [--put TEXT/FILE] [--lang LANGUAGE_TYPE] [--get LINK_OR_ID]
[-o FILE_NAME] [-p PASSWORD] [-t TITLE] [-e EXPIRE]
Ghost-Lord is the cli version of web based pasting service "GHOSTBIN <https://ghostbin.com>". This program allows you to send and recieve your data from ghostbin with the help of terminal.
optional arguments:
-h, --help show this help message and exit
--put TEXT/FILE text/file to be pasted
--lang LANGUAGE_TYPE sets the file language syntax. default : text
set it to 'auto' if you want to get the language automatically. {need file with extension}
--get LINK_OR_ID get the content of paste
-o FILE_NAME, --output FILE_NAME
saves the content of get paste into file
-p PASSWORD, --password PASSWORD
encrypts the paste with password
-t TITLE, --title TITLE
sets the paste title
-e EXPIRE, --expire EXPIRE
sets the paste expiry. default = -1 (forever)
Ten Minutes : 10m
An Hour : 1h
A Day : 1d
A Fortnite : 14d
使用API
仅适用于开发人员
如何导入
- 在项目工作区中包含
ghostbin
文件夹 - 使用
GhostBin
类fromghostbinimportGhostBinghost=GhostBin()
并使用
API文档
下面是 麻省理工学院 如果您想修复任何错误或改进功能,请随时打开相应的拉取请求GhostBin
类的方法
Method Arguments Description parseLang ^{ Method to return the syntax id (lang parameter of ghostbin) for the file name getLang ^{ Method to get the syntax name by its id getPaste ^{
^{
^{Method to get the content of paste by its ID / URL. I will take password argument while dealing with password protected pastes. Use output paramater if you want to save the contents instead of printing postPaste ^{
all keys are mandtoryMethod to post new paste and return the details 后置数据键
Key Values Default Value Description text ^{ ^{ contents to be pasted online lang from ^{ ^{ syntax of paste expiry Ten Minutes : 10m
An Hour : 1h
A Day : 1d
A Fortnite : 14d^{ expiry/auto delete period password ^{ empty string encryption password to lock paste title ^{ empty string title of paste 许可证
贡献
推荐PyPI第三方库