#!/usr/bin/python
# -*- coding:Utf-8 -*-

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2011  Laurent Peuch  <cortex@worlddomination.be>

text = """This script do nothing except printing the list of available scripts.

Pipetk is a collection of scripts to work on continuous stream of informations
like tail -f output using shell pipes.

All scripts name start with 'p' (for pipe).

Available scripts:
 * pipetk: list this text.

 * puniq: eliminate duplications in real time via a unix pipe.(| sort | uniq
   waits for the full stream to be completed and also sort it, therefor it, for
   example, won't works between a rsstail|feedstail and an ii file).
   Example: feedstail -u http://reddit.com/.rss | puniq

 * pmerge: open a named pipe and write to stdout everything written in the named
   pipe. The first argument given is the name of the named pipe. It doesn't
   managed in any way the possible conflicts between multiple process that write
   on that pipe at the same time.
   Silly example: pmerge PIPE > irc.freenode.net/#laquadrature & echo "pouet" > PIPE

 * purls: really simple url extracting tools. It split each line it receives by
   white space then display on a new line each words that starts with either
   "http" or "https".
   Example: echo "there is 2 urls in this sentence: this one http://blog.worlddomination.be and this one http://laquadrature.net" | purls
   result:
   http://blog.worlddomination.be
   http://laquadrature.net

 * pdetinyfy: get the real url of a shortened url. Works only by receiving one
   url per line.
   Example: echo "http://ur1.ca/4110r" | pdetinyfy
   Result: http://laquadrature.net
   echo "foo http://ur1.ca/4110r bar" | pdetinyfy <- won't work, use this instead:
   echo "foo http://ur1.ca/4110r bar" | purls | pdetinyfy

 * purltitle: get an url in input and output the url followed by it's title.
   Works only by receiving one url per line. For the moment will miserably fail
   if it doesn't managed to connect to the website.
   Example: echo "http://laquadrature.net" | purltitle
   Result: http://laquadrature.net La Quadrature du Net | Internet et Libertés

 * plag: slow down the displaying of a stream by sleeping a give time beetwen each line
   Can have the number of seconds the sleep as arg (accept float value).
   Example: dmseg | plag
   or: dmesg | plag 60
"""

if __name__ == "__main__":
    print text

# vim:set shiftwidth=4 tabstop=4 expandtab:
