Code Monkey home page Code Monkey logo

pinnwand's Introduction

pinnwand logo, a rabbit

pinnwand

About

pinnwand is Python pastebin software that tried to keep it simple but got a little more complex.

Prerequisites

  • Python >= 3.8
  • Tornado
  • sqlalchemy
  • click
  • docutils
  • tomli
  • pygments-better-html
  • a database driver

Usage

Web

Enter text, click "Paste", easy enough.

steck

steck is a command line client to pinnwand instances:

€ pip install --user steck
...
€ steck paste *
You are about to paste the following 7 files. Do you want to continue?
- LICENSE
- mypy.ini
- poetry.lock
- pyproject.toml
- README.rst
- requirements.txt
- steck.py

Continue? [y/N] y

Completed paste.
View link:    https://localhost:8000/W5
Removal link: https://localhost:8000/remove/TS2AFFIEHEWUBUV5HLKNAUZFEI

curl

pinnwand has a direct endpoint for curl users:

€ echo "foo" | curl -X POST http://localhost:8000/curl -F 'raw=<-'
Paste URL:   http://localhost:8000/OE
Raw URL:     http://localhost:8000/raw/GU
Removal URL: http://localhost:8000/remove/GQBHGJYKRWIS34D6FNU6CJ3B5M
€ curl http://localhost:8000/raw/GU
foo%

This will preselect the lexer and expiry arguments to be text and 1day respectively. You can provide those to change them.

API

pinnwand provides a straight forward JSON API, here's an example using the common requests library:

>>> requests.post(
...     "http://localhost:8000/api/v1/paste",
...     json={
...             "expiry": "1day",
...             "files": [
...                     {"name": "spam", "lexer": "python", "content": "eggs"},
...             ],
...     }
... ).json()
{'link': 'http://localhost:8000/74', 'removal': 'http://localhost:8000/remove/KYXQLPZQEWV2L4YZM7NYGTR7TY'}

More information about this API is available in the documentation.

More ways to use pinnwand

Various deprecated ways of posting are still supported, don't implement these for any new software but if you are maintaining old software and want to know how they used to work you can read our documentation_.

If you do use a deprecated endpoint to post a warning will be shown below any pastes that are created this way.

Reporting bugs

Bugs are reported best at pinnwand's project page on github. If you just want to hang out and chat about pinnwand then I'm available in the #pinnwand channel on Freenode IRC.

License

pinnwand is distributed under the MIT license. See LICENSE for details.

History

This pastebin has quite a long history which isn't reflected entirely in its repository.

pinnwand's People

Contributors

supakeen avatar chrislovering avatar millefalcon avatar kapsh avatar bruce1347 avatar dependabot[bot] avatar kwpolska avatar cdunklau avatar erlliam avatar jessejoe avatar sbraz avatar mweinelt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.