All Projects → Cesura → pastey

Cesura / pastey

Licence: BSD-3-Clause license
A lightweight, self-hosted paste platform

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to pastey

paste
paste is a simple web app for writing & sharing code.
Stars: ✭ 62 (-4.62%)
Mutual labels:  pastebin
Snippet-Share
This is a snippet sharing app that can be used to share snippets of code and more.
Stars: ✭ 41 (-36.92%)
Mutual labels:  pastebin
paperplanes.nvim
Neovim ✈️ Pastebins
Stars: ✭ 50 (-23.08%)
Mutual labels:  pastebin
mathb
MathB.in - Mathematics Pastebin Written in Common Lisp
Stars: ✭ 203 (+212.31%)
Mutual labels:  pastebin
pste
Just a simple file hosting application inspired by the likes of pomf.se and teknik.io.
Stars: ✭ 22 (-66.15%)
Mutual labels:  pastebin
tongue
Elixir port of Nakatani Shuyo's natural language detector
Stars: ✭ 17 (-73.85%)
Mutual labels:  language-detection
omnibin
Android client for different bins like dogbin. Previous dogbin mobile.
Stars: ✭ 19 (-70.77%)
Mutual labels:  pastebin
nlpserver
NLP Web Service
Stars: ✭ 76 (+16.92%)
Mutual labels:  language-detection
jstarcraft-nlp
专注于解决自然语言处理领域的几个核心问题:词法分析,句法分析,语义分析,语种检测,信息抽取,文本聚类和文本分类. 为相关领域的研发人员提供完整的通用设计与参考实现. 涵盖了多种自然语言处理算法,适配了多个自然语言处理框架. 兼容Lucene/Solr/ElasticSearch插件.
Stars: ✭ 92 (+41.54%)
Mutual labels:  language-detection
spacy-fastlang
Language detection using Spacy and Fasttext
Stars: ✭ 34 (-47.69%)
Mutual labels:  language-detection
pastebin-php
a simple pastebin implement in php
Stars: ✭ 25 (-61.54%)
Mutual labels:  pastebin
EdPaste
Laravel/PHP-driven Pastebin with users management
Stars: ✭ 34 (-47.69%)
Mutual labels:  pastebin
PastaBean
Python Script to Scrape Pastebin with Regex
Stars: ✭ 0 (-100%)
Mutual labels:  pastebin
jot
📝 A server-less pastebin app for short messages. Data is stored within the URL.
Stars: ✭ 33 (-49.23%)
Mutual labels:  pastebin
BLUELAY
Searches online paste sites for certain search terms which can indicate a possible data breach.
Stars: ✭ 24 (-63.08%)
Mutual labels:  pastebin
simple-pastebin-monitor
A simple pastebin monitor using the scraping API
Stars: ✭ 34 (-47.69%)
Mutual labels:  pastebin
lingua-go
👄 The most accurate natural language detection library for Go, suitable for long and short text alike
Stars: ✭ 684 (+952.31%)
Mutual labels:  language-detection
UniLang
Translate text from one language to another using Google Translate
Stars: ✭ 33 (-49.23%)
Mutual labels:  language-detection
ctrl-v
📋 a modern, open-source pastebin with latex and markdown rendering support
Stars: ✭ 93 (+43.08%)
Mutual labels:  pastebin
imperial
Official mono-repo for https://imperialb.in/
Stars: ✭ 35 (-46.15%)
Mutual labels:  pastebin

logo

A lightweight, self-hosted paste platform

Features

  • Self-contained system without external database dependencies
  • Automatic programming language detection
  • Optional on-disk encryption
  • Optional single use pastes
  • Optional expiration date
  • QR code generation
  • Theme system
  • IP/network whitelisting and blocking
  • Endpoint rate limiting
  • JSON API
  • Fully configurable via environment variables
  • Included script for uploading files/content from stdin

Screenshots

Browser

home new view

Dark

dark

CLI

screenshot5

Installation

Docker

It is highly recommended that you use the official Docker image to run Pastey. To do so, simply run:

$ docker run -d -p 5000:5000 -v /path/to/local/dir:/app/data cesura/pastey:latest

Change /path/to/local/dir to a local folder you would like to use for persistent paste storage. It will be mounted in the container at /app/data.

Pastey will then be accessible at http://localhost:5000

Docker (non-AVX processor)

If your processor does not have support for AVX instructions, the "latest" image will fail to run. This is due to a decision by Tensorflow to enable this compile flag by default in version 1.5+. However, Anaconda's distribution of Tensorflow supports older architectures even in the 2.x line. You can instead use the image tagged latest-conda:

$ docker run -d -p 5000:5000 -v /path/to/local/dir:/app/data cesura/pastey:latest-conda

docker-compose

If you prefer to use docker-compose:

$ wget https://raw.githubusercontent.com/Cesura/pastey/main/docker-compose.yml && docker-compose up -d

Note that this must be modified if you wish to use a local directory for storage, rather than a Docker volume.

Local

With language detection

Requirements:

  • Python 3.8
  • AVX-enabled processor (or a Python environment configured to use Anaconda's Tensorflow)
$ git clone https://github.com/Cesura/pastey.git && cd pastey && mkdir ./data
$ pip3 install -r requirements.txt
$ python3 app.py 

Without language detection

If you prefer to not use the language detection feature, use the included patch_no_tensorflow.sh script to remove the guesslang requirements:

$ git clone https://github.com/Cesura/pastey.git && cd pastey && mkdir ./data
$ ./patch_no_tensorflow.sh && pip3 install -r requirements.txt
$ python3 app.py 

Configuration

Here is a list of the available configuration options:

Environment Variable config.py Variable Description Default Value
PASTEY_DATA_DIRECTORY data_directory Local directory for paste storage ./data
PASTEY_LISTEN_ADDRESS listen_address Address to listen on 0.0.0.0
PASTEY_LISTEN_PORT listen_port Port to listen on 5000
PASTEY_USE_WHITELIST use_whitelist Enable/disable whitelisting for admin tasks (view recent, delete, config) True
PASTEY_WHITELIST_CIDR whitelist_cidr List of whitelisted IP addresses or networks (in CIDR format). When passed as an environment variable, it should be a comma-separated list. [ '127.0.0.1/32' , '10.0.0.0/8' , '172.16.0.0/12' , '192.168.0.0/16' ]
PASTEY_BLACKLIST_CIDR blacklist_cidr List of blocked IP addresses or networks (in CIDR format). When passed as an environment variable, it should be a comma-separated list. []
PASTEY_RESTRICT_PASTING restrict_pasting Enable/disable restricting of pasting to whitelisted users False
PASTEY_RATE_LIMIT rate_limit Rate limit for pasting, for non-whitelisted users 5/hour
PASTEY_GUESS_THRESHOLD guess_threshold Threshold for automatic language detection guesses. If a result is below this value, it is treated as Plaintext. 0.20
PASTEY_RECENT_PASTES recent_pastes Number of recent pastes to show on the home page 10
PASTEY_BEHIND_PROXY behind_proxy Inform Pastey if it is behind a reverse proxy (nginx, etc.). If this is the case, it will rely on HTTP headers X-Real-IP or X-Forwarded-For. NOTE: Make sure your proxy config sets these values False
PASTEY_DEFAULT_THEME default_theme Select which theme Pastey should use by default. This is overridden by client options. Light
PASTEY_PURGE_INTERVAL purge_interval Purge interval (in seconds) for checking expired pastes in background thread 3600
PASTEY_FORCE_SHOW_RECENT force_show_recent Show recent pastes on the home page, even to non-whitelisted users (without delete button) False
PASTEY_IGNORE_GUESS ignore_guess Ignore these classifications for language detection ['TeX', 'SQL']
PASTEY_SHOW_CLI_BUTTON show_cli_button Enable/disabling showing of CLI button on home page True

Docker configuration

For Docker environments, it is recommended that the options be passed to the container on startup:

$ docker run -d -p 5000:5000 -e PASTEY_LISTEN_PORT=80 -e PASTEY_BEHIND_PROXY="True" cesura/pastey:latest
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].