Annotate

mod_pastebin/README.markdown @ 2864:6f3859233515

mod_pep_vcard_avatar: Don't set avatar hash if already set
author Michel Le Bihan <michel@lebihan.pl>
date Fri, 26 Jan 2018 19:00:22 +0100
parent 1834:7bb2f149f8ec
child 3484:ce89fabb1f02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
1 ---
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
2 labels:
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
3 - 'Stage-Stable'
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
4 summary: 'Redirect long messages to built-in pastebin'
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
5 ...
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
7 Introduction
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
8 ============
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
10 Pastebins are used very often in IM, especially in chat rooms. You have
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
11 a long log or command output which you need to send to someone over IM,
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
12 and don't want to fill their message window with it. Put it on a
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
13 pastebin site, and give them the URL instead, simple.
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
15 Not for everyone... no matter how hard you try, people will be unaware,
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
16 or not care. They may also be too lazy to visit a pastebin. This is
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
17 where mod\_pastebin comes in!
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
19 Details
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
20 =======
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
22 When someone posts to a room a "large" (the actual limit is
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
23 configurable) message, Prosody will intercept the message and convert it
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
24 to a URL pointing to a built-in pastebin server. The URLs are randomly
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
25 generated, so they can be considered for most purposes to be private,
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
26 and cannot be discovered by people who are not in the room.
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
28 Usage
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
29 =====
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
31 To set up mod\_pastebin for MUC rooms it **must** be explicitly loaded,
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
32 as in the example below - it won't work when loaded globally, as that
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
33 will only load it onto normal virtual hosts.
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
34
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
35 For example:
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
36
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
37 Component "conference.example.com" "muc"
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
38 modules_enabled = { "pastebin" }
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
39
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
40 Pastes will be available by default at
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
41 `http://<your-prosody>:5280/pastebin/` by default.
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
42
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
43 In Prosody 0.9 and later this can be changed with [HTTP
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
44 settings](https://prosody.im/doc/http).
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
45
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
46 In 0.8 and older this can be changed with `pastebin_ports` (see below),
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
47 or you can forward another external URL from your web server to Prosody,
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
48 use `pastebin_url` to set that URL.
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
49
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
50 Configuration
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
51 =============
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
52
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
53 Option Description
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
54 --------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
55 pastebin\_threshold Maximum length (in characters) of a message that is allowed to skip the pastebin. (default 500 characters)
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
56 pastebin\_line\_threshold The maximum number of lines a message may have before it is sent to the pastebin. (default 4 lines)
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
57 pastebin\_trigger A string of characters (e.g. "!paste ") which if detected at the start of a message, always sends the message to the pastebin, regardless of length. (default: not set)
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
58 pastebin\_expire\_after Number of hours after which to expire (remove) a paste, defaults to 24. Set to 0 to store pastes permanently on disk.
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
59 pastebin\_ports List of ports to run the HTTP server on, same format as mod\_httpserver's http\_ports[^1]
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
60 pastebin\_url Base URL to display for pastebin links, must end with / and redirect to Prosody's built-in HTTP server[^2]
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
61
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
62 Compatibility
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
63 =============
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
64
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
65 ----- -------
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
66 0.9 Works
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
67 0.8 Works
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
68 0.7 Works
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
69 0.6 Works
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
70 ----- -------
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
71
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
72 Todo
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
73 ====
1782
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
74
1803
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
75 - Maximum paste length
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1782
diff changeset
76 - Web interface to submit pastes?
1834
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
77
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
78 [^1]: As of Prosody 0.9, `pastebin_ports` is replaced by `http_ports`,
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
79 see [Prosody HTTP server documentation](https://prosody.im/doc/http)
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
80
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
81 [^2]: See also
7bb2f149f8ec mod_pastebin/README: Try to clarify the config differences in 0.9+
Kim Alvefur <zash@zash.se>
parents: 1803
diff changeset
82 [http\_external\_url](https://prosody.im/doc/http#external_url)