source: project/wiki/eggref/5/pastiche @ 37630

Last change on this file since 37630 was 37630, checked in by wasamasa, 5 months ago

Fix links

File size: 5.3 KB
Line 
1[[tags: egg]]
2[[toc:]]
3
4== pastiche - An awfully simple pastebin.
5
6=== Introduction
7
8{{pastiche}} is a BSD licensed awful application providing a basic
9pastebin service. It has been named pastiche in honor of lisppaste
10where loads of ideas and the syntax highlighting (indirectly via the
11[[colorize]] egg has been borrowed).
12
13=== Usage
14
15After installation create and compile the following file:
16
17<enscript higlight="scheme">
18(use awful pastiche)
19
20(pastiche "/" "paste.db"
21          awful-settings:
22          (lambda (handler)
23            (parameterize
24                ((debug-file "/tmp/paste")
25                 (page-css "http://wiki.call-cc.org/chicken.css")
26                 (page-charset "UTF-8")
27                 (page-doctype "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"))
28              (handler))))
29</enscript>
30
31load this then with awful
32
33<enscript highlight="shell">
34$ awful example-app.scm
35</enscript>
36
37Or compile it and load the compiled application:
38
39<enscript highlight="shell">
40$ csc -s awful-app.scm
41$ awful example-app.so
42</enscript>
43
44This will run the pastebin service using call-cc.org's css look and
45feel on your host. Access [[http://localhost/]] for your paste app.
46
47=== Requirements
48
49* [[stty]]
50* [[awful]] >= version 0.39
51* [[awful-sql-de-lite]] >= version 0.4
52* [[colorize]]
53* [[miscmacros]]
54
55If you use captchas, the external program
56[[http://www.figlet.org/|figlet]] must be installed. If you use
57audible-captchas, you winsert into searchable select * from pastes;ill need [[http://espeak.sourceforge.net/|espeak]]
58in pastiche's PATH.
59
60'''Caveat:''' If using the search feature with the bundled sql-de-lite db, you need to make sure that the SQLITE_ENABLE_FTS3_PARENTHESIS option is not set. Otherwise people searching for parenthesis make pastiche error out.
61
62=== Documentation
63
64==== pastiche
65
66<procedure>(pastiche base-path db-file #!key (vandusen-port 22722) (vandusen-host "localhost") (base-url "http://paste.call-cc.org") (use-captcha? #t) (audible-captcha? #t) (num-captchas 500) (browsing-steps 15) force-vandusen-notification? (awful-settings (lambda (_) (_))))</procedure>
67
68Starts pastiche with {{base-path}} as the root URL and the sqlite
69database file {{db-file}}. If the database file does not exist,
70pastiche will create and initialize an empty database.
71
72It supports sending the paste event to the chicken IRC bot
73[[vandusen]]. The message contains of the author, the title of the
74paste and the url to the paste on one line.
75
76===== Keywords:
77
78; vandusen-port : TCP port number which the vandusen bot listens on
79; vandusen-host : hostname which vandusen resides on. Set to #f to disable vandusen notifications
80; base-url : The absolute base URL to the root of pastiche
81; use-captcha : If #t iinsert into searchable select * from pastes;t will try to use figlet for creating a captcha. Set to #f to disable captchas
82; audible-captcha? : If #t (the default) it will check for espeak and if that's available on the system will generate wav files on demand for each captcha.
83; num-captchas : Defines the number of different captchas that will get created
84; browsing-steps : The number of paste entries per page
85; force-vandusen-notification? : If bound to a truthy value, unconditionally notify {{#chicken}} via vandusen on new pastes.  When enabled, the checkbox to select notification via vandusen is not displayed.
86; awful-settings : A procedure that will get the path before passed to awful's handler. See [[eggref/awful|awful's]] documentation for details.
87
88
89=== Author
90
91[[/users/christian kellermann|Christian Kellermann]]
92
93
94=== Repository
95
96[[https://github.com/ckeen/pastiche|https://github.com/ckeen/pastiche]]
97
98
99=== License
100
101 Copyright 2011 Christian Kellermann <ckeen@pestilenz.org>. All
102 rights reserved.
103 
104 Redistribution and use in source and binary forms, with or without
105 modification, are permitted provided that the following conditions
106 are met:
107    1. Redistributions of source code must retain the above
108    copyright notice, this list of conditions and the following
109    disclaimer.
110    2. Redistributions in binary form must reproduce the above
111    copyright notice, this list of conditions and the following
112    disclaimer in the documentation and/or other materials provided
113    with the distribution.
114 THIS SOFTWARE IS PROVIDED BY CHRISTIAN KELLERMANN ``AS IS'' AND ANY
115 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
116 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
117 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRISTIAN KELLERMANN OR
118 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
119 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
120 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
121 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
122 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
123 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
124 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
125 SUCH DAMAGE.
126 The views and conclusions contained in the software and
127 documentation are those of the authors and should not be
128 interpreted as representing official policies, either expressed or
129 implied, of Christian Kellermann.
130
131=== Version History
132
133; 1.0 : initial release for C5 based on the 0.33 C4 version
134; 1.1 : Forgot to port tests
135; 1.2 : Bugfix: seconds are an exact number now
Note: See TracBrowser for help on using the repository browser.