Merge branch 'master' of soutade.fr:iwla
This commit is contained in:
commit
33472e564a
1
TODO
1
TODO
|
@ -1,4 +1,3 @@
|
||||||
doc auto generation
|
|
||||||
doc enhancement
|
doc enhancement
|
||||||
Limit hits/pages/downloads by rate
|
Limit hits/pages/downloads by rate
|
||||||
Automatic tests
|
Automatic tests
|
||||||
|
|
|
@ -2,9 +2,9 @@ import os
|
||||||
|
|
||||||
# Default configuration
|
# Default configuration
|
||||||
|
|
||||||
# Default directory where to store database information
|
# Default database directory
|
||||||
DB_ROOT = './output_db'
|
DB_ROOT = './output_db'
|
||||||
# Default directory where to create html files
|
# Default HTML output directory
|
||||||
DISPLAY_ROOT = './output'
|
DISPLAY_ROOT = './output'
|
||||||
|
|
||||||
# Hooks directories (don't edit)
|
# Hooks directories (don't edit)
|
||||||
|
@ -17,7 +17,7 @@ META_PATH = os.path.join(DB_ROOT, 'meta.db')
|
||||||
# Database filename per month
|
# Database filename per month
|
||||||
DB_FILENAME = 'iwla.db'
|
DB_FILENAME = 'iwla.db'
|
||||||
|
|
||||||
# Web server log format (nginx style). Default is what apache log
|
# Web server log format (nginx style). Default is apache log format
|
||||||
log_format = '$server_name:$server_port $remote_addr - $remote_user [$time_local] ' +\
|
log_format = '$server_name:$server_port $remote_addr - $remote_user [$time_local] ' +\
|
||||||
'"$request" $status $body_bytes_sent ' +\
|
'"$request" $status $body_bytes_sent ' +\
|
||||||
'"$http_referer" "$http_user_agent"'
|
'"$http_referer" "$http_user_agent"'
|
||||||
|
@ -30,7 +30,7 @@ pre_analysis_hooks = []
|
||||||
post_analysis_hooks = []
|
post_analysis_hooks = []
|
||||||
display_hooks = []
|
display_hooks = []
|
||||||
|
|
||||||
# Extensions that are considered as a HTML page (or result)
|
# Extensions that are considered as a HTML page (or result) in opposite to hits
|
||||||
pages_extensions = ['/', 'htm', 'html', 'xhtml', 'py', 'pl', 'rb', 'php']
|
pages_extensions = ['/', 'htm', 'html', 'xhtml', 'py', 'pl', 'rb', 'php']
|
||||||
# HTTP codes that are cosidered OK
|
# HTTP codes that are cosidered OK
|
||||||
viewed_http_codes = [200, 304]
|
viewed_http_codes = [200, 304]
|
||||||
|
@ -49,7 +49,7 @@ icon_path = '%s/%s' % (os.path.basename(resources_path[0]), 'icon')
|
||||||
# CSS path (you can add yours)
|
# CSS path (you can add yours)
|
||||||
css_path = ['%s/%s/%s' % (os.path.basename(resources_path[0]), 'css', 'iwla.css')]
|
css_path = ['%s/%s/%s' % (os.path.basename(resources_path[0]), 'css', 'iwla.css')]
|
||||||
|
|
||||||
# Extensions to compress in gzip during display build
|
# Files extensions to compress in gzip during display build
|
||||||
compress_output_files = []
|
compress_output_files = []
|
||||||
|
|
||||||
# Path to locales files
|
# Path to locales files
|
||||||
|
|
14
display.py
14
display.py
|
@ -27,6 +27,12 @@ import logging
|
||||||
# Create output HTML files
|
# Create output HTML files
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Just for detection
|
||||||
|
def _(name): pass
|
||||||
|
_('January'), _('February'), _('March'), _('April'), _('May'), _('June'), _('July')
|
||||||
|
_('August'), _('September'), _('October'), _('November'), _('December')
|
||||||
|
del _
|
||||||
|
|
||||||
class DisplayHTMLRaw(object):
|
class DisplayHTMLRaw(object):
|
||||||
|
|
||||||
def __init__(self, iwla, html=u''):
|
def __init__(self, iwla, html=u''):
|
||||||
|
@ -370,6 +376,12 @@ def generateHTMLLink(url, name=None, max_length=100, prefix=u'http'):
|
||||||
return u'<a href="%s">%s</a>' % (url, name[:max_length])
|
return u'<a href="%s">%s</a>' % (url, name[:max_length])
|
||||||
|
|
||||||
def createCurTitle(iwla, title):
|
def createCurTitle(iwla, title):
|
||||||
title = iwla._(title) + time.strftime(u' - %B %Y', iwla.getCurTime())
|
title = iwla._(title)
|
||||||
|
month_name = time.strftime(u'%B', iwla.getCurTime())
|
||||||
|
year = time.strftime(u'%Y', iwla.getCurTime())
|
||||||
|
title += u' - %s %s' % (iwla._(month_name), year)
|
||||||
|
domain_name = iwla.getConfValue('domain_name', '')
|
||||||
|
if domain_name:
|
||||||
|
title += u' - %s' % (domain_name)
|
||||||
return title
|
return title
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
iwla
|
||||||
|
====
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
iwla (Intelligent Web Log Analyzer) is basically a clone of [awstats](http://www.awstats.org). The main problem with awstats is that it's a very monolothic project with everything in one big PERL file. In opposite, iwla has be though to be very modular : a small core analysis and a lot of filters. It can be viewed as UNIX pipes. Philosophy of iwla is : add, update, delete ! That's the job of each filters : modify statistics until final result.
|
||||||
|
|
||||||
|
Nevertheless, iwla is only focused on HTTP logs. It uses data (robots definitions, search engines definitions) and design from awstats. Moreover, it's not dynamic, but only generates static HTML page (with gzip compression option).
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
./iwla [-c|--clean-output] [-i|--stdin] [-f FILE|--file FILE] [-d LOGLEVEL|--log-level LOGLEVEL]
|
||||||
|
|
||||||
|
-c : Clean output (database and HTML) before starting
|
||||||
|
-i : Read data from stdin instead of conf.analyzed_filename
|
||||||
|
-f : Read data from FILE instead of conf.analyzed_filename
|
||||||
|
-d : Loglevel in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
|
||||||
|
|
||||||
|
Basic usage
|
||||||
|
-----------
|
||||||
|
|
||||||
|
In addition to command line, iwla read parameters in default_conf.py. User can override default values using _conf.py_ file. Each module requires its own parameters.
|
||||||
|
|
||||||
|
Main values to edit are :
|
||||||
|
|
||||||
|
* **analyzed_filename** : web server log
|
||||||
|
* **domaine_name** : domain name to filter
|
||||||
|
* **pre_analysis_hooks** : List of pre analysis hooks
|
||||||
|
* **post_analysis_hooks** : List of post analysis hooks
|
||||||
|
* **display_hooks** : List of display hooks
|
||||||
|
* **locale** : Displayed locale (_en_ or _fr_)
|
||||||
|
|
||||||
|
Then, you can then iwla. Output HTML files are created in _output_ directory by default. To quickly see it go in output and type
|
||||||
|
|
||||||
|
python -m SimpleHTTPServer 8000
|
||||||
|
|
||||||
|
Open your favorite web browser at _http://localhost:8000_. Enjoy !
|
||||||
|
|
||||||
|
**Warning** : The order is hooks list is important : Some plugins may requires others plugins, and the order of display_hooks is the order of displayed blocks in final result.
|
||||||
|
|
||||||
|
|
||||||
|
Interesting default configuration values
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
* **DB_ROOT** : Default database directory (default ./output_db)
|
||||||
|
* **DISPLAY_ROOT** : Default HTML output directory (default ./output)
|
||||||
|
* **log_format** : Web server log format (nginx style). Default is apache log format
|
||||||
|
* **time_format** : Time format used in log format
|
||||||
|
* **pages_extensions** : Extensions that are considered as a HTML page (or result) in opposit to hits
|
||||||
|
* **viewed_http_codes** : HTTP codes that are cosidered OK (200, 304)
|
||||||
|
* **count_hit_only_visitors** : If False, doesn't cout visitors that doesn't GET a page but resources only (images, rss...)
|
||||||
|
* **multimedia_files** : Multimedia extensions (not accounted as downloaded files)
|
||||||
|
* **css_path** : CSS path (you can add yours)
|
||||||
|
* **compress_output_files** : Files extensions to compress in gzip during display build
|
||||||
|
|
||||||
|
Plugins
|
||||||
|
-------
|
||||||
|
|
||||||
|
As previously described, plugins acts like UNIX pipes : statistics are constantly updated by each plugin to produce final result. We have three type of plugins :
|
||||||
|
|
||||||
|
* **Pre analysis plugins** : Called before generating days statistics. They are in charge to filter robots, crawlers, bad pages...
|
||||||
|
* **Post analysis plugins** : Called after basic statistics computation. They are in charge to enlight them with their own algorithms
|
||||||
|
* **Display plugins** : They are in charge to produce HTML files from statistics.
|
||||||
|
|
||||||
|
To use plugins, just insert their name in _pre_analysis_hooks_, _post_analysis_hooks_ and _display_hooks_ lists in conf.py.
|
||||||
|
|
||||||
|
Statistics are stored in dictionaries :
|
||||||
|
|
||||||
|
* **month_stats** : Statistics of current analysed month
|
||||||
|
* **valid_visitor** : A subset of month_stats without robots
|
||||||
|
* **days_stats** : Statistics of current analysed day
|
||||||
|
* **visits** : All visitors with all of its requests
|
||||||
|
* **meta** : Final result of month statistics (by year)
|
||||||
|
|
||||||
|
Create a Plugins
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To create a new plugin, it's necessary to create a derived class of IPlugin (_iplugin.py) in the right directory (_plugins/xxx/yourPlugin.py_).
|
||||||
|
|
||||||
|
Plugins can defines required configuration values (self.conf_requires) that must be set in conf.py (or can be optional). They can also defines required plugins (self.requires).
|
||||||
|
|
||||||
|
The two functions to overload are _load(self)_ that must returns True or False if all is good (or not). It's called after _init_. The second is _hook(self)_ that is the body of plugins.
|
||||||
|
|
||||||
|
For display plugins, a lot of code has been wrote in _display.py_ that simplify the creation on HTML blocks, tables and bar graphs.
|
||||||
|
|
||||||
|
Plugins
|
||||||
|
=======
|
||||||
|
|
||||||
|
Optional configuration values ends with *.
|
||||||
|
|
312
iwla.pot
312
iwla.pot
|
@ -4,242 +4,276 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: iwla\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2014-12-16 21:36+CET\n"
|
"POT-Creation-Date: 2014-12-19 17:46+CET\n"
|
||||||
"PO-Revision-Date: 2014-12-17 19:07+0100\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: Soutadé <soutade@gmail.com>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: iwla <iwla>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: ENCODING\n"
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
"Language: en\n"
|
|
||||||
"X-Generator: Poedit 1.6.10\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
|
||||||
|
|
||||||
#: iwla.py:343
|
|
||||||
msgid "Statistics"
|
#: display.py:32
|
||||||
|
msgid "April"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:349
|
#: display.py:32
|
||||||
msgid "By day"
|
msgid "February"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:349
|
#: display.py:32
|
||||||
msgid "Day"
|
msgid "January"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402
|
#: display.py:32
|
||||||
msgid "Not viewed Bandwidth"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402
|
|
||||||
msgid "Visits"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
|
||||||
#: plugins/display/top_downloads.py:74 plugins/display/top_visitors.py:53
|
|
||||||
msgid "Hits"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
|
||||||
#: plugins/display/top_visitors.py:53
|
|
||||||
msgid "Pages"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/top_visitors.py:53
|
|
||||||
msgid "Bandwidth"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:386
|
|
||||||
msgid "Average"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:391 iwla.py:429
|
|
||||||
msgid "Total"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Apr"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Aug"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Dec"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Feb"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Jan"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "July"
|
msgid "July"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:32
|
||||||
|
msgid "March"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: display.py:32 iwla.py:428
|
||||||
msgid "June"
|
msgid "June"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:32 iwla.py:428
|
||||||
msgid "Mar"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "May"
|
msgid "May"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:33
|
||||||
|
msgid "August"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "December"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "November"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "October"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "September"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:371
|
||||||
|
msgid "Statistics"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377
|
||||||
|
msgid "By day"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377
|
||||||
|
msgid "Day"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430
|
||||||
|
msgid "Not viewed Bandwidth"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430
|
||||||
|
msgid "Visits"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
|
#: plugins/display/top_downloads.py:97 plugins/display/top_visitors.py:72
|
||||||
|
msgid "Hits"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
|
#: plugins/display/top_visitors.py:72
|
||||||
|
msgid "Pages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/top_visitors.py:72
|
||||||
|
msgid "Bandwidth"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:414
|
||||||
|
msgid "Average"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:419 iwla.py:457
|
||||||
|
msgid "Total"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Apr"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Aug"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Dec"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Feb"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Jan"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Jul"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Mar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
msgid "Nov"
|
msgid "Nov"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:400
|
#: iwla.py:428
|
||||||
msgid "Oct"
|
msgid "Oct"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:400
|
#: iwla.py:428
|
||||||
msgid "Sep"
|
msgid "Sep"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:401
|
#: iwla.py:429
|
||||||
msgid "Summary"
|
msgid "Summary"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:402
|
#: iwla.py:430
|
||||||
msgid "Month"
|
msgid "Month"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:402
|
#: iwla.py:430
|
||||||
msgid "Visitors"
|
msgid "Visitors"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:402 iwla.py:412
|
#: iwla.py:430 iwla.py:440
|
||||||
msgid "Details"
|
msgid "Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:436
|
#: iwla.py:465
|
||||||
msgid "Statistics for"
|
msgid "Statistics for"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: iwla.py:443
|
#: iwla.py:472
|
||||||
msgid "Last update"
|
msgid "Last update"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:45 plugins/display/all_visits.py:73
|
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||||
msgid "All visits"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||||
msgid "Last seen"
|
msgid "Last seen"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:74 plugins/display/top_visitors.py:53
|
#: plugins/display/all_visits.py:92
|
||||||
|
msgid "All visits"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: plugins/display/all_visits.py:93 plugins/display/top_visitors.py:72
|
||||||
msgid "Top visitors"
|
msgid "Top visitors"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:72 plugins/display/referers.py:78
|
#: plugins/display/referers.py:95
|
||||||
msgid "Connexion from"
|
msgid "Connexion from"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
msgid "Origin"
|
msgid "Origin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:82 plugins/display/referers.py:121
|
#: plugins/display/referers.py:99 plugins/display/referers.py:156
|
||||||
msgid "Search Engine"
|
msgid "Search Engine"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:91 plugins/display/referers.py:132
|
#: plugins/display/referers.py:110 plugins/display/referers.py:125
|
||||||
msgid "External URL"
|
#: plugins/display/referers.py:140 plugins/display/referers.py:163
|
||||||
msgstr ""
|
#: plugins/display/referers.py:174 plugins/display/referers.py:185
|
||||||
|
#: plugins/display/referers.py:222 plugins/display/top_downloads.py:83
|
||||||
#: plugins/display/referers.py:100 plugins/display/referers.py:143
|
#: plugins/display/top_downloads.py:103 plugins/display/top_hits.py:82
|
||||||
msgid "External URL (robot)"
|
#: plugins/display/top_hits.py:103 plugins/display/top_pages.py:82
|
||||||
msgstr ""
|
#: plugins/display/top_pages.py:102 plugins/display/top_visitors.py:92
|
||||||
|
|
||||||
#: plugins/display/referers.py:112
|
|
||||||
msgid "Top Referers"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: plugins/display/referers.py:114
|
|
||||||
msgid "All Referers"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: plugins/display/referers.py:128 plugins/display/referers.py:139
|
|
||||||
#: plugins/display/referers.py:150 plugins/display/referers.py:187
|
|
||||||
#: plugins/display/top_downloads.py:80 plugins/display/top_hits.py:79
|
|
||||||
#: plugins/display/top_pages.py:79 plugins/display/top_visitors.py:73
|
|
||||||
msgid "Others"
|
msgid "Others"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:158
|
#: plugins/display/referers.py:114 plugins/display/referers.py:167
|
||||||
msgid "Key Phrases"
|
msgid "External URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:175
|
#: plugins/display/referers.py:129 plugins/display/referers.py:178
|
||||||
|
msgid "External URL (robot)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:147
|
||||||
|
msgid "Top Referers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:149
|
||||||
|
msgid "All Referers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:200 plugins/display/referers.py:210
|
||||||
msgid "Top key phrases"
|
msgid "Top key phrases"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||||
msgid "Key phrase"
|
msgid "Key phrase"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/referers.py:177
|
#: plugins/display/referers.py:212
|
||||||
msgid "All key phrases"
|
msgid "All key phrases"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:51 plugins/display/top_downloads.py:54
|
#: plugins/display/top_downloads.py:71
|
||||||
#: plugins/display/top_downloads.py:68
|
|
||||||
msgid "All Downloads"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:54
|
|
||||||
msgid "Hit"
|
msgid "Hit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:54 plugins/display/top_downloads.py:74
|
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
|
||||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
msgid "All Downloads"
|
||||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
msgstr ""
|
||||||
|
|
||||||
|
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:97
|
||||||
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||||
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||||
msgid "URI"
|
msgid "URI"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:66
|
#: plugins/display/top_downloads.py:89
|
||||||
msgid "Top Downloads"
|
msgid "Top Downloads"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_hits.py:49 plugins/display/top_hits.py:54
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:91
|
||||||
#: plugins/display/top_hits.py:67
|
|
||||||
msgid "All Hits"
|
msgid "All Hits"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||||
msgid "Entrance"
|
msgid "Entrance"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_pages.py:49 plugins/display/top_pages.py:54
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:90
|
||||||
#: plugins/display/top_pages.py:67
|
|
||||||
msgid "All Pages"
|
msgid "All Pages"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: plugins/display/top_pages.py:65
|
#: plugins/display/top_pages.py:88
|
||||||
msgid "Top Pages"
|
msgid "Top Pages"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
169
iwla.py
169
iwla.py
|
@ -41,88 +41,89 @@ del _
|
||||||
from iplugin import *
|
from iplugin import *
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Main class IWLA
|
Main class IWLA
|
||||||
# Parse Log, compute them, call plugins and produce output
|
Parse Log, compute them, call plugins and produce output
|
||||||
# For now, only HTTP log are valid
|
For now, only HTTP log are valid
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# analyzed_filename
|
analyzed_filename
|
||||||
# domain_name
|
domain_name
|
||||||
# locales_path
|
locales_path
|
||||||
# compress_output_files*
|
compress_output_files*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# DB_ROOT/meta.db
|
DB_ROOT/meta.db
|
||||||
# DB_ROOT/year/month/iwla.db
|
DB_ROOT/year/month/iwla.db
|
||||||
# OUTPUT_ROOT/index.html
|
OUTPUT_ROOT/index.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
#
|
|
||||||
# meta :
|
meta :
|
||||||
# last_time
|
last_time
|
||||||
# start_analysis_time
|
start_analysis_time
|
||||||
# stats =>
|
stats =>
|
||||||
# year =>
|
year =>
|
||||||
# month =>
|
month =>
|
||||||
# viewed_bandwidth
|
viewed_bandwidth
|
||||||
# not_viewed_bandwidth
|
not_viewed_bandwidth
|
||||||
# viewed_pages
|
viewed_pages
|
||||||
# viewed_hits
|
viewed_hits
|
||||||
# nb_visits
|
nb_visits
|
||||||
# nb_visitors
|
nb_visitors
|
||||||
#
|
|
||||||
# month_stats :
|
month_stats :
|
||||||
# viewed_bandwidth
|
viewed_bandwidth
|
||||||
# not_viewed_bandwidth
|
not_viewed_bandwidth
|
||||||
# viewed_pages
|
viewed_pages
|
||||||
# viewed_hits
|
viewed_hits
|
||||||
# nb_visits
|
nb_visits
|
||||||
#
|
|
||||||
# days_stats :
|
days_stats :
|
||||||
# day =>
|
day =>
|
||||||
# viewed_bandwidth
|
viewed_bandwidth
|
||||||
# not_viewed_bandwidth
|
not_viewed_bandwidth
|
||||||
# viewed_pages
|
viewed_pages
|
||||||
# viewed_hits
|
viewed_hits
|
||||||
# nb_visits
|
nb_visits
|
||||||
# nb_visitors
|
nb_visitors
|
||||||
#
|
|
||||||
# visits :
|
visits :
|
||||||
# remote_addr =>
|
remote_addr =>
|
||||||
# remote_addr
|
remote_addr
|
||||||
# remote_ip
|
remote_ip
|
||||||
# viewed_pages
|
viewed_pages
|
||||||
# viewed_hits
|
viewed_hits
|
||||||
# not_viewed_pages
|
not_viewed_pages
|
||||||
# not_viewed_hits
|
not_viewed_hits
|
||||||
# bandwidth
|
bandwidth
|
||||||
# last_access
|
last_access
|
||||||
# requests =>
|
requests =>
|
||||||
# [fields_from_format_log]
|
[fields_from_format_log]
|
||||||
# extract_request =>
|
extract_request =>
|
||||||
# extract_uri
|
extract_uri
|
||||||
# extract_parameters*
|
extract_parameters*
|
||||||
# extract_referer* =>
|
extract_referer* =>
|
||||||
# extract_uri
|
extract_uri
|
||||||
# extract_parameters*
|
extract_parameters*
|
||||||
# robot
|
robot
|
||||||
# hit_only
|
hit_only
|
||||||
# is_page
|
is_page
|
||||||
#
|
|
||||||
# valid_visitors:
|
valid_visitors:
|
||||||
# month_stats without robot and hit only visitors (if not conf.count_hit_only_visitors)
|
month_stats without robot and hit only visitors (if not conf.count_hit_only_visitors)
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
|
|
||||||
class IWLA(object):
|
class IWLA(object):
|
||||||
|
|
||||||
|
@ -367,7 +368,7 @@ class IWLA(object):
|
||||||
|
|
||||||
def _generateDisplayDaysStats(self):
|
def _generateDisplayDaysStats(self):
|
||||||
cur_time = self.meta_infos['last_time']
|
cur_time = self.meta_infos['last_time']
|
||||||
title = '%s %d/%02d' % (self._('Statistics'), cur_time.tm_year, cur_time.tm_mon)
|
title = createCurTitle(self, self._('Statistics'))
|
||||||
filename = self.getCurDisplayPath('index.html')
|
filename = self.getCurDisplayPath('index.html')
|
||||||
self.logger.info('==> Generate display (%s)' % (filename))
|
self.logger.info('==> Generate display (%s)' % (filename))
|
||||||
page = self.display.createPage(title, filename, conf.css_path)
|
page = self.display.createPage(title, filename, conf.css_path)
|
||||||
|
@ -424,7 +425,7 @@ class IWLA(object):
|
||||||
|
|
||||||
def _generateDisplayMonthStats(self, page, year, month_stats):
|
def _generateDisplayMonthStats(self, page, year, month_stats):
|
||||||
cur_time = time.localtime()
|
cur_time = time.localtime()
|
||||||
months_name = ['', self._('Jan'), self._('Feb'), self._('Mar'), self._('Apr'), self._('May'), self._('June'), self._('July'), self._('Aug'), self._('Sep'), self._('Oct'), self._('Nov'), self._('Dec')]
|
months_name = ['', self._('Jan'), self._('Feb'), self._('Mar'), self._('Apr'), self._('May'), self._('June'), self._('Jul'), self._('Aug'), self._('Sep'), self._('Oct'), self._('Nov'), self._('Dec')]
|
||||||
title = '%s %d' % (self._('Summary'), year)
|
title = '%s %d' % (self._('Summary'), year)
|
||||||
cols = [self._('Month'), self._('Visitors'), self._('Visits'), self._('Pages'), self._('Hits'), self._('Bandwidth'), self._('Not viewed Bandwidth'), self._('Details')]
|
cols = [self._('Month'), self._('Visitors'), self._('Visits'), self._('Pages'), self._('Hits'), self._('Bandwidth'), self._('Not viewed Bandwidth'), self._('Details')]
|
||||||
graph_cols=range(1,7)
|
graph_cols=range(1,7)
|
||||||
|
|
Binary file not shown.
|
@ -5,240 +5,279 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: iwla\n"
|
"Project-Id-Version: iwla\n"
|
||||||
"POT-Creation-Date: 2014-12-16 21:36+CET\n"
|
"POT-Creation-Date: 2014-12-19 17:43+CET\n"
|
||||||
"PO-Revision-Date: 2014-12-17 19:06+0100\n"
|
"PO-Revision-Date: 2014-12-19 17:43+0100\n"
|
||||||
"Last-Translator: Soutadé <soutade@gmail.com>\n"
|
"Last-Translator: Soutadé <soutade@gmail.com>\n"
|
||||||
"Language-Team: iwla\n"
|
"Language-Team: iwla\n"
|
||||||
|
"Language: fr_FR\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
"Language: fr_FR\n"
|
|
||||||
"X-Generator: Poedit 1.6.10\n"
|
"X-Generator: Poedit 1.6.10\n"
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||||||
|
|
||||||
#: iwla.py:343
|
#: display.py:32
|
||||||
msgid "Statistics"
|
msgid "April"
|
||||||
msgstr "Statistiques"
|
msgstr "Avril"
|
||||||
|
|
||||||
#: iwla.py:349
|
#: display.py:32
|
||||||
msgid "By day"
|
msgid "February"
|
||||||
msgstr "Par jour"
|
msgstr "Février"
|
||||||
|
|
||||||
#: iwla.py:349
|
#: display.py:32
|
||||||
msgid "Day"
|
msgid "January"
|
||||||
msgstr "Jour"
|
msgstr "Janvier"
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402
|
#: display.py:32
|
||||||
msgid "Not viewed Bandwidth"
|
|
||||||
msgstr "Traffic non vu"
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402
|
|
||||||
msgid "Visits"
|
|
||||||
msgstr "Visites"
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
|
||||||
#: plugins/display/top_downloads.py:74 plugins/display/top_visitors.py:53
|
|
||||||
msgid "Hits"
|
|
||||||
msgstr "Hits"
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
|
||||||
#: plugins/display/top_visitors.py:53
|
|
||||||
msgid "Pages"
|
|
||||||
msgstr "Pages"
|
|
||||||
|
|
||||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
|
||||||
#: plugins/display/top_visitors.py:53
|
|
||||||
msgid "Bandwidth"
|
|
||||||
msgstr "Bande passante"
|
|
||||||
|
|
||||||
#: iwla.py:386
|
|
||||||
msgid "Average"
|
|
||||||
msgstr "Moyenne"
|
|
||||||
|
|
||||||
#: iwla.py:391 iwla.py:429
|
|
||||||
msgid "Total"
|
|
||||||
msgstr "Total"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Apr"
|
|
||||||
msgstr "Avr"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Aug"
|
|
||||||
msgstr "Août"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Dec"
|
|
||||||
msgstr "Déc"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Feb"
|
|
||||||
msgstr "Fév"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "Jan"
|
|
||||||
msgstr "Jan"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "July"
|
msgid "July"
|
||||||
msgstr "Jui"
|
msgstr "Juillet"
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:32
|
||||||
|
msgid "March"
|
||||||
|
msgstr "Mars"
|
||||||
|
|
||||||
|
#: display.py:32 iwla.py:428
|
||||||
msgid "June"
|
msgid "June"
|
||||||
msgstr "Juin"
|
msgstr "Juin"
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:32 iwla.py:428
|
||||||
msgid "Mar"
|
|
||||||
msgstr "Mars"
|
|
||||||
|
|
||||||
#: iwla.py:400
|
|
||||||
msgid "May"
|
msgid "May"
|
||||||
msgstr "Mai"
|
msgstr "Mai"
|
||||||
|
|
||||||
#: iwla.py:400
|
#: display.py:33
|
||||||
|
msgid "August"
|
||||||
|
msgstr "Août"
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "December"
|
||||||
|
msgstr "Décembre"
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "November"
|
||||||
|
msgstr "Novembre"
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "October"
|
||||||
|
msgstr "Octobre"
|
||||||
|
|
||||||
|
#: display.py:33
|
||||||
|
msgid "September"
|
||||||
|
msgstr "Septembre"
|
||||||
|
|
||||||
|
#: iwla.py:371
|
||||||
|
msgid "Statistics"
|
||||||
|
msgstr "Statistiques"
|
||||||
|
|
||||||
|
#: iwla.py:377
|
||||||
|
msgid "By day"
|
||||||
|
msgstr "Par jour"
|
||||||
|
|
||||||
|
#: iwla.py:377
|
||||||
|
msgid "Day"
|
||||||
|
msgstr "Jour"
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430
|
||||||
|
msgid "Not viewed Bandwidth"
|
||||||
|
msgstr "Traffic non vu"
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430
|
||||||
|
msgid "Visits"
|
||||||
|
msgstr "Visites"
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
|
#: plugins/display/top_downloads.py:97 plugins/display/top_visitors.py:72
|
||||||
|
msgid "Hits"
|
||||||
|
msgstr "Hits"
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
|
#: plugins/display/top_visitors.py:72
|
||||||
|
msgid "Pages"
|
||||||
|
msgstr "Pages"
|
||||||
|
|
||||||
|
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||||
|
#: plugins/display/top_visitors.py:72
|
||||||
|
msgid "Bandwidth"
|
||||||
|
msgstr "Bande passante"
|
||||||
|
|
||||||
|
#: iwla.py:414
|
||||||
|
msgid "Average"
|
||||||
|
msgstr "Moyenne"
|
||||||
|
|
||||||
|
#: iwla.py:419 iwla.py:457
|
||||||
|
msgid "Total"
|
||||||
|
msgstr "Total"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Apr"
|
||||||
|
msgstr "Avr"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Aug"
|
||||||
|
msgstr "Août"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Dec"
|
||||||
|
msgstr "Déc"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Feb"
|
||||||
|
msgstr "Fév"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Jan"
|
||||||
|
msgstr "Jan"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Jul"
|
||||||
|
msgstr "Jui"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
|
msgid "Mar"
|
||||||
|
msgstr "Mars"
|
||||||
|
|
||||||
|
#: iwla.py:428
|
||||||
msgid "Nov"
|
msgid "Nov"
|
||||||
msgstr "Nov"
|
msgstr "Nov"
|
||||||
|
|
||||||
#: iwla.py:400
|
#: iwla.py:428
|
||||||
msgid "Oct"
|
msgid "Oct"
|
||||||
msgstr "Oct"
|
msgstr "Oct"
|
||||||
|
|
||||||
#: iwla.py:400
|
#: iwla.py:428
|
||||||
msgid "Sep"
|
msgid "Sep"
|
||||||
msgstr "Sep"
|
msgstr "Sep"
|
||||||
|
|
||||||
#: iwla.py:401
|
#: iwla.py:429
|
||||||
msgid "Summary"
|
msgid "Summary"
|
||||||
msgstr "Résumé"
|
msgstr "Résumé"
|
||||||
|
|
||||||
#: iwla.py:402
|
#: iwla.py:430
|
||||||
msgid "Month"
|
msgid "Month"
|
||||||
msgstr "Mois"
|
msgstr "Mois"
|
||||||
|
|
||||||
#: iwla.py:402
|
#: iwla.py:430
|
||||||
msgid "Visitors"
|
msgid "Visitors"
|
||||||
msgstr "Visiteurs"
|
msgstr "Visiteurs"
|
||||||
|
|
||||||
#: iwla.py:402 iwla.py:412
|
#: iwla.py:430 iwla.py:440
|
||||||
msgid "Details"
|
msgid "Details"
|
||||||
msgstr "Détails"
|
msgstr "Détails"
|
||||||
|
|
||||||
#: iwla.py:436
|
#: iwla.py:465
|
||||||
msgid "Statistics for"
|
msgid "Statistics for"
|
||||||
msgstr "Statistiques pour"
|
msgstr "Statistiques pour"
|
||||||
|
|
||||||
#: iwla.py:443
|
#: iwla.py:472
|
||||||
msgid "Last update"
|
msgid "Last update"
|
||||||
msgstr "Dernière mise à jour"
|
msgstr "Dernière mise à jour"
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:45 plugins/display/all_visits.py:73
|
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||||
msgid "All visits"
|
|
||||||
msgstr "Toutes les visites"
|
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr "Hôte"
|
msgstr "Hôte"
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||||
msgid "Last seen"
|
msgid "Last seen"
|
||||||
msgstr "Dernière visite"
|
msgstr "Dernière visite"
|
||||||
|
|
||||||
#: plugins/display/all_visits.py:74 plugins/display/top_visitors.py:53
|
#: plugins/display/all_visits.py:92
|
||||||
|
msgid "All visits"
|
||||||
|
msgstr "Toutes les visites"
|
||||||
|
|
||||||
|
#: plugins/display/all_visits.py:93 plugins/display/top_visitors.py:72
|
||||||
msgid "Top visitors"
|
msgid "Top visitors"
|
||||||
msgstr "Top visiteurs"
|
msgstr "Top visiteurs"
|
||||||
|
|
||||||
#: plugins/display/referers.py:72 plugins/display/referers.py:78
|
#: plugins/display/referers.py:95
|
||||||
msgid "Connexion from"
|
msgid "Connexion from"
|
||||||
msgstr "Connexion depuis"
|
msgstr "Connexion depuis"
|
||||||
|
|
||||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||||
msgid "Origin"
|
msgid "Origin"
|
||||||
msgstr "Origine"
|
msgstr "Origine"
|
||||||
|
|
||||||
#: plugins/display/referers.py:82 plugins/display/referers.py:121
|
#: plugins/display/referers.py:99 plugins/display/referers.py:156
|
||||||
msgid "Search Engine"
|
msgid "Search Engine"
|
||||||
msgstr "Moteur de recherche"
|
msgstr "Moteur de recherche"
|
||||||
|
|
||||||
#: plugins/display/referers.py:91 plugins/display/referers.py:132
|
#: plugins/display/referers.py:110 plugins/display/referers.py:125
|
||||||
msgid "External URL"
|
#: plugins/display/referers.py:140 plugins/display/referers.py:163
|
||||||
msgstr "URL externe"
|
#: plugins/display/referers.py:174 plugins/display/referers.py:185
|
||||||
|
#: plugins/display/referers.py:222 plugins/display/top_downloads.py:83
|
||||||
#: plugins/display/referers.py:100 plugins/display/referers.py:143
|
#: plugins/display/top_downloads.py:103 plugins/display/top_hits.py:82
|
||||||
msgid "External URL (robot)"
|
#: plugins/display/top_hits.py:103 plugins/display/top_pages.py:82
|
||||||
msgstr "URL externe (robot)"
|
#: plugins/display/top_pages.py:102 plugins/display/top_visitors.py:92
|
||||||
|
|
||||||
#: plugins/display/referers.py:112
|
|
||||||
msgid "Top Referers"
|
|
||||||
msgstr "Top Origines"
|
|
||||||
|
|
||||||
#: plugins/display/referers.py:114
|
|
||||||
msgid "All Referers"
|
|
||||||
msgstr "Toutes les origines"
|
|
||||||
|
|
||||||
#: plugins/display/referers.py:128 plugins/display/referers.py:139
|
|
||||||
#: plugins/display/referers.py:150 plugins/display/referers.py:187
|
|
||||||
#: plugins/display/top_downloads.py:80 plugins/display/top_hits.py:79
|
|
||||||
#: plugins/display/top_pages.py:79 plugins/display/top_visitors.py:73
|
|
||||||
msgid "Others"
|
msgid "Others"
|
||||||
msgstr "Autres"
|
msgstr "Autres"
|
||||||
|
|
||||||
#: plugins/display/referers.py:158
|
#: plugins/display/referers.py:114 plugins/display/referers.py:167
|
||||||
msgid "Key Phrases"
|
msgid "External URL"
|
||||||
msgstr "Phrases clé"
|
msgstr "URL externe"
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:175
|
#: plugins/display/referers.py:129 plugins/display/referers.py:178
|
||||||
|
msgid "External URL (robot)"
|
||||||
|
msgstr "URL externe (robot)"
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:147
|
||||||
|
msgid "Top Referers"
|
||||||
|
msgstr "Top Origines"
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:149
|
||||||
|
msgid "All Referers"
|
||||||
|
msgstr "Toutes les origines"
|
||||||
|
|
||||||
|
#: plugins/display/referers.py:200 plugins/display/referers.py:210
|
||||||
msgid "Top key phrases"
|
msgid "Top key phrases"
|
||||||
msgstr "Top phrases clé"
|
msgstr "Top phrases clé"
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||||
msgid "Key phrase"
|
msgid "Key phrase"
|
||||||
msgstr "Phrase clé"
|
msgstr "Phrase clé"
|
||||||
|
|
||||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Recherche"
|
msgstr "Recherche"
|
||||||
|
|
||||||
#: plugins/display/referers.py:177
|
#: plugins/display/referers.py:212
|
||||||
msgid "All key phrases"
|
msgid "All key phrases"
|
||||||
msgstr "Toutes les phrases clé"
|
msgstr "Toutes les phrases clé"
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:51 plugins/display/top_downloads.py:54
|
#: plugins/display/top_downloads.py:71
|
||||||
#: plugins/display/top_downloads.py:68
|
|
||||||
msgid "All Downloads"
|
|
||||||
msgstr "Tous les téléchargements"
|
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:54
|
|
||||||
msgid "Hit"
|
msgid "Hit"
|
||||||
msgstr "Hit"
|
msgstr "Hit"
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:54 plugins/display/top_downloads.py:74
|
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
|
||||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
msgid "All Downloads"
|
||||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
msgstr "Tous les téléchargements"
|
||||||
|
|
||||||
|
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:97
|
||||||
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||||
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||||
msgid "URI"
|
msgid "URI"
|
||||||
msgstr "URI"
|
msgstr "URI"
|
||||||
|
|
||||||
#: plugins/display/top_downloads.py:66
|
#: plugins/display/top_downloads.py:89
|
||||||
msgid "Top Downloads"
|
msgid "Top Downloads"
|
||||||
msgstr "Top Téléchargements"
|
msgstr "Top Téléchargements"
|
||||||
|
|
||||||
#: plugins/display/top_hits.py:49 plugins/display/top_hits.py:54
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:91
|
||||||
#: plugins/display/top_hits.py:67
|
|
||||||
msgid "All Hits"
|
msgid "All Hits"
|
||||||
msgstr "Tous les hits"
|
msgstr "Tous les hits"
|
||||||
|
|
||||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||||
msgid "Entrance"
|
msgid "Entrance"
|
||||||
msgstr "Entrées"
|
msgstr "Entrées"
|
||||||
|
|
||||||
#: plugins/display/top_pages.py:49 plugins/display/top_pages.py:54
|
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:90
|
||||||
#: plugins/display/top_pages.py:67
|
|
||||||
msgid "All Pages"
|
msgid "All Pages"
|
||||||
msgstr "Toutes les pages"
|
msgstr "Toutes les pages"
|
||||||
|
|
||||||
#: plugins/display/top_pages.py:65
|
#: plugins/display/top_pages.py:88
|
||||||
msgid "Top Pages"
|
msgid "Top Pages"
|
||||||
msgstr "Top Pages"
|
msgstr "Top Pages"
|
||||||
|
|
||||||
|
#~ msgid "Key Phrases"
|
||||||
|
#~ msgstr "Phrases clé"
|
||||||
|
|
|
@ -24,30 +24,30 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create All visits page
|
Create All visits page
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# display_visitor_ip*
|
display_visitor_ip*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/all_visits.html
|
OUTPUT_ROOT/year/month/all_visits.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayAllVisits(IPlugin):
|
class IWLADisplayAllVisits(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
@ -61,7 +61,7 @@ class IWLADisplayAllVisits(IPlugin):
|
||||||
|
|
||||||
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
|
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
|
||||||
|
|
||||||
title = time.strftime(self.iwla._(u'All visits') + u' - %B %Y', self.iwla.getCurTime())
|
title = createCurTitle(self.iwla, u'All visits')
|
||||||
|
|
||||||
filename = 'all_visits.html'
|
filename = 'all_visits.html'
|
||||||
path = self.iwla.getCurDisplayPath(filename)
|
path = self.iwla.getCurDisplayPath(filename)
|
||||||
|
|
|
@ -22,34 +22,34 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create Referers page
|
Create Referers page
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# post_analysis/referers
|
post_analysis/referers
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# max_referers_displayed*
|
max_referers_displayed*
|
||||||
# create_all_referers_page*
|
create_all_referers_page*
|
||||||
# max_key_phrases_displayed*
|
max_key_phrases_displayed*
|
||||||
# create_all_key_phrases_page*
|
create_all_key_phrases_page*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/referers.html
|
OUTPUT_ROOT/year/month/referers.html
|
||||||
# OUTPUT_ROOT/year/month/key_phrases.html
|
OUTPUT_ROOT/year/month/key_phrases.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayReferers(IPlugin):
|
class IWLADisplayReferers(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -22,31 +22,31 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create TOP downloads page
|
Create TOP downloads page
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# post_analysis/top_downloads
|
post_analysis/top_downloads
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# max_downloads_displayed*
|
max_downloads_displayed*
|
||||||
# create_all_downloads_page*
|
create_all_downloads_page*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/top_downloads.html
|
OUTPUT_ROOT/year/month/top_downloads.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayTopDownloads(IPlugin):
|
class IWLADisplayTopDownloads(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -22,31 +22,31 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create TOP hits page
|
Create TOP hits page
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# post_analysis/top_hits
|
post_analysis/top_hits
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# max_hits_displayed*
|
max_hits_displayed*
|
||||||
# create_all_hits_page*
|
create_all_hits_page*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/top_hits.html
|
OUTPUT_ROOT/year/month/top_hits.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayTopHits(IPlugin):
|
class IWLADisplayTopHits(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -22,31 +22,31 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create TOP pages page
|
Create TOP pages page
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# post_analysis/top_pages
|
post_analysis/top_pages
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# max_pages_displayed*
|
max_pages_displayed*
|
||||||
# create_all_pages_page*
|
create_all_pages_page*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/top_pages.html
|
OUTPUT_ROOT/year/month/top_pages.html
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayTopPages(IPlugin):
|
class IWLADisplayTopPages(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -24,29 +24,29 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Display hook
|
Display hook
|
||||||
#
|
|
||||||
# Create TOP visitors block
|
Create TOP visitors block
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# display_visitor_ip*
|
display_visitor_ip*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# OUTPUT_ROOT/year/month/index.html
|
OUTPUT_ROOT/year/month/index.html
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLADisplayTopVisitors(IPlugin):
|
class IWLADisplayTopVisitors(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -26,40 +26,40 @@ from iplugin import IPlugin
|
||||||
|
|
||||||
import awstats_data
|
import awstats_data
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Post analysis hook
|
Post analysis hook
|
||||||
#
|
|
||||||
# Extract referers and key phrases from requests
|
Extract referers and key phrases from requests
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# domain_name
|
domain_name
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# month_stats :
|
month_stats :
|
||||||
# referers =>
|
referers =>
|
||||||
# pages
|
pages
|
||||||
# hits
|
hits
|
||||||
# robots_referers =>
|
robots_referers =>
|
||||||
# pages
|
pages
|
||||||
# hits
|
hits
|
||||||
# search_engine_referers =>
|
search_engine_referers =>
|
||||||
# pages
|
pages
|
||||||
# hits
|
hits
|
||||||
# key_phrases =>
|
key_phrases =>
|
||||||
# phrase
|
phrase
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPostAnalysisReferers(IPlugin):
|
class IWLAPostAnalysisReferers(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -23,32 +23,32 @@ import socket
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Post analysis hook
|
Post analysis hook
|
||||||
#
|
|
||||||
# Replace IP by reverse DNS names
|
Replace IP by reverse DNS names
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# reverse_dns_timeout*
|
reverse_dns_timeout*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# valid_visitors:
|
valid_visitors:
|
||||||
# remote_addr
|
remote_addr
|
||||||
# dns_name_replaced
|
dns_name_replaced
|
||||||
# dns_analyzed
|
dns_analyzed
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPostAnalysisReverseDNS(IPlugin):
|
class IWLAPostAnalysisReverseDNS(IPlugin):
|
||||||
DEFAULT_DNS_TIMEOUT = 0.5
|
DEFAULT_DNS_TIMEOUT = 0.5
|
||||||
|
|
|
@ -23,31 +23,31 @@ import re
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Post analysis hook
|
Post analysis hook
|
||||||
#
|
|
||||||
# Count TOP downloads
|
Count TOP downloads
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# month_stats:
|
month_stats:
|
||||||
# top_downloads =>
|
top_downloads =>
|
||||||
# uri
|
uri
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPostAnalysisTopDownloads(IPlugin):
|
class IWLAPostAnalysisTopDownloads(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -21,31 +21,31 @@
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Post analysis hook
|
Post analysis hook
|
||||||
#
|
|
||||||
# Count TOP hits
|
Count TOP hits
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# month_stats:
|
month_stats:
|
||||||
# top_hits =>
|
top_hits =>
|
||||||
# uri
|
uri
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPostAnalysisTopHits(IPlugin):
|
class IWLAPostAnalysisTopHits(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -23,31 +23,31 @@ import re
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Post analysis hook
|
Post analysis hook
|
||||||
#
|
|
||||||
# Count TOP pages
|
Count TOP pages
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# month_stats:
|
month_stats:
|
||||||
# top_pages =>
|
top_pages =>
|
||||||
# uri
|
uri
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPostAnalysisTopPages(IPlugin):
|
class IWLAPostAnalysisTopPages(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -23,31 +23,31 @@ import re
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Pre analysis hook
|
Pre analysis hook
|
||||||
# Change page into hit and hit into page into statistics
|
Change page into hit and hit into page into statistics
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# page_to_hit_conf*
|
page_to_hit_conf*
|
||||||
# hit_to_page_conf*
|
hit_to_page_conf*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# visits :
|
visits :
|
||||||
# remote_addr =>
|
remote_addr =>
|
||||||
# is_page
|
is_page
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPreAnalysisPageToHit(IPlugin):
|
class IWLAPreAnalysisPageToHit(IPlugin):
|
||||||
|
|
||||||
|
|
|
@ -25,32 +25,32 @@ from iplugin import IPlugin
|
||||||
|
|
||||||
import awstats_data
|
import awstats_data
|
||||||
|
|
||||||
#
|
"""
|
||||||
# Pre analysis hook
|
Pre analysis hook
|
||||||
#
|
|
||||||
# Filter robots
|
Filter robots
|
||||||
#
|
|
||||||
# Plugin requirements :
|
Plugin requirements :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Conf values needed :
|
Conf values needed :
|
||||||
# page_to_hit_conf*
|
page_to_hit_conf*
|
||||||
# hit_to_page_conf*
|
hit_to_page_conf*
|
||||||
#
|
|
||||||
# Output files :
|
Output files :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics creation :
|
Statistics creation :
|
||||||
# None
|
None
|
||||||
#
|
|
||||||
# Statistics update :
|
Statistics update :
|
||||||
# visits :
|
visits :
|
||||||
# remote_addr =>
|
remote_addr =>
|
||||||
# robot
|
robot
|
||||||
#
|
|
||||||
# Statistics deletion :
|
Statistics deletion :
|
||||||
# None
|
None
|
||||||
#
|
"""
|
||||||
|
|
||||||
class IWLAPreAnalysisRobots(IPlugin):
|
class IWLAPreAnalysisRobots(IPlugin):
|
||||||
def __init__(self, iwla):
|
def __init__(self, iwla):
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
filename = sys.argv[1]
|
||||||
|
|
||||||
|
if filename.endswith('__init__.py'):
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
package_name = filename.replace('/', '.').replace('.py', '')
|
||||||
|
sys.stdout.write('%s' % (package_name))
|
||||||
|
sys.stdout.write('\n')
|
||||||
|
# sys.stdout.write('\n\n')
|
||||||
|
sys.stdout.write('-' * len(package_name))
|
||||||
|
sys.stdout.write('\n\n')
|
||||||
|
|
||||||
|
sys.stderr.write('\tExtract doc from %s\n' % (filename))
|
||||||
|
|
||||||
|
with open(filename) as infile:
|
||||||
|
copy = False
|
||||||
|
for line in infile:
|
||||||
|
if line.strip() in ['"""', "'''"]:
|
||||||
|
if not copy:
|
||||||
|
copy = True
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
elif copy:
|
||||||
|
sys.stdout.write(' %s' % (line))
|
||||||
|
|
||||||
|
sys.stdout.write('\n\n')
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
MODULES_TARGET="docs/modules.md"
|
||||||
|
MAIN_MD="docs/main.md"
|
||||||
|
TARGET_MD="docs/index.md"
|
||||||
|
|
||||||
|
rm -f "${MODULES_TARGET}"
|
||||||
|
|
||||||
|
echo "Generate doc from iwla.py"
|
||||||
|
python tools/extract_doc.py iwla.py > "${MODULES_TARGET}"
|
||||||
|
|
||||||
|
echo "Generate plugins documentation"
|
||||||
|
find plugins -name '*.py' -exec python tools/extract_doc.py \{\} \; >> "${MODULES_TARGET}"
|
||||||
|
|
||||||
|
echo "Generate ${TARGET_MD}"
|
||||||
|
cat "${MAIN_MD}" "${MODULES_TARGET}" > "${TARGET_MD}"
|
Loading…
Reference in New Issue