细线鬼仓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窗口的鼠标位置错误   Java 8流peek api   java将数据附加到文件中   java使用ExoPlayer 2.8播放播放列表中的特定文件   JavaSpring国际化:如何动态设置语言环境值   java如何在mysql中实现两个表之间的两个关联   java在gradle可执行jar文件中包含运行时参数   surefire插件中的java maven多套测试套件   java试图理解堆分析以确定内存泄漏或所需的大量内存   java识别字符串有数字   数组如何解决错误“java.lang.ArrayIndexOutOfBoundsException:5”   java Swt文件对话框选择的文件太多?   java此登录代码易受SQL注入攻击吗?   Java[3]中的文件<identifier>预期编译错误   java如何在spring webflux中发送列表   jar中未找到java文件异常   如何在java中合并2D数组?   java如何评测本机JNI库