Browse Source

Création du dépôt Justabot

v3.2
mario_26 4 months ago
commit
380f32da96
100 changed files with 27878 additions and 0 deletions
  1. +247
    -0
      DOC/CHANGELOG
  2. +28
    -0
      DOC/README.txt
  3. BIN
      DOC/manual_EN.pdf
  4. +466
    -0
      DOC/manual_EN.tex
  5. BIN
      DOC/manual_FR.pdf
  6. +467
    -0
      DOC/manual_FR.tex
  7. +2
    -0
      LICENSE/dict_dz/LICENSE
  8. +1
    -0
      LICENSE/dict_dz/site
  9. +19
    -0
      LICENSE/dictdlib_opendict/AUTHORS.txt
  10. +50
    -0
      LICENSE/dictdlib_opendict/README.txt
  11. +369
    -0
      LICENSE/dictdlib_opendict/copying.html
  12. +1
    -0
      LICENSE/dictdlib_opendict/site
  13. +21
    -0
      LICENSE/fortune-fr/AUTHORS
  14. +108
    -0
      LICENSE/fortune-fr/CHANGES
  15. +1
    -0
      LICENSE/fortune-fr/site
  16. +24
    -0
      LICENSE/justabot/AUTHORS
  17. +506
    -0
      LICENSE/justabot/Licence_CeCILL_V2-en.txt
  18. +512
    -0
      LICENSE/justabot/Licence_CeCILL_V2-fr.txt
  19. +2
    -0
      LICENSE/justabot/site
  20. +34
    -0
      Makefile
  21. +81
    -0
      OBC.py
  22. +0
    -0
      README.md
  23. BIN
      __pycache__/OBC.cpython-32.pyc
  24. BIN
      __pycache__/OBC.cpython-37.pyc
  25. BIN
      __pycache__/admin.cpython-32.pyc
  26. BIN
      __pycache__/admin.cpython-37.pyc
  27. BIN
      __pycache__/commands.cpython-32.pyc
  28. BIN
      __pycache__/commands.cpython-37.pyc
  29. BIN
      __pycache__/demibot.cpython-32.pyc
  30. BIN
      __pycache__/demibot.cpython-37.pyc
  31. BIN
      __pycache__/myversion.cpython-37.pyc
  32. BIN
      __pycache__/tools.cpython-32.pyc
  33. BIN
      __pycache__/tools.cpython-37.pyc
  34. +192
    -0
      admin.py
  35. +343
    -0
      commands.py
  36. +0
    -0
      config/__init__.py
  37. BIN
      config/__pycache__/__init__.cpython-37.pyc
  38. BIN
      config/__pycache__/config.cpython-37.pyc
  39. BIN
      config/__pycache__/configadmin.cpython-37.pyc
  40. BIN
      config/__pycache__/configopt.cpython-37.pyc
  41. BIN
      config/__pycache__/configpass.cpython-37.pyc
  42. BIN
      config/__pycache__/configtra.cpython-37.pyc
  43. BIN
      config/__pycache__/configvar.cpython-37.pyc
  44. +34
    -0
      config/config.py
  45. +32
    -0
      config/configadmin.py
  46. +198
    -0
      config/configopt.py
  47. +8
    -0
      config/configpass.py
  48. +114
    -0
      config/configtra.py
  49. +7
    -0
      config/configvar.py
  50. +0
    -0
      config/py/__init__.py
  51. BIN
      config/py/__pycache__/__init__.cpython-37.pyc
  52. BIN
      config/py/__pycache__/alert.cpython-37.pyc
  53. BIN
      config/py/__pycache__/find.cpython-37.pyc
  54. BIN
      config/py/__pycache__/gith.cpython-37.pyc
  55. BIN
      config/py/__pycache__/ischange.cpython-37.pyc
  56. BIN
      config/py/__pycache__/poll.cpython-37.pyc
  57. BIN
      config/py/__pycache__/poolkick.cpython-37.pyc
  58. BIN
      config/py/__pycache__/titles.cpython-37.pyc
  59. +16
    -0
      config/py/alert.py
  60. +17
    -0
      config/py/find.py
  61. +16
    -0
      config/py/gith.py
  62. +3
    -0
      config/py/ischange.py
  63. +4
    -0
      config/py/poll.py
  64. +6
    -0
      config/py/poolkick.py
  65. +9
    -0
      config/py/titles.py
  66. +13
    -0
      config/static/artascii_/cafe.txt
  67. +6
    -0
      config/static/artascii_/hello.txt
  68. +15
    -0
      config/static/artascii_/nut.txt
  69. +43
    -0
      config/static/artascii_/tpb.txt
  70. +6
    -0
      config/static/available_artascii.txt
  71. +6
    -0
      config/static/available_fortune.txt
  72. +5
    -0
      config/static/available_game.txt
  73. +6
    -0
      config/static/available_tr.txt
  74. +92
    -0
      config/static/fortune_informatique
  75. +3401
    -0
      config/static/fortune_litterature_francaise
  76. +657
    -0
      config/static/fortune_philosophie
  77. +142
    -0
      config/static/fortune_proverbes
  78. +1047
    -0
      config/static/fortune_sciences
  79. +84
    -0
      config/static/game_linux
  80. +198
    -0
      config/static/game_test
  81. +94
    -0
      config/static/game_web
  82. BIN
      config/static/tr_/eng-fra.dict.dz
  83. +8805
    -0
      config/static/tr_/eng-fra.index
  84. BIN
      config/static/tr_/fra-eng.dict.dz
  85. +8511
    -0
      config/static/tr_/fra-eng.index
  86. +3
    -0
      config/var/avatar.txt
  87. +2
    -0
      config/var/badword.txt
  88. +3
    -0
      config/var/birthday.txt
  89. +2
    -0
      config/var/dict.txt
  90. +8
    -0
      config/var/event.txt
  91. +2
    -0
      config/var/flow.txt
  92. +1
    -0
      config/var/ischange.txt
  93. +174
    -0
      config/var/rblabla.txt
  94. +6
    -0
      config/var/rblabla_bis.txt
  95. +34
    -0
      config/var/rope.txt
  96. +117
    -0
      config/var/troll.txt
  97. +443
    -0
      demibot.py
  98. +7
    -0
      goodies/ARTWORK.txt
  99. +7
    -0
      goodies/art_ascii.txt
  100. +0
    -0
      goodies/big_smiley.txt

+ 247
- 0
DOC/CHANGELOG View File

@@ -0,0 +1,247 @@
v3.1 :
add !paf
add -V (version) (thank's kcchouette)
add path to sleekxmpp (thank's kcchouette)
fix some warning
add args with start.sh
can change kick to visitor (thank's kcchouette)

v3.0 :
itisset now by affiliation (del config/py/itis.py)
add !report
admin with #help (not !help)
add info and event plugins
add !h and key 'where' on all run()
and many fix

v2.12 :
add !rope
add badchars (on badword) and alert (thank's err404)
fix ban
add newcall() for plugins
fix alert
add aff in self.connected

v2.11 :
add !callmyself
add some start check
add !battle (thank's louiz)
fix artascii
add some artascii (thank's kcchouette)
add -u in start.sh (thank's kcchouette)
update tool and demibot (thank's kcchouette)
add !itis and few change with sha room

v2.10 :
plugin poll to kick another user
update doc for new repo
fix !troll
can now answer a jid matching a domain but not in a room (thank's ACross)
fix Amsg['jid']
add poll plugin
fix get jids when change user to admin
add !ubraille

v2.9 :
fix admin stop/restart
update doc (help to dev plugins)
fix ischange.py (text and rss)
add dir DOC and manual_EN
add librecase.eu in doc and license

v2.8 :
migrating python3
replace pyxmpp by sleekxmpp
include pythondns3
replace a-z by \w (commands.py, badword.py and stats.py)
fix titles.py (add thread)
now calc.py write in tmp/calc_
update LICENSE/ and doc
in config.py user is now jid

v2.7 :
add return titles from links
move game_web and game_linux from goodies/ to default config/
few changes : author's file, manuel_FR.pdf and add tato to !find

v2.6 :
add dir "py" in config
ischange is now a plugin
update doc (manuel_FR.pdf)
update game_test (real fr quizz)
update default rblabla.txt
fix !calc for timeout
update goodies/game_web and goodies/game_linux (thank's Gnuk)

v2.5 :
add !rot in morse.py
fix utf-8 in find.py
few fix in game.py (on results)
add on goodies/ game_linux, game_remontees (thank's remontees)
update rblabla_FR_2.txt (thank's remontees)
!game re-able to manage write raw
add !braille
add a second file for chat.py, rblabla_bis.txt
update plugin example
add !troll
add !calc
add !art (for ascii-art)
add a mute plugin

v2.4 :
add !find to create url
add prevent timeout
add translate morse
fix rblabla_fr_2 on goodies/
fix 'i' on plugin morse

v2.3 :
rablabla (match) can be insert with {1} {0} etc...
badword now spliting with [^a-zA-Z0-9]
some few fix (game, badword, chat) (thank's mario for all test and bugreport)
add a small game on goodies (thank's remontee (and for bugreport))
add tranlation for game plugin
fix chavatar

v2.2 :
fix restart

v2.1 :
some comment
few changes
run pep8 and pyflakes
fix rejoin on kick
update goodies/rblabla_FR_2.txt (thank's remontees)

v2.0 :
modify badword.py (class Flood)
change default configadmin and goodies/configtra_EN.py
fix !help
rewrite games (in QCM form)

v1.12 :
remove games
add a system plugin
few change on badword.py
puts var/ and static/ on dir config/ (some syntax modified)
update manual

v1.11 :
reorder the code
some fix

v1.10 :
replace xmppony with pyxmpp
fix kick and ban
update doc
remove checkconfig.py
fix get real_jid when admin

v1.9 :
add flood and chars limit for private message

v1.8 :
admin can write throught the bot
few modifications on dirs LICENSE/ and goodies/
add config for when admin
fix ischange when rss (keyword rss)
pearhaps fix atom in flow
add max chars per line (if admin)
adjust no-respond time

v1.7 :
add the !flow command
add an avatar (thank's cracolinux)
"python chat.py" to test your rblabla.txt

v1.6 :
add a few birthday.txt on goodies/ (thank's cracolinux)
change chat.py, now rblabla.txt accept {i} (for repeat matching)
add a rblabla.txt on goodies/ (thank's montagne-cable)
fix utf8 on regex of chat.py

v1.5 :
kick on too flood (if admin)
ban on too kick (if admin)

v1.4 :
upgrade xmpppy to xmppony
change manage of charset
run pyflakes and pep8 (thank's Paco)

v1.3 :
change to one commands.Com object by channel
change some list and methods

v1.2 :
add translate, include (for use) an extra from opendict and two dict from "free dict"
... manage dict.dz database
fix admin.py if msg == None

v1.1 :
if moderator then kick badwords (sorry)
support protected rooms

v1.0 : [seem stable]
change stats.py
special thank's to mario_26 Devosi for testing, suggest idea, motivation
change game.py (abort game when leave chan)
add accept subscription from admins account
few fix on demibot.py

v0.12 :
comment the code
clean stats when leave chan

v0.11 :
add logs
update some files
add change avatar (with admin command)

v0.10 :
add stats (warn : add values on configtra.py and configopt.py )
fix not detect var Admin as list
update ischange.py
update start.sh
add time and fix "show"
fix some encode error

v0.9 :
start.sh exec checkconfig.py before demibot.py
comment config/configopt.py file
remove INFO.txt and add manuel_FR.tex and manuel_FR.pdf

v0.8 :
delete nogame/game admin command
add admin command set (switch on/off all var in configopt.py)
admin commands return 'ok' on success
fix error when leave a chan
add checkconfig-0.8.py on goodies/ (to check config)

v0.7 :
add the existing command !stop in help
add some work of mario_26 on goodies/ : logo2.png/logo2.xcf, dict_linuxFR1.txt and rblabla_FR1.txt
add admin command "nogame/game" to disable public game
add admin command info

v0.6 :
add the directory "goodies/" for files which are not include by default
add thank's on authors file and the file site in directory LICENSE/justabot/
add logo.png in goodies/
add some words in the game speed
change separator of answers on end of a game question
fix bug when call game with 2nd arg not int
don't play if 2nd arg of game is incorrect

v0.5 :
add config/configtra.py (for easy translation)
add game.py (for playing) and 1 demo game (speed)
change some documentation (INFO.txt)
add config/configopt.py (for easy disable feature)
substitute in header "jabber" by "jabber/XMPP" (thank's to neustradamus)

v0.4 :
start this file
already available is : admin, badwords/repeat, birthday, chat, help, dict, fortune, ischange and an exemple chat (rblabla.txt)


+ 28
- 0
DOC/README.txt View File

@@ -0,0 +1,28 @@

Les licences sont dans le repertoire LICENSE

Licenses are in the directory LICENSE

For begin, install dependancies, then :

For just trying :

1 Run start.sh -e


(some files which is not include by default are in the directory goodies/)

0 Run start.sh -i

1 Edit files in config_user/

configopt.py > plugin to load
config.py > account

2 Edit config/*

3 run ./path/start.sh -e

4 Request subscription from admin account to bot account

5 write : !help, !h and #help

BIN
DOC/manual_EN.pdf View File


+ 466
- 0
DOC/manual_EN.tex View File

@@ -0,0 +1,466 @@
\documentclass[english,a4paper,12pt]{article}
%\usepackage[T1]{fontenc}
%\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{url}
\usepackage{hyperref}

\begin{document}


\title{Justabot}
\author{}
\date{May 2012, Update : Jun 2013}

\maketitle
\tableofcontents



\section{Description}


Born on may 2012, \emph{justabot} is write with python.
His license is \textbf{CECILL}. \url{http://www.cecill.info/licences/Licence_CeCILL_V2-fr.html} (GPL compatible)

See the file \emph{LICENSE/justabot/AUTHORS} for authors, contributions and thanks.

It use the lib \textbf{sleekxmpp}\\
\url{http://sleekxmpp.com/} (not include)

And it use \textbf{fortune-fr}\\
\url{http://www.fortunes-fr.org/}

And also an add of \textbf{opendict}\\
\url{http://opendict.idiles.com/files/}

It include some dict from \textbf{free dict}\\
\url{http://sourceforge.net/projects/freedict/}


It connects as user.

The request \emph{!help} in private message gives you the list of available commands.

It's possible to give it some commands with private and public message (some commands being restrict as one or other one)

It answer so when his nick is write in public or for any private's line.

Do not hesitate report bugs you find or suggest your idea or patches. (include this translation)


\textbf{CONTACT :}

\href{mailto:checkpoint@singularity.fr}{checkpoint@singularity.fr}
\url{http://librecase.eu}

\textbf{SOURCES :}

\url{https://gitorious.org/justabot}


\subsection{Depends}


\bigskip
\textbf{General :} \emph{sleekxmpp}\dots{} python3, a account and xmpp's room, and a unix like system.

The \textbf{!calc} command use \emph{/usr/bin/bc} (arbitrary-precision arithmetic language and calculator)
\bigskip

\section{Configuration}


The commons configs are in this directories :
\begin{itemize}
\item config/ : basic options
\item config/var/ : for the bot's behavior
\item config/static/ : for strict data
\item config/py/ : for configs which have a python syntax
\end{itemize}

At this, it is add \textbf{goodies/} in which it's possible to find some files already created.

For you own config, use : \emph{config\_user}

\subsection{The first try}

\begin{itemize}
\item add require dependancies
\item create a jabber account
\item run \emph{start.sh -i}
\item edit the file \emph{config\_user/config/config.py} and change the values
\item run \emph{start.sh -e}
\item with an informed admin's account, ask the bot to be in his roster (optional)
\item use \emph{!help}, \emph{!h}, \emph{\#help} for now all available commands
\end{itemize}

\subsection{For main usage}

\subsubsection{goodies/}

A set of preconceived files. In disorder.


\subsubsection{config/config.py}

For several \texttt{CHANNELS} or \texttt{ADMINS}, a dividing comma is required.

\subsubsection{config/configopt.py}

Some plugins start automatically. This can be change by user at any time with the admin's account\footnote{see the admin command \textbf{set}}.
They accept only the values \emph{True} or \emph{False}

When start with \textbf{G} they means \emph{groupchat} and \textbf{Q} for \emph{query}

\subsubsection{config/configtra.py}

Permit to edit some sentences use by the bot (for example the help's message)

\textbf{tra\_badword} is the list of random sentences which is write when several lines is repeated.


\subsubsection{config/configpass.py}

Permit to add a password for some rooms.

\subsubsection{config/configvar.py}

You will not have to change it.

\subsubsection{config/var/badword.txt}

A word's list which the bot will react \emph{config/configtra.py : tra\_badword}

If it's an entire word, add a space before and after it.

If the bot is \emph{moderator} then it also try to \emph{kick} the word's author.

\subsubsection{config/var/birthday.txt}

Dictionary's values which have this syntax :

dd/mm message (where dd is the day's number, mm the month's number and message the associated event)

\subsubsection{config/var/dict.txt}

Syntax of this dictionary :
\begin{verbatim}
keyword_with_no_space the associated define
\end{verbatim}

\subsubsection{config/var/ischange.txt (and config/py/ischange.py)}

\texttt{ISCHANGETIME} is the time in minutes between two check of URL target's change, \emph{var/ischange.txt} contains this data (number 0 to disable)

The URL's check list if the values \textbf{ISCHANGETIME} of \emph{config/py/ischange.py} is more than 1 (it means more than 1 minute).

The syntax :
\begin{verbatim}
keyword_no_space URL text
\end{verbatim}

Warn, only the change of the URL target are seek (it never understand the syntax), it's recommended to add here only little active rss feed.

If the URL check target return a change, then the bot display the link on all the room it is connected.

It is also possible to read the URL like a \textbf{rss} feed, for this, you have to add the keyword \emph{rss} at the end

The syntax is :
\begin{verbatim}
keyword_no_space URL rss
\end{verbatim}

\subsubsection{config/var/rblabla.txt (and config/var/rblabla\_bis.txt)}
The regex and answer for bot's talking.

Simple example :
\begin{itemize}
\item someone write the bot's \emph{NICK} in a sentence
\item The bot read the list from up to bottom
\item If a line begin with \emph{!regex!} match the sentence\footnote{it use the module \textbf{re of python}} then one of the following line is return.
\end{itemize}

The syntax :
\begin{verbatim}
# a line begin with sharp is forget

!regex! r'if this regex match then'
_this line can be answered
_or, this line, in random
_a smile can be add {s} !
_or the nickname of the user {n}
_or the result of what the regex has match {i}
\end{verbatim}

It's possible to return a part of the regex like this :
\begin{verbatim}
!regex! r'a(b|c)d (.*)'
_this is the sentence's end{1}
_this is one of b or c {0}
\end{verbatim}

The file \textbf{rblabla\_bis.txt} has the same syntax but it is \textbf{checked first} (for an easiest configuration).

\subsubsection{config/var/avatar.txt}

The available avatar are, if not blank, one of them with a random choice.

The syntax :
\begin{verbatim}
avatar1.png
avatar2.png
\end{verbatim}

\subsubsection{config/var/flow.txt}

URL list which are check with the \emph{!flow} command.

The syntax :
\begin{verbatim}
keyword_no_space URL
\end{verbatim}

Contrary at \emph{ischange} the commands required an request, but showed the latest values.

\subsubsection{config/var/troll.txt}

Take the part of a line begins with \texttt{a } and add her to (with random) a line beginning with \texttt{b } and continue until \texttt{h }

\begin{verbatim}
a a first part
a another first part

b a second part
b another second part (random)

[...]

h the end of the result
h another end
\end{verbatim}

Example result :

\emph{another first part a second part [...] another end}

\subsubsection{config/static/ : fortune}

\emph{available\_fortune.txt} is list which contain the available fortune's files (beginning with \emph{fortune\_} ).

The current files are from : \url{http://www.fortunes-fr.org/}


\subsubsection{config/static/ : tr}

\emph{available\_tr.txt} is list which contain the available tr's files (directory \emph{tr\_/} ).


The current files are from :
\textbf{free dict}
\url{http://sourceforge.net/projects/freedict/}

They use an \emph{addon} find in :
\textbf{opendict}
\url{http://opendict.idiles.com/files/}

\subsubsection{config/static/ : artascii}

\emph{available\_artascii.txt} contain the available ascci art files (directory \emph{artascii\_} ).

This require \texttt{no special} syntax for \emph{artascii\_/} file, the date is write \textbf{like-that}.


\subsubsection{config/static/ : game}

\emph{available\_game.txt} contain the available file names (beginning with \emph{game\_} ).

The \emph{game} syntax is (\textbf{QCM}) :

\begin{verbatim}
? question
_wrong answer
_another wrong
!win
_a wrong answer
!another good

? new question
_wrong
!right
\end{verbatim}

The syntax \emph{game} (\textbf{no choice}) can be :
\begin{verbatim}
? question
*it's right
*another good
*win
\end{verbatim}

\subsubsection{config/py/find.py}

\emph{DB = \{data\}}

...where \emph{data} must be :

'keyword' : ( 'description', 'http://first\_url\_part', 'last\_url\_part')

This return:

\texttt{http://first\_url\_part + the\_request + last\_url\_part}

\subsubsection{config/py/titles.py}

\emph{LINKS = ('the white list of url')}

\emph{NOAUTO\_LINKS = ('the white list of url with !title')}

\subsubsection{config/py/poolkick.py}

\emph{NUMBER} the minimal user who have to poll the kick

\emph{TIME} the maximum time to poll (in seconds)

\subsubsection{config/py/poll.py}

\emph{ALLOW\_POLLSET} is the list of jids allowed to reinit a poll


\section{Other}

\subsection{Directories}

\begin{itemize}
\item \textbf{DOC} : the documentation
\item \textbf{LICENSE} : All the license, the authors, etc.
\item \textbf{tmp} : the temporaries files
\item \textbf{sleekxmpp} : the lib \emph{sleekxmpp} which permit to communicate with XMPP protocol : \url{http://sleekxmpp.com/}
\item \textbf{dns} : the lib \emph{dnspython3} require by sleekxmpp : \url{http://www.dnspython.org}
\item \textbf{logs} : the logs
\item \textbf{libs} : some other external libs
\item \textbf{plugins} : the addable item
\end{itemize}

\subsection{start.sh}

This can require the +x right :
\begin{verbatim}
chmod +x start.sh
\end{verbatim}

\subsection{Admin commands}

If your jid is add to \emph{ADMINS}\footnote{config/config.py} \textbf{and} you have request subscription, you can use \emph{help} to know the admins command.\footnote{try under the roster (not by room's way)}

It accept :

\begin{verbatim}
#stop : offline
#restart : reconnect
#join chan : join the 'chan'
#leave chan : exit the 'chan'
#set : show the available plugins
#set plugin on/off : put a plugin available/unavailable
#info : show the bot statut
#statsfilenames : show the filename of channel
#chavatar : change avatar
#write chan text : write inside 'chan' the text 'text'
#alljoin : join all chans
#allleave : exit all chans
\end{verbatim}

\subsection{Help with plugins}

see \emph{config/configopt.py}

\subsection{Dev a plugin}

\subsubsection{Register it}

A plugin need to :
\begin{itemize}
\item be on directory \textbf{plugin}
\item have the extend \textbf{.py}
\item have a line on the file's begin \textbf{\#\#\#Iamplugin\#\#\#}
\item have a function \textbf{run()} and \textbf{newcall()}
\end{itemize}

A plugin class need to :
\begin{itemize}
\item have his name returned by \emph{torun}
\item have the good functions
\end{itemize}

\subsubsection{Torun}

This function must return a list of dict.

The dict's key are
\begin{itemize}
\item \textbf{'Torun':} and the class's name
\item \textbf{'Cfg':} and the value's name refered in \emph{config/configopt.py}
\item \textbf{'where':} and values \emph{'G'} if answer in room, \emph{'Q'} if answer in private and \emph{'@'} if answer directly
\end{itemize}

\subsubsection{The main class}

her name are to be on \emph{Torun}

This functions are needed:
\begin{itemize}
\item \textbf{STEPS(self)} which return a dict when \emph{\_\_call\_\_} must be executed
\item \textbf{\_\_init\_\_(self, it)} which is execute when the class is create
\item \textbf{\_\_call\_\_(self, Amsg, step, key)} which is execute when a steps inside \emph{STEPS} is coming
\item \textbf{unjoin(self, name)} which is execute when quit a room
\item \textbf{\_\_newcall\_\_(self, atime)} is run all minutes
\end{itemize}

\textbf{Legend :}
\begin{itemize}
\item \textbf{it} is the main class (self.cl)
\item \textbf{Amsg} a request data dict
\item \textbf{step} the step name
\item \textbf{key} the step keyword
\item \textbf{name} the room name
\item \textbf{atime} the seconds value
\end{itemize}

\textbf{\_\_call\_\_} must return one of this values :
\begin{itemize}
\item text (which stop another plugin and write)
\item True (which stop another plugin)
\item False (to continue)
\end{itemize}

\subsubsection{STEPS, Amsg}

\textbf{STEPS} has (\textbf{key}):
\begin{itemize}
\item flood (if flood filter has reject the request)
\item end (check at end, recomanded)
\item before (check first, before all)
\item pres (only for status message, presence)
\end{itemize}

The order has a defined priority (the \textbf{step}), this is names:
\begin{itemize}
\item 'emergency': 10,
\item 'first': 30,
\item 'before': 50,
\item 'simple': 70,
\item 'after': 90,
\item 'last': 110,
\end{itemize}

The \textbf{Amsg} values can be see with \textbf{INFO} plugin


\subsubsection{Special room @}

The special room named \textbf{@} manage what don't become from a room.

\end{document}

BIN
DOC/manual_FR.pdf View File


+ 467
- 0
DOC/manual_FR.tex View File

@@ -0,0 +1,467 @@
\documentclass[french,a4paper,12pt]{article}
%\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{url}
\usepackage{hyperref}

\begin{document}


\title{Justabot}
\author{}
\date{May 2012, Update : Jun 2013}

\maketitle
\tableofcontents



\section{Description}


Né en mai 2012, \emph{justabot} est écrit en python.
Il est sous licence \textbf{CECILL}. \url{http://www.cecill.info/licences/Licence_CeCILL_V2-fr.html}

Voir dans \emph{LICENSE/justabot/AUTHORS} pour les auteurs, contributeurs et remerciements.

Il utilise la librairie \textbf{sleekxmpp}\\
\url{http://sleekxmpp.com/} (non inclus)

Et il utilise \textbf{fortune-fr}\\
\url{http://www.fortunes-fr.org/}

Et aussi un \og{}extra\fg{} de \textbf{opendict}\\
\url{http://opendict.idiles.com/files/}

Et inclue des dictionnaires de \textbf{free dict}\\
\url{http://sourceforge.net/projects/freedict/}


Il se connecte en tant que client.

La commande \emph{!help} en message privé vous donnera la liste des commandes disponibles.

Il est possible de lui donner des commandes en privé comme en public (certaines commandes étant restreintes à l'un ou l'autre)

Il répond aussi lorsque son pseudonyme est écrit en public ou pour toute ligne en privé.

N'hésitez pas à signaler les bugs que vous trouverez et à suggerer vos idées ou modifications :


\textbf{CONTACT :}

\href{mailto:checkpoint@singularity.fr}{checkpoint@singularity.fr}
\url{http://librecase.eu}

\textbf{SOURCES :}

\url{https://gitorious.org/justabot}


\subsection{Dépendances}


\bigskip
\textbf{Général :} \emph{sleekxmpp}\dots{} python3, un compte et un salon xmpp, un systeme de genre Unix

La commande \textbf{!calc} utilise \emph{/usr/bin/bc} (arbitrary-precision arithmetic language and calculator)
\bigskip

\section{Configuration}


Les configurations les plus courantes sont regroupées dans les répértoires :
\begin{itemize}
\item config/ : pour les options basiques
\item config/var/ : pour le comportement du bot
\item config/static/ : pour les données plus brutes
\item config/py/ : pour les configurations ayant une syntaxe python
\end{itemize}

A cela s'ajoute le dossier \textbf{goodies/} dans lequel il est possible de trouver des fichiers de configurations déjà créés.

Pour votre configuration perssonelle, utilisez : \emph{config\_user}

\subsection{Premier lancement d'essai}

\begin{itemize}
\item ajouter les dependances requises
\item créer un compte jabber
\item exécuter \emph{start.sh -i}
\item éditer le fichier \emph{config\_user/config/config.py} et y adapter les variables
\item exécuter \emph{start.sh -e}
\item à partir du ou des comptes renseignés en ADMINS, demandez au compte du bot d'être dans son roster (facultatif)
\item utiliser \emph{!help}, \emph{!h}, \emph{\#help} pour connaître les options disponibles
\end{itemize}

\subsection{Configuration pour un usage courant}

\subsubsection{goodies/}

Un ensemble de fichiers préconçus. En vrac.


\subsubsection{config/config.py}

Pour plusieurs \texttt{CHANNELS} ou \texttt{ADMINS}, une virgule séparatrice est requise.

\subsubsection{config/configopt.py}

Liste des services démarrés automatiquement. Ils peuvent tous être changé ensuite par les administrateurs\footnote{Voir la commande admin \textbf{set}}.
Ne peuvent prendre comme valeur que \emph{True} ou \emph{False}

A noter que le préfixe \textbf{G} correspond à \emph{groupchat} et \textbf{Q} à \emph{query}

\subsubsection{config/configtra.py}

Permet de changer certains messages utilisé par le bot (en particulier les messages d'aide)

\textbf{tra\_badword} est le liste des phrases que pourra répondre le bot si un même message est répété trois fois en public.


\subsubsection{config/configpass.py}

Permet d'ajouter les mots de passe des salons protegés.

\subsubsection{config/configvar.py}

Ne devrait pas être changé.


\subsubsection{config/var/badword.txt}

Liste de mots qui feront automatiquement réagir le bot par une phrase de \emph{config/configtra.py : tra\_badword}

Si c'est un mot complet, ajouter une espace avant et après le mot.

Il est à noter que si le role du robot est \emph{moderateur} alors il essayera en plus de \emph{kicker} l'auteur du mot.

\subsubsection{config/var/birthday.txt}

Variables du dictionnaire de dates sous la forme :

jj/mm message (ou jj est le jour numérique, mm le mois numérique et message le message associé)

\subsubsection{config/var/dict.txt}

Dictionnaire commun sous la forme :
\begin{verbatim}
mot_clé_sans_espace la définition associée
\end{verbatim}
\subsubsection{config/var/ischange.txt (et config/py/ischange.py)}


\texttt{ISCHANGETIME} est l'intervalle de temps en minutes entre chaque vérification de modification des URL placées dans \emph{var/ischange.txt} (le chiffre 0 pour désactiver)


Liste des URL vérifiées si la variable \textbf{ISCHANGETIME} de \emph{config/py/ischange.py} est supérieure à 1 (qui correspond au nombre de minutes).

Sous la forme :
\begin{verbatim}
mot_clé_sans_espace URL text
\end{verbatim}

Attention, seul les changements de l'URL sont détectés (aucune compréhension de son contenu), il est conseillé de n'y mettre que des flux RSS peu actifs.

Si la cible d'une URL est détectée comme ayant des différences, alors le bot affichera le lien sur toute sa liste des chans auxquels il est connecté.

Il est aussi possible de lire l'URL comme un flux \textbf{rss}, pour cela, il faut ajouter en fin de ligne le mot clé \emph{rss}

Sous la forme :
\begin{verbatim}
mot_clé_sans_espace URL rss
\end{verbatim}

\subsubsection{config/var/rblabla.txt (et config/var/rblabla\_bis.txt)}
Algorithme de réponse lorsque l'on discute avec le bot.

Caricature de son fonctionnement :
\begin{itemize}
\item un message va être écrit en privé ou en public avec le \emph{NICKNAME} du bot
\item Le bot va parcourir cette liste de haut en bas.
\item Si une ligne commençant par \emph{!regex!} correspond\footnote{suivant la syntaxe du module \textbf{re de python}} à ce qui est écrit alors une des phrases suivantes sera renvoyée.
\end{itemize}

Sous la forme :
\begin{verbatim}
# toute ligne commençant par un dièse sera ignorée

!regex! r'cette regex sera détectée si elle est prononcée'
_alors cette phrase pourra être répondue
_ou, au hasard celle ci
_un smiley peut être inséré {s} !
_ou le pseudo de celui à qui le bot répond {n}
_ou le resultat de ce qui aura eté trouvé par la regex {i}
\end{verbatim}

Il est aussi possible de reprendre un terme de la phrase initiale de cette facon :
\begin{verbatim}
!regex! r'a(b|c)d (.*)'
_ceci est la fin de la phrase {1}
_ceci est un b ou un c {0}
\end{verbatim}

Le fichier \textbf{rblabla\_bis.txt} à exactement la même syntaxe mais sera seulement \textbf{vérifié en premier} (afin de faciliter l'administration).

\subsubsection{config/var/avatar.txt}

Liste les avatars disponibles, s'il n'est pas vide, l'un d'eux sera choisi au hasard.

Sous la forme :
\begin{verbatim}
avatar1.png
avatar2.png
\end{verbatim}

\subsubsection{config/var/flow.txt}

Liste des URL vérifiées avec la commande \emph{!flow}.

Sous la forme :
\begin{verbatim}
mot_clé_sans_espace URL
\end{verbatim}

Contrairement à \emph{ischange} elle ne sera executée que sur demande de l'utilisateur, mais affichera les derniers titres et liens du flux.

\subsubsection{config/var/troll.txt}

Prendra la partie de phrase d'une ligne commençant par \texttt{a } et l'ajoutera a une ligne (toujours au hasard) de celles commençant par \texttt{b } et ceci jusqu'à \texttt{h }

\begin{verbatim}
a un premiere partie
a toujours une premiere partie

b une seconde partie
b une autre seconde partie prise au hasard

[...]

h la derniere partie de votre phrase
h une autre derniere
\end{verbatim}

Exemple de résultat :

\emph{toujours une premiere partie une seconde partie [...] une autre derniere}

\subsubsection{config/static/ : fortune}

\emph{available\_fortune.txt} recense les fichiers (commençants par \emph{fortune\_} ) qui peuvent être utilisés.

Les fichiers fortune actuellement en place proviennent de : \url{http://www.fortunes-fr.org/}


\subsubsection{config/static/ : tr}

\emph{available\_tr.txt} recense les fichiers (du dossier \emph{tr\_/} ) qui peuvent être utilisés.


Les deux exemples proviennent de :
\textbf{free dict}
\url{http://sourceforge.net/projects/freedict/}

Et sont lus par un module se trouvant dans le dossier \emph{extra} de :
\textbf{opendict}
\url{http://opendict.idiles.com/files/}

\subsubsection{config/static/ : artascii}

\emph{available\_artascii.txt} recense les fichiers (du dossier \emph{artascii\_} ) qui peuvent être utilisés.

Il n'y a \texttt{aucune} syntaxe pour un fichier \emph{artascii\_/}, le contenu du fichier sera ecrit \textbf{tel-quel}.


\subsubsection{config/static/ : game}

\emph{available\_game.txt} recense les fichiers (préfixé par \emph{game\_} ) qui peuvent être utilisés.

La syntaxe d'un fichier \emph{game} (\textbf{QCM}) est la suivante :

\begin{verbatim}
? question
_mauvaise reponse
_autre mauvaise reponse
!bonne reponse
_encore une mauvaise reponse
!une autre bonne reponse

? nouvelle question
_faux
!juste
\end{verbatim}

La syntaxe d'un fichier \emph{game} (\textbf{écriture brute}) est la suivante :
\begin{verbatim}
? question
*une possibilité non écrite
*une autre
*autre réponse acceptée
\end{verbatim}


\subsubsection{config/py/find.py}

\emph{DB = \{contenu\}}

...ou \emph{contenu} doit être :

'mot-clé' : ( 'nom-long', 'http://premiere\_partie\_d'url', derniere\_partie\_d'url')

Le retour sera alors constitué ainsi :

\texttt{http://premiere\_partie\_d'url + votre\_demande + derniere\_partie\_d'url}

\subsubsection{config/py/titles.py}

\emph{LINKS = ('liste des débuts d'URL acceptés')}

\emph{NOAUTO\_LINKS = ('liste des débuts d'URL acceptés avec !title')}

\subsubsection{config/py/poolkick.py}

\emph{NUMBER} est le nombre d'utilisateur necessaire au vote d'un kick

\emph{TIME} est le temps (en secondes) maximal pour voter

\subsubsection{config/py/poll.py}

\emph{ALLOW\_POLLSET} est la liste des jids admis à reinitialiser un sondage

\section{Autres}

\subsection{Répertoires}

\begin{itemize}
\item \textbf{DOC} : les documentations
\item \textbf{LICENSE} : Les différentes licences, les auteurs, etc.
\item \textbf{tmp} : les hashages des sites de \emph{ischange}, les statistiques et ce qui peut être temporaire
\item \textbf{sleekxmpp} : la bibliothèque \emph{sleekxmpp} qui sert à communiquer avec le protocole XMPP : \url{http://sleekxmpp.com/}
\item \textbf{dns} : la bibliothèque \emph{dnspython3} dont dépend sleekxmpp : \url{http://www.dnspython.org}
\item \textbf{logs} : les logs
\item \textbf{libs} : les autres librairies externes
\item \textbf{plugins} : les elements ajoutables
\end{itemize}

\subsection{start.sh}

Suivant la façon dont il est exécuté, il peut nécessiter le droit d'exécution :
\begin{verbatim}
chmod +x start.sh
\end{verbatim}

\subsection{Administration à distance}

Si votre JID est dans \emph{ADMINS}\footnote{config/config.py} \textbf{et} que vous êtes inscrit dans les contacts du JID du robot (faites une demande d'autorisation), vous pourrez aussi utiliser \emph{help} pour connaître les commandes administrateur.\footnote{en lui écrivant directement par le roster (pas par le salon)}

Rapide apperçu :

\begin{verbatim}
#stop : arret
#restart : redémarage
#join chan : rejoint le 'chan'
#leave chan : quitte le 'chan'
#set : affiche les plugins presents
#set plugin on/off : active ou désactive un plugin
#info : informe de l'etat du bot
#statsfilenames : donne le hashage associé à chaque salon
#chavatar : change l'avatar
#write chan text : fait écrire au bot 'text' dans le 'chan'
#alljoin : rejoint tous les salons
#allleave : quitte tous les salons
\end{verbatim}

\subsection{Aide aux plugins}

voir \emph{config/configopt.py}

\subsection{Dev un plugin}

\subsubsection{Reconnaissance}

Un plugin est reconnu aux faits qu'il :
\begin{itemize}
\item est dans le repertoire \textbf{plugin}
\item a l'extension \textbf{.py}
\item comporte une ligne (dans les premieres) contenant \textbf{\#\#\#Iamplugin\#\#\#}
\item comporte une fonction \textbf{run()} et \textbf{newcall()}
\end{itemize}

Une classe de plugin est reconnue aux faits qu'elle :
\begin{itemize}
\item est renseignée dans le retour de \emph{torun}
\item contient les bonne fonctions
\end{itemize}

\subsubsection{Torun}

Cette fonction doit retourner un tableau contenant des dictionnaire.

Les dictionnaire comportent les mots clés suivant
\begin{itemize}
\item \textbf{'Torun':} suivi du nom de la classe qui sera appelée
\item \textbf{'Cfg':} suivi du nom de la variable renseignée dans \emph{config/configopt.py}
\item \textbf{'where':} suivi des caracteres \emph{'G'} s'il repond aux salons, \emph{'Q'} s'il repond en privé et \emph{'@'} s'il repond directement
\end{itemize}

\subsubsection{La classe principale}

La classe doit etre reseignée dans \emph{Torun}

Elle doit contenir les fonctions :
\begin{itemize}
\item \textbf{STEPS(self)} qui retourne un dictionnaire d'etapes auxquelles \emph{\_\_call\_\_} sera appelé
\item \textbf{\_\_init\_\_(self, it)} appelé à la creation de la classe
\item \textbf{\_\_call\_\_(self, Amsg, step, key)} qui sera appelé lors d'une étape renseignée dans \emph{STEPS}
\item \textbf{unjoin(self, name)} qui sera appelé lors de la fermeture d'un salon
\item \textbf{\_\_newcall\_\_(self, atime)} est appelé chaque minute
\end{itemize}

\textbf{Legende :}
\begin{itemize}
\item \textbf{it} est la classe client (self.cl)
\item \textbf{Amsg} un dictionnare relatif au message recu
\item \textbf{step} le nom dans l'étape actuelle
\item \textbf{key} l'étape actelle
\item \textbf{name} le nom du salon
\item \textbf{atime} la valeur des secondes
\end{itemize}

\textbf{\_\_call\_\_} doit retourner une des valeurs :
\begin{itemize}
\item du texte (ce qui stopera le parcours des plugins suivants et ecrira ce texte)
\item True (ce qui stopera le parcours mais n'ecrira rien)
\item False (ce qui donnera la main aux plugins suivants)
\end{itemize}

\subsubsection{STEPS, Amsg}

Les etapes de \textbf{STEPS} sont (\textbf{key}):
\begin{itemize}
\item flood (si l'antiflood rejetera le message)
\item end (executé a la fin, valeur conseillée)
\item before (executé en premier)
\item pres (executé lors d'un changement de presence)
\end{itemize}

A chacunes est associé un nom de priorité (\textbf{step}) qui fournira un ordre d'execution, les voici:
\begin{itemize}
\item 'emergency': 10,
\item 'first': 30,
\item 'before': 50,
\item 'simple': 70,
\item 'after': 90,
\item 'last': 110,
\end{itemize}

Les valeurs de \textbf{Amsg} sont visibles avec le plugins \textbf{INFO}

\subsubsection{Salon special @}

Le salon special qui est nommé \textbf{@} gère ce qui ne provient pas d'un salon.

\end{document}

+ 2
- 0
LICENSE/dict_dz/LICENSE View File

@@ -0,0 +1,2 @@
License
GNU General Public License (GPL)

+ 1
- 0
LICENSE/dict_dz/site View File

@@ -0,0 +1 @@
http://sourceforge.net/projects/freedict/files/

+ 19
- 0
LICENSE/dictdlib_opendict/AUTHORS.txt View File

@@ -0,0 +1,19 @@
OpenDict Authors
================
Last updated: 2007-06-20

o Martynas Jocius <martynas.jocius@idiles.com>
Maintainer and main developer
o Kęstutis Biliūnas <kebil@kaunas.init.lt>
Debian developer, contributor

o Linas Valiukas <shirshegsm@gmail.com>
MacOS X port

o Nerijus Baliūnas <nerijusb@dtiltas.lt>
Developer of better MS Windows platform support

o Mantas Kriaučiūnas <mantas@akl.lt>
Past developer


+ 50
- 0
LICENSE/dictdlib_opendict/README.txt View File

@@ -0,0 +1,50 @@
--------
OpenDict
--------

Copyright (c) 2003-2006 Martynas Jocius <martynas.jocius@idiles.com>
Copyright (c) 2007 IDILES SYSTEMS, UAB <support@idiles.com>

About
~~~~~

OpenDict is free multiplatform dictionary program. It is made to be
universal and easy to use for desktop users and developers.


Requirements
~~~~~~~~~~~~

- Python >= 2.3
- wxPython 2.6
- python-xml (PyXML)
- gettext >= 0.14


Quick Installation
~~~~~~~~~~~~~~~~~~

OpenDict on UNIX systems can be installed in a quick & dirty way:

# make install

If you get "cp: cannot stat `messages.pot': No such file or directory"
you are missing "pygettext" or "pygettext.py". "pygettext.py" in Fedora is
provided by python-tools package.


For Microsft Windows users
~~~~~~~~~~~~~~~~~~~~~~~~~~

MS Windows users should download setup with precompiled OpenDict version.

If you want to use it from sources, download and install Python, PyXML
and wxPython packages. Then unpack compressed OpenDict ZIP archive and
click on opendict.py icon.


Help
~~~~

For more information visit http://opendict.idiles.com.


+ 369
- 0
LICENSE/dictdlib_opendict/copying.html View File

@@ -0,0 +1,369 @@
<html>
<body>

<h3>The GNU General Public License (GPL)</h3>

<h3>Version 2, June 1991</h3>

<tt>

<p> Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br>
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p>

<p> Everyone is permitted to copy and distribute verbatim copies<br>
of this license document, but changing it is not allowed.</p>

<strong><p>Preamble</p></strong>

<p>The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.</p>

<p>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.</p>

<p>
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.</p>

<p>For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.</p>

<p>We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.</p>

<p>Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.</p>

<p>Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.</p>

<p>The precise terms and conditions for copying, distribution and
modification follow.</p>

<strong><p>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</p></strong>

<p><strong>0</strong>. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".</p>

<p>Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.</p>

<p><strong>1</strong>. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.</p>

<p>You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.</p>

<p> <strong>2</strong>. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:</p>

<blockquote>

<p>a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.</p>

<p>b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.</p>

<p>c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)</p></blockquote>

<p>These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.</p>

<p>Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.</p>

<p>In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.</p>

<p><strong>3</strong>. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:</p>
<blockquote>
<p>a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,</p>

<p> b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,</p>

<p>c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)</p></blockquote>

<p>The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.</p>

<p>If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.</p>

<p><strong>4</strong>. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.</p>

<p> <strong>5</strong>. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.</p>

<p><strong>6</strong>. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.</p>

<p><strong>7</strong>. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.</p>

<p>If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.</p>

<p>It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.</p>
<p>

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.</p>

<p> <strong>8</strong>. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.</p>
<p>
<strong>9</strong>. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.</p>

<p>Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.</p>

<p><strong>10</strong>. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.</p>

<p><strong>NO WARRANTY</strong></p>

<p><strong>11</strong>. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.</p>

<p><strong>12</strong>. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.</p>

<p>END OF TERMS AND CONDITIONS</p>








<!-- START OF 'HOW TO APPLY' SECTION -->
<p>
<strong> How to Apply These Terms to Your New Programs</strong></p>

<p> If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.</p>

<p> To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.</p>


<blockquote>
<p>One line to give the program's name and a brief idea of what it does.<br>
Copyright (C) &lt;year&gt; &lt;name of author&gt;</p>

<p>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 2 of the License, or
(at your option) any later version.</p>

<p> 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.</p>

<p>You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA</p>
</blockquote>
<p>
Also add information on how to contact you by electronic and paper mail.</p>

<p>If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:</p>

<blockquote>
<p> Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.</p>
</blockquote>

<p>The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.</p>
<p>
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:</p>

<blockquote>
<p>Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.</p>

<p>signature of Ty Coon, 1 April 1989<br>
Ty Coon, President of Vice</p>
</blockquote>

<p>This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.</p>

</body>
</html>

+ 1
- 0
LICENSE/dictdlib_opendict/site View File

@@ -0,0 +1 @@
http://opendict.idiles.com/files/

+ 21
- 0
LICENSE/fortune-fr/AUTHORS View File

@@ -0,0 +1,21 @@
Aurelien Jarno <aurelien@aurel32.net>

Un grand merci à Marc Riess qui a réalisé la compilation fortune.fr (domaine
public) sur laquelle est basée fortunes-fr.

Contributeurs :

- Francois Maltey <Francois.Maltey@enst-bretagne.fr>
Vérification de nombreuses citations
Rédaction des textes sur le Moyen-Âge et le XVIème siècle
Déclaration des droits de l'Homme et du citoyen, Gilbert Cesbron
et contributions diverses.
- Benoit Friry <benoit@friry.nom.fr>
Shadok, Jean Claude Vandamme, fr.rec.photo et contributions diverses

- Cyrille Chepelov <cyrille@chepelov.org>
FAI

- Samuel Landau <Samuel.Landau@lip6.fr>
GDP/debian-french

+ 108
- 0
LICENSE/fortune-fr/CHANGES View File

@@ -0,0 +1,108 @@
***** Sortie de fortunes-fr 0.01 *****
09/05/2004 Aurelien Jarno <aurelien@jarno.name>
* Ajout du Guide du Debianiste Pervers, citations issues de
debian-french, debian-devel-french et debian-user-french
* Suppression de la ligne vide entre la citation et le nom de
l'auteur, pour éviter les citations trop longues.
* Ajout de fr.rec.photo/, contribution de Benoit Friry. 113 citations.
* Ajout de haiku/, contribution de Benoit Friry. 16 citations.
* Ajout de citations :
- 3 citations d'Alain
- 1 citation de Jean Tardieu
- 1 citation de Jonathan Swift
- 1 citation de Michel Serres
- 3 citations de Platon
- 1 citation d'Henri Michaux
- 2 citation de Galilée
- 1 citation d'Alexandre Dumas
- 4 citations de Ludwig von Wittgenstein
- 6 citations d'Euclide
- 1 citation de Cicéron
- 1 citation de Galois
* Ajout d'un test cherchant les lignes ne contenant que des
espaces.
* Contributions de Benoit Friry :
- 31 citations de Philippe Geluck, Le chat
- 3 citations de Terry Pratchett
- 1 citation de Pierre Bordage
- 1 citation de Douglas Adams
- 1 citation de Philip Kindred Dick
- 1 citation de Bernard Werber
- 2 citations d'Amélie Nothomb
- 3 citations d'Henri Cartier-Bresson
- 8 citations de Jacques-Henri Lartigue
- 1 citation de Vladimir Nabokov

08/05/2004 Aurelien Jarno <aurelien@jarno.name>
* Contributions de Benoit Friry:
- 1 citation de Pierre Dac
- 1 citation de Voltaire
- 4 citations de Pierre Desproges
- 1 citation de Georges Courteline
- 2 citations de Jules Renard
- 1 citation de Coluche
- 1 citation de Jacques Prévert
- 1 citation de Sénèque
- 3 citations d'Alfred Korzybski
- 1 citation de Georges Perec
- 1 citation de Raymond Queneau
- 1 citation de Sylvie Testud
- 1 citation de Julio Cortázar
- 1 citation de Roland Barthes
- 1 citation de Harry Laus
- 1 citation de Léo Ferré

***** Sortie de fortunes-fr 0.01 *****

03/05/2004 François Maltey <Francois.Maltey@enst-bretagne.fr>

* Ajout des dates de naissance des auteurs suivants: Gilbert
Cesbron, Alain, Albert Camus, Albert Memmi, Alexandre Dumas,
Alexandre Dumas fils, Alfred de Musset, Alphonse de Lamartine,
Anatole France, André Dhôtel, André Gide, André Malraux,
Antoine de Saint-Exupéry.
* Déplacement de antiphane, alexandre_soljenitsyne, aristote et
socrate dans philosophie.
* Séparation de littérature en littérature françasie et
littérature étrangère.
* Déplacement de friedrich_nietzsche dans philosophie.
* Correction d'un nom de l'auteur apparaissant deux fois dans
francois_rabelais

16/03/2004 Aurelien Jarno <aurelien@aurel32.net>

* Écriture des scripts.

16/03/2004 Aurelien Jarno <aurelien@aurel32.net>

* Création de informatique/fai.

07/03/2004 Aurelien Jarno <aurelien@aurel32.net>

* Vérification des citations au dictionnaire orthographique.

10/08/2002 François Maltey <Francois.Maltey@enst-bretagne.fr>

* Vérification des citations de La Fontaine à l'aide du livre de La
Pléiade. 121 citations.

11/07/2002 François Maltey <Francois.Maltey@enst-bretagne.fr>

* Vérification des citations de Rabelais à l'aide du livre de La
Pléiade. 23 citations.

12/06/2002 François Maltey <Francois.Maltey@enst-bretagne.fr>

* Vérification des citations de La Rochefoucauld à l'aide du livre de
La Pléiade. 112 citations.
* Vérification des citations de Rutebeuf à l'aide du livre de La
Pléiade. 2 citations.
* Vérification des citations de Villon à l'aide du livre de La Pléiade.
6 citations.
* Vérification des citations du Romand de Renart à l'aide du livre
de La Pléiade. 1 citation.

03/06/2002 François Maltey <Francois.Maltey@enst-bretagne.fr>
* Vérification des citations de Pascal à l'aide du livre de La
Pléiade. 38 citations.


+ 1
- 0
LICENSE/fortune-fr/site View File

@@ -0,0 +1 @@
http://www.fortunes-fr.org/

+ 24
- 0
LICENSE/justabot/AUTHORS View File

@@ -0,0 +1,24 @@
Original author (copyright) :
Copyleft May 2012 Crestetto Kévin
checkpoint [at] singularity (dot) fr
(librecase.eu)

Code source :
https://gitorious.org/justabot

Goodie and Config Contributors :
Mario Devosi, alias mario_26 (devosi.org)
montagne-cable (montagne-cable.legtux.org)
cracolinux
Gnuk's Network Kernel for Web (GNKW.org)
kcchouette (kcchouette.tk)

Beta Tester :
Kcchouette
Mario_26 Devosi

Thank's to :
neustradamus
Paco
Louiz
err404

+ 506
- 0
LICENSE/justabot/Licence_CeCILL_V2-en.txt View File

@@ -0,0 +1,506 @@

CeCILL FREE SOFTWARE LICENSE AGREEMENT


Notice

This Agreement is a Free Software license agreement that is the result
of discussions between its authors in order to ensure compliance with
the two main principles guiding its drafting:

* firstly, compliance with the principles governing the distribution
of Free Software: access to source code, broad rights granted to
users,
* secondly, the election of a governing law, French law, with which
it is conformant, both as regards the law of torts and
intellectual property law, and the protection that it offers to
both authors and holders of the economic rights over software.

The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:

Commissariat à l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.

Centre National de la Recherche Scientifique - CNRS, a public scientific
and technological establishment, having its principal place of business
at 3 rue Michel-Ange, 75794 Paris cedex 16, France.

Institut National de Recherche en Informatique et en Automatique -
INRIA, a public scientific and technological establishment, having its
principal place of business at Domaine de Voluceau, Rocquencourt, BP
105, 78153 Le Chesnay cedex, France.


Preamble

The purpose of this Free Software license agreement is to grant users
the right to modify and redistribute the software governed by this
license within the framework of an open source distribution model.

The exercising of these rights is conditional upon certain obligations
for users so as to preserve this status for all subsequent redistributions.

In consideration of access to the source code and the rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors only have limited liability.

In this respect, the risks associated with loading, using, modifying
and/or developing or reproducing the software by the user are brought to
the user's attention, given its Free Software status, which may make it
complicated to use, with the result that its use is reserved for
developers and experienced professionals having in-depth computer
knowledge. Users are therefore encouraged to load and test the
suitability of the software as regards their requirements in conditions
enabling the security of their systems and/or data to be ensured and,
more generally, to use and operate it in the same conditions of
security. This Agreement may be freely reproduced and published,
provided it is not altered, and that no provisions are either added or
removed herefrom.

This Agreement may apply to any or all software for which the holder of
the economic rights decides to submit the use thereof to its provisions.


Article 1 - DEFINITIONS

For the purpose of this Agreement, when the following expressions
commence with a capital letter, they shall have the following meaning:

Agreement: means this license agreement, and its possible subsequent
versions and annexes.

Software: means the software in its Object Code and/or Source Code form
and, where applicable, its documentation, "as is" when the Licensee
accepts the Agreement.

Initial Software: means the Software in its Source Code and possibly its
Object Code form and, where applicable, its documentation, "as is" when
it is first distributed under the terms and conditions of the Agreement.

Modified Software: means the Software modified by at least one
Contribution.

Source Code: means all the Software's instructions and program lines to
which access is required so as to modify the Software.

Object Code: means the binary files originating from the compilation of
the Source Code.

Holder: means the holder(s) of the economic rights over the Initial
Software.

Licensee: means the Software user(s) having accepted the Agreement.

Contributor: means a Licensee having made at least one Contribution.

Licensor: means the Holder, or any other individual or legal entity, who
distributes the Software under the Agreement.

Contribution: means any or all modifications, corrections, translations,
adaptations and/or new functions integrated into the Software by any or
all Contributors, as well as any or all Internal Modules.

Module: means a set of sources files including their documentation that
enables supplementary functions or services in addition to those offered
by the Software.

External Module: means any or all Modules, not derived from the
Software, so that this Module and the Software run in separate address
spaces, with one calling the other when they are run.

Internal Module: means any or all Module, connected to the Software so
that they both execute in the same address space.

GNU GPL: means the GNU General Public License version 2 or any
subsequent version, as published by the Free Software Foundation Inc.

Parties: mean both the Licensee and the Licensor.

These expressions may be used both in singular and plural form.


Article 2 - PURPOSE

The purpose of the Agreement is the grant by the Licensor to the
Licensee of a non-exclusive, transferable and worldwide license for the
Software as set forth in Article 5 hereinafter for the whole term of the
protection granted by the rights over said Software.


Article 3 - ACCEPTANCE

3.1 The Licensee shall be deemed as having accepted the terms and
conditions of this Agreement upon the occurrence of the first of the
following events:

* (i) loading the Software by any or all means, notably, by
downloading from a remote server, or by loading from a physical
medium;
* (ii) the first time the Licensee exercises any of the rights
granted hereunder.

3.2 One copy of the Agreement, containing a notice relating to the
characteristics of the Software, to the limited warranty, and to the
fact that its use is restricted to experienced users has been provided
to the Licensee prior to its acceptance as set forth in Article 3.1
hereinabove, and the Licensee hereby acknowledges that it has read and
understood it.


Article 4 - EFFECTIVE DATE AND TERM


4.1 EFFECTIVE DATE

The Agreement shall become effective on the date when it is accepted by
the Licensee as set forth in Article 3.1.


4.2 TERM

The Agreement shall remain in force for the entire legal term of
protection of the economic rights over the Software.


Article 5 - SCOPE OF RIGHTS GRANTED

The Licensor hereby grants to the Licensee, who accepts, the following
rights over the Software for any or all use, and for the term of the
Agreement, on the basis of the terms and conditions set forth hereinafter.

Besides, if the Licensor owns or comes to own one or more patents
protecting all or part of the functions of the Software or of its
components, the Licensor undertakes not to enforce the rights granted by
these patents against successive Licensees using, exploiting or
modifying the Software. If these patents are transferred, the Licensor
undertakes to have the transferees subscribe to the obligations set
forth in this paragraph.


5.1 RIGHT OF USE

The Licensee is authorized to use the Software, without any limitation
as to its fields of application, with it being hereinafter specified
that this comprises:

1. permanent or temporary reproduction of all or part of the Software
by any or all means and in any or all form.

2. loading, displaying, running, or storing the Software on any or
all medium.

3. entitlement to observe, study or test its operation so as to
determine the ideas and principles behind any or all constituent
elements of said Software. This shall apply when the Licensee
carries out any or all loading, displaying, running, transmission
or storage operation as regards the Software, that it is entitled
to carry out hereunder.


5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS

The right to make Contributions includes the right to translate, adapt,
arrange, or make any or all modifications to the Software, and the right
to reproduce the resulting software.

The Licensee is authorized to make any or all Contributions to the
Software provided that it includes an explicit notice that it is the
author of said Contribution and indicates the date of the creation thereof.


5.3 RIGHT OF DISTRIBUTION

In particular, the right of distribution includes the right to publish,
transmit and communicate the Software to the general public on any or
all medium, and by any or all means, and the right to market, either in
consideration of a fee, or free of charge, one or more copies of the
Software by any means.

The Licensee is further authorized to distribute copies of the modified
or unmodified Software to third parties according to the terms and
conditions set forth hereinafter.


5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION

The Licensee is authorized to distribute true copies of the Software in
Source Code or Object Code form, provided that said distribution
complies with all the provisions of the Agreement and is accompanied by:

1. a copy of the Agreement,

2. a notice relating to the limitation of both the Licensor's