Paste server written in Haskell. Fork of Hpaste, fully freedom and privacy respecting and generally improved. At the time of writing there's an instance at .

fr33domlover 2e13ebbaf1 minor UI string changes 8 years ago
scripts 0a6803e9fa Update cron update 9 years ago
sql 7fd6bb3369 fix typo in irc channel name 8 years ago
src 2e13ebbaf1 minor UI string changes 8 years ago
static ec953fc1d3 css: fix some syntax highlighting colors 8 years ago
.gitignore 526c1104dc Update scripts. 10 years ago
README.md 1076ab1d55 fix typo 8 years ago
Setup.hs 4e5d21be3d First commit. 13 years ago
amelie.conf.sample df1ca0cae2 Setup files and README. 11 years ago
cabal.config 34a3133f2f adapt base package version to ghc 7.8.4 8 years ago
hpaste.cabal 888eedf7cb again... 8 years ago
hpaste.conf.sample d490f8433d use funbot instead of the simple pseudo irc bot 8 years ago

README.md

Toothpaste

This is a simple paste server, a modified version of Chris Done's hpaste. Toothpaste can syntax-highlight some computer languages, and can post links into IRC channels.

Examples for some of the changes made:

  • Use fr33domlover's e-mail address as the contact URL. This is done for two reasons: First, it is the person who maintains this version. Second, the default address, Chris Done's, is a gmai1 address. And I don't want to endorse or suggest gmai1 in any way. Feels wrong to put a gmai1 address there.
  • Remove the JS code of g00gle ana1ytic$.
  • Fix and tweak some hard-coded URLs and labels
  • Add an SQL file with some initial data (languages and channels)
  • Disable IRC announcements of private pastes
  • Use FunBot for IRC announcements instead of the (a bit too) simple IRC bot written originally

How to Use

Even after the modifications I made, there are hardcoded URLs in some places, and some extra links I added, which you may wish to change. More generally, it seems the original author wrote the code in his earlier days as a Haskell developer and the code in some places could use a big cleaner layout. So feel free to hack and impove!

Also, "hpaste" and "lpaste" are used when referring to the server in various places in the code. Don't worry about it. Just go to the UI layout code and change the UI strings and URLS you need. You can grep for the URLs or first launch the server and then take a look and see what you'd like to change.

Database Setup

Data is stored in a PostgreSQL database.

$ sudo su postgres --command 'createuser hpaste -P'
$ sudo su postgres --command 'createdb hpaste -O hpaste'
$ cat sql/schema.sql | psql -U hpaste -h 127.0.0.1 -d hpaste

You can also run the last line with the sql/data.schema, which contains some initial data such as lists of IRC channels and programming languages. Take a look at that file and tweak as needed before you commit it to psql.

Configuration & Running

$ cp hpaste.conf.sample hpaste.conf

Edit hpaste.conf. Make sure the cache directory has correct permissions (the user running the server needs to be able to create files there).

$ dist/build/hpaste/hpaste hpaste.conf

You can use cron or supervisord or similar to have the server launch automatically at boot time.

Regenerating Web Pages

The server keeps some content in a cache, whose path is set in hpaste.conf (/tmp/hpaste-cache by default). Some changes to the code won't take effect until you clear the cache and cause the server to generate new files there. You can safely clear the cache like this:

$ rm -rf /tmp/hpaste-cache/*