细线鬼仓api

ghostlord的Python项目详细描述


幽灵领主

ghost lord是基于web的粘贴服务GHOSTBIN的cli版本。这个 程序允许您在终端的帮助下放置和接收来自鬼怪箱的粘贴。

image

功能

  • 直接从本地存储中粘贴
  • 获取粘贴并直接保存到本地存储中
  • 发布时加密粘贴
  • 过帐时设置到期限制
  • 自动语言检测(基于文件扩展名)

依赖关系

要求

  • 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

仅适用于开发人员

如何导入

  1. 在项目工作区中包含ghostbin文件夹
  2. 使用GhostBin
    fromghostbinimportGhostBinghost=GhostBin()

并使用

API文档

下面是GhostBin类的方法

MethodArgumentsDescription
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^{}: Complete URL / Paste ID (required)
^{}: Output filename (optional)
^{}: Unlock password for protected pastes (optional)
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^{}: dictionary with post keys
all keys are mandtory
Method to post new paste and return the details

后置数据键
KeyValuesDefault ValueDescription
text^{}^{} (its mandatory)contents to be pasted online
langfrom ^{}^{}syntax of paste
expiryTen Minutes : 10m
An Hour : 1h
A Day : 1d
A Fortnite : 14d
^{}expiry/auto delete period
password^{}empty stringencryption password to lock paste
title^{}empty stringtitle of paste

许可证

麻省理工学院

贡献

如果您想修复任何错误或改进功能,请随时打开相应的拉取请求

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

推荐PyPI第三方库


热门话题
java jstl c:set无法处理jsp文件中的js代码   春季mvc你好!Junit平台v.5.8.1 java出现错误。lang.NoSuchMethodError:org。朱尼特。站台平民util。注释。芬丹符号   java如何结合PowerMock和Robolectric   java打印从列表返回最大值   java正则表达式,用于拆分遵循ABNF格式的字符串   在Java 1.4中,如何在不迭代的情况下将结果集的值插入hashmap?   io Java:带状态的ASCII随机行文件访问   首次尝试在Eclipse之外运行java程序   为什么在Java8Lambda中使用“Collectors.toList()”而不是“Collectors::toList”?   Java为多个值中的一个调用非类方法   charat如何在小于和大于之间查找文本,然后在Java中剥离<>?   从milis创建日期时java不一致   使用Java将字符串与CMD输出进行比较   java Android应用程序可以在调试中工作,但不能发布   java notifyAll()不工作,如何在socket编程中通知所有线程   为什么java没有呢。整数扩展java。朗,朗?   二进制文件上的socketJava http请求无法读取正确的内容长度   java有可能获得100条以上的推文吗?   javaoracle与JDBC的连接