src/org/sonews/daemon/command/HelpfulCommand.java
author František Kučera <franta-hg@frantovo.cz>
Sun Nov 06 00:08:05 2011 +0100 (2011-11-06)
changeset 116 4ddc1020a154
parent 35 ed84c8bdd87b
permissions -rwxr-xr-x
Podpora Markdown syntaxe
na začátek odesílané zprávy stačí přidat:
#!markdown
a zpráva se pak prožene Markdown procesorem (spouštěno přes sudo pod jiným uživatelem)
a pak teprve přes standardní XSL transformaci.

1) Vytvořit uživatele a skupinu markdown

2) Do /etc/sudoers přidat:
Cmnd_Alias MARKDOWN = /usr/bin/markdown
%markdown ALL = (%markdown) NOPASSWD : MARKDOWN

3) Uivatele, pod kterým běží NNTP démon, přidat do skupiny markdown
cli@26
     1
/*
cli@26
     2
 *   SONEWS News Server
cli@26
     3
 *   see AUTHORS for the list of contributors
cli@26
     4
 *
cli@26
     5
 *   This program is free software: you can redistribute it and/or modify
cli@26
     6
 *   it under the terms of the GNU General Public License as published by
cli@26
     7
 *   the Free Software Foundation, either version 3 of the License, or
cli@26
     8
 *   (at your option) any later version.
cli@26
     9
 *
cli@26
    10
 *   This program is distributed in the hope that it will be useful,
cli@26
    11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
cli@26
    12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
cli@26
    13
 *   GNU General Public License for more details.
cli@26
    14
 *
cli@26
    15
 *   You should have received a copy of the GNU General Public License
cli@26
    16
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
cli@26
    17
 */
cli@26
    18
cli@26
    19
package org.sonews.daemon.command;
cli@26
    20
cli@26
    21
/**
cli@26
    22
 *
cli@26
    23
 * @since sonews/1.1
cli@26
    24
 * @author Christian Lins
cli@26
    25
 */
cli@26
    26
public interface HelpfulCommand extends Command
cli@26
    27
{
cli@26
    28
cli@37
    29
	/**
cli@37
    30
	 * @return A short description of this command, that is
cli@37
    31
	 * used within the output of the HELP command.
cli@37
    32
	 */
cli@37
    33
	String getHelpString();
cli@26
    34
}