comparison mod_pastebin/README.markdown @ 4315:87e250409998

mod_pastebin: Normalize markdown [fix] md:command=pandoc -f markdown-smart+emoji -s -t markdown-smart+emoji+pipe_tables+simple_tables-multiline_tables-grid_tables-raw_html md:pattern=set:**.md + **.markdown
author Kim Alvefur <zash@zash.se>
date Sat, 02 Jan 2021 15:28:45 +0100
parents ce89fabb1f02
children 4bba01ce2f98
comparison
equal deleted inserted replaced
4314:149ec3abf09e 4315:87e250409998
1 --- 1 ---
2 labels: 2 labels:
3 - 'Stage-Stable' 3 - Stage-Stable
4 summary: 'Redirect long messages to built-in pastebin' 4 summary: Redirect long messages to built-in pastebin
5 ... 5 ---
6 6
7 Introduction 7 # Introduction
8 ============
9 8
10 Pastebins are used very often in IM, especially in chat rooms. You have 9 Pastebins are used very often in IM, especially in chat rooms. You have
11 a long log or command output which you need to send to someone over IM, 10 a long log or command output which you need to send to someone over IM,
12 and don't want to fill their message window with it. Put it on a 11 and don't want to fill their message window with it. Put it on a
13 pastebin site, and give them the URL instead, simple. 12 pastebin site, and give them the URL instead, simple.
14 13
15 Not for everyone... no matter how hard you try, people will be unaware, 14 Not for everyone... no matter how hard you try, people will be unaware,
16 or not care. They may also be too lazy to visit a pastebin. This is 15 or not care. They may also be too lazy to visit a pastebin. This is
17 where mod\_pastebin comes in! 16 where mod_pastebin comes in!
18 17
19 Details 18 # Details
20 =======
21 19
22 When someone posts to a room a "large" (the actual limit is 20 When someone posts to a room a "large" (the actual limit is
23 configurable) message, Prosody will intercept the message and convert it 21 configurable) message, Prosody will intercept the message and convert it
24 to a URL pointing to a built-in pastebin server. The URLs are randomly 22 to a URL pointing to a built-in pastebin server. The URLs are randomly
25 generated, so they can be considered for most purposes to be private, 23 generated, so they can be considered for most purposes to be private,
26 and cannot be discovered by people who are not in the room. 24 and cannot be discovered by people who are not in the room.
27 25
28 Usage 26 # Usage
29 =====
30 27
31 To set up mod\_pastebin for MUC rooms it **must** be explicitly loaded, 28 To set up mod_pastebin for MUC rooms it **must** be explicitly loaded,
32 as in the example below - it won't work when loaded globally, as that 29 as in the example below - it won't work when loaded globally, as that
33 will only load it onto normal virtual hosts. 30 will only load it onto normal virtual hosts.
34 31
35 For example: 32 For example:
36 33
45 42
46 In 0.8 and older this can be changed with `pastebin_ports` (see below), 43 In 0.8 and older this can be changed with `pastebin_ports` (see below),
47 or you can forward another external URL from your web server to Prosody, 44 or you can forward another external URL from your web server to Prosody,
48 use `pastebin_url` to set that URL. 45 use `pastebin_url` to set that URL.
49 46
50 Configuration 47 # Configuration
51 =============
52 48
53 Option Description 49 Option Description
54 --------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 50 ------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
55 pastebin\_threshold Maximum length (in characters) of a message that is allowed to skip the pastebin. (default 500 characters) 51 pastebin_threshold Maximum length (in characters) of a message that is allowed to skip the pastebin. (default 500 characters)
56 pastebin\_line\_threshold The maximum number of lines a message may have before it is sent to the pastebin. (default 4 lines) 52 pastebin_line_threshold The maximum number of lines a message may have before it is sent to the pastebin. (default 4 lines)
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) 53 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)
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. 54 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.
59 pastebin\_ports List of ports to run the HTTP server on, same format as mod\_httpserver's http\_ports[^1] 55 pastebin_ports List of ports to run the HTTP server on, same format as mod_httpserver's http_ports[^1]
60 pastebin\_url Base URL to display for pastebin links, must end with / and redirect to Prosody's built-in HTTP server[^2] 56 pastebin_url Base URL to display for pastebin links, must end with / and redirect to Prosody's built-in HTTP server[^2]
61 57
62 Compatibility 58 # Compatibility
63 =============
64 59
65 ----- ------- 60 ------ -------
66 0.11 Works 61 0.11 Works
67 0.10 Works 62 0.10 Works
68 0.9 Works 63 0.9 Works
69 0.8 Works 64 0.8 Works
70 ----- ------- 65 ------ -------
71 66
72 Todo 67 # Todo
73 ====
74 68
75 - Maximum paste length 69 - Maximum paste length
76 - Web interface to submit pastes? 70 - Web interface to submit pastes?
77 71
78 [^1]: As of Prosody 0.9, `pastebin_ports` is replaced by `http_ports`, 72 [^1]: As of Prosody 0.9, `pastebin_ports` is replaced by `http_ports`,
79 see [Prosody HTTP server documentation](https://prosody.im/doc/http) 73 see [Prosody HTTP server documentation](https://prosody.im/doc/http)
80 74
81 [^2]: See also 75 [^2]: See also
82 [http\_external\_url](https://prosody.im/doc/http#external_url) 76 [http_external_url](https://prosody.im/doc/http#external_url)