Merge branch 'dev' of soutade.fr:iwla into dev
This commit is contained in:
commit
44f8b61582
|
@ -1,4 +1,4 @@
|
|||
v0.3 (17/01/2016)
|
||||
v0.3 (06/02/2016)
|
||||
** User **
|
||||
Add referers_diff display plugin
|
||||
Add year statistics in month details
|
||||
|
@ -16,6 +16,7 @@ v0.3 (17/01/2016)
|
|||
Add -z option (don't compress databases)
|
||||
Add own search enfines files
|
||||
Do reverse DNS on feeds parsers
|
||||
Add IPToGeo plugin
|
||||
|
||||
** Dev **
|
||||
Add istats_diff interface
|
||||
|
|
|
@ -364,7 +364,7 @@ class DisplayHTMLPage(object):
|
|||
for block in self.blocks:
|
||||
block.build(f, filters=filters)
|
||||
if displayVersion:
|
||||
f.write(u'<center>Generated by <a href="%s">IWLA %s</a></center>' %
|
||||
f.write(u'<div style="text-align:center;width:100%%">Generated by <a href="%s">IWLA %s</a></div>' %
|
||||
("http://indefero.soutade.fr/p/iwla", self.iwla.getVersion()))
|
||||
f.write(u'</body></html>')
|
||||
f.close()
|
||||
|
|
128
docs/index.md
128
docs/index.md
|
@ -103,12 +103,13 @@ Optional configuration values ends with *.
|
|||
* plugins/display/browsers.py
|
||||
* plugins/display/feeds.py
|
||||
* plugins/display/hours_stats.py
|
||||
* plugins/display/ip_to_geo.py
|
||||
* plugins/display/istats_diff.py
|
||||
* plugins/display/operating_systems.py
|
||||
* plugins/display/referers.py
|
||||
* plugins/display/referers_diff.py
|
||||
* plugins/display/top_downloads.py
|
||||
* plugins/display/referers.py
|
||||
* plugins/display/top_downloads_diff.py
|
||||
* plugins/display/top_downloads.py
|
||||
* plugins/display/top_hits.py
|
||||
* plugins/display/top_pages.py
|
||||
* plugins/display/top_visitors.py
|
||||
|
@ -116,6 +117,8 @@ Optional configuration values ends with *.
|
|||
* plugins/post_analysis/browsers.py
|
||||
* plugins/post_analysis/feeds.py
|
||||
* plugins/post_analysis/hours_stats.py
|
||||
* plugins/post_analysis/ip_to_geo.py
|
||||
* plugins/post_analysis/iptogeo.py
|
||||
* plugins/post_analysis/operating_systems.py
|
||||
* plugins/post_analysis/referers.py
|
||||
* plugins/post_analysis/reverse_dns.py
|
||||
|
@ -323,6 +326,32 @@ plugins.display.hours_stats
|
|||
None
|
||||
|
||||
|
||||
plugins.display.ip_to_geo
|
||||
-------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Add geo statistics
|
||||
|
||||
Plugin requirements :
|
||||
post_analysis/ip_to_geo
|
||||
|
||||
Conf values needed :
|
||||
create_geo_page*
|
||||
|
||||
Output files :
|
||||
OUTPUT_ROOT/year/month/index.html
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.istats_diff
|
||||
---------------------------
|
||||
|
||||
|
@ -375,6 +404,32 @@ plugins.display.operating_systems
|
|||
None
|
||||
|
||||
|
||||
plugins.display.referers_diff
|
||||
-----------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated key phrases in in all_key_phrases.html
|
||||
|
||||
Plugin requirements :
|
||||
display/referers
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.referers
|
||||
------------------------
|
||||
|
||||
|
@ -406,15 +461,15 @@ plugins.display.referers
|
|||
None
|
||||
|
||||
|
||||
plugins.display.referers_diff
|
||||
-----------------------------
|
||||
plugins.display.top_downloads_diff
|
||||
----------------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated key phrases in in all_key_phrases.html
|
||||
Enlight new and updated downloads in in top_downloads.html
|
||||
|
||||
Plugin requirements :
|
||||
display/referers
|
||||
display/top_downloads
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
@ -460,32 +515,6 @@ plugins.display.top_downloads
|
|||
None
|
||||
|
||||
|
||||
plugins.display.top_downloads_diff
|
||||
----------------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated downloads in in top_downloads.html
|
||||
|
||||
Plugin requirements :
|
||||
display/top_downloads
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.top_hits
|
||||
------------------------
|
||||
|
||||
|
@ -695,6 +724,41 @@ plugins.post_analysis.hours_stats
|
|||
None
|
||||
|
||||
|
||||
plugins.post_analysis.ip_to_geo
|
||||
-------------------------------
|
||||
|
||||
Post analysis hook
|
||||
|
||||
Get country code from IP address
|
||||
|
||||
Plugin requirements :
|
||||
None
|
||||
|
||||
Conf values needed :
|
||||
iptogeo_remote_addr*
|
||||
iptogeo_remote_port*
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
geo =>
|
||||
country_code => count
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
valid_visitors:
|
||||
country_code
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.post_analysis.iptogeo
|
||||
-----------------------------
|
||||
|
||||
|
||||
|
||||
plugins.post_analysis.operating_systems
|
||||
---------------------------------------
|
||||
|
||||
|
|
128
docs/modules.md
128
docs/modules.md
|
@ -3,12 +3,13 @@
|
|||
* plugins/display/browsers.py
|
||||
* plugins/display/feeds.py
|
||||
* plugins/display/hours_stats.py
|
||||
* plugins/display/ip_to_geo.py
|
||||
* plugins/display/istats_diff.py
|
||||
* plugins/display/operating_systems.py
|
||||
* plugins/display/referers.py
|
||||
* plugins/display/referers_diff.py
|
||||
* plugins/display/top_downloads.py
|
||||
* plugins/display/referers.py
|
||||
* plugins/display/top_downloads_diff.py
|
||||
* plugins/display/top_downloads.py
|
||||
* plugins/display/top_hits.py
|
||||
* plugins/display/top_pages.py
|
||||
* plugins/display/top_visitors.py
|
||||
|
@ -16,6 +17,8 @@
|
|||
* plugins/post_analysis/browsers.py
|
||||
* plugins/post_analysis/feeds.py
|
||||
* plugins/post_analysis/hours_stats.py
|
||||
* plugins/post_analysis/ip_to_geo.py
|
||||
* plugins/post_analysis/iptogeo.py
|
||||
* plugins/post_analysis/operating_systems.py
|
||||
* plugins/post_analysis/referers.py
|
||||
* plugins/post_analysis/reverse_dns.py
|
||||
|
@ -223,6 +226,32 @@ plugins.display.hours_stats
|
|||
None
|
||||
|
||||
|
||||
plugins.display.ip_to_geo
|
||||
-------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Add geo statistics
|
||||
|
||||
Plugin requirements :
|
||||
post_analysis/ip_to_geo
|
||||
|
||||
Conf values needed :
|
||||
create_geo_page*
|
||||
|
||||
Output files :
|
||||
OUTPUT_ROOT/year/month/index.html
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.istats_diff
|
||||
---------------------------
|
||||
|
||||
|
@ -275,6 +304,32 @@ plugins.display.operating_systems
|
|||
None
|
||||
|
||||
|
||||
plugins.display.referers_diff
|
||||
-----------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated key phrases in in all_key_phrases.html
|
||||
|
||||
Plugin requirements :
|
||||
display/referers
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.referers
|
||||
------------------------
|
||||
|
||||
|
@ -306,15 +361,15 @@ plugins.display.referers
|
|||
None
|
||||
|
||||
|
||||
plugins.display.referers_diff
|
||||
-----------------------------
|
||||
plugins.display.top_downloads_diff
|
||||
----------------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated key phrases in in all_key_phrases.html
|
||||
Enlight new and updated downloads in in top_downloads.html
|
||||
|
||||
Plugin requirements :
|
||||
display/referers
|
||||
display/top_downloads
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
@ -360,32 +415,6 @@ plugins.display.top_downloads
|
|||
None
|
||||
|
||||
|
||||
plugins.display.top_downloads_diff
|
||||
----------------------------------
|
||||
|
||||
Display hook
|
||||
|
||||
Enlight new and updated downloads in in top_downloads.html
|
||||
|
||||
Plugin requirements :
|
||||
display/top_downloads
|
||||
|
||||
Conf values needed :
|
||||
None
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
None
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.display.top_hits
|
||||
------------------------
|
||||
|
||||
|
@ -595,6 +624,41 @@ plugins.post_analysis.hours_stats
|
|||
None
|
||||
|
||||
|
||||
plugins.post_analysis.ip_to_geo
|
||||
-------------------------------
|
||||
|
||||
Post analysis hook
|
||||
|
||||
Get country code from IP address
|
||||
|
||||
Plugin requirements :
|
||||
None
|
||||
|
||||
Conf values needed :
|
||||
iptogeo_remote_addr*
|
||||
iptogeo_remote_port*
|
||||
|
||||
Output files :
|
||||
None
|
||||
|
||||
Statistics creation :
|
||||
geo =>
|
||||
country_code => count
|
||||
None
|
||||
|
||||
Statistics update :
|
||||
valid_visitors:
|
||||
country_code
|
||||
|
||||
Statistics deletion :
|
||||
None
|
||||
|
||||
|
||||
plugins.post_analysis.iptogeo
|
||||
-----------------------------
|
||||
|
||||
|
||||
|
||||
plugins.post_analysis.operating_systems
|
||||
---------------------------------------
|
||||
|
||||
|
|
127
iwla.pot
127
iwla.pot
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2015-03-02 19:44+CET\n"
|
||||
"POT-Creation-Date: 2016-04-12 08:34+CEST\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -35,11 +35,11 @@ msgstr ""
|
|||
msgid "March"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:32 iwla.py:440
|
||||
#: display.py:32 iwla.py:472
|
||||
msgid "June"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:32 iwla.py:440
|
||||
#: display.py:32 iwla.py:472
|
||||
msgid "May"
|
||||
msgstr ""
|
||||
|
||||
|
@ -63,143 +63,146 @@ msgstr ""
|
|||
msgid "September"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:187
|
||||
#: display.py:195
|
||||
msgid "Ratio"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:381
|
||||
#: iwla.py:413
|
||||
msgid "Statistics"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 iwla.py:442
|
||||
#: iwla.py:421 iwla.py:474
|
||||
msgid "Not viewed Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 iwla.py:442
|
||||
#: iwla.py:421 iwla.py:474
|
||||
msgid "Visits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:75 plugins/display/hours_stats.py:73
|
||||
#: iwla.py:421 iwla.py:474 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:76 plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83 plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153 plugins/display/top_downloads.py:97
|
||||
#: plugins/display/top_visitors.py:72 plugins/display/track_users.py:113
|
||||
msgid "Hits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:75 plugins/display/hours_stats.py:73
|
||||
#: iwla.py:421 iwla.py:474 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:76 plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83 plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153 plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:77 plugins/display/track_users.py:113
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: iwla.py:421 iwla.py:474 plugins/display/all_visits.py:70
|
||||
#: plugins/display/hours_stats.py:73 plugins/display/hours_stats.py:83
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 plugins/display/hours_stats.py:71
|
||||
#: iwla.py:421 plugins/display/hours_stats.py:71
|
||||
msgid "By day"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:389 plugins/display/hours_stats.py:73
|
||||
#: iwla.py:421 plugins/display/hours_stats.py:73
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:426
|
||||
#: iwla.py:458
|
||||
msgid "Average"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:431 iwla.py:476
|
||||
#: iwla.py:463 iwla.py:508
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Apr"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Aug"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Dec"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Feb"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Jan"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Jul"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Mar"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Nov"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Oct"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Sep"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:441
|
||||
#: iwla.py:473
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:442
|
||||
#: iwla.py:474
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:442
|
||||
msgid "Visitors"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:442 iwla.py:454 plugins/display/feeds.py:98
|
||||
#: plugins/display/operating_systems.py:90 plugins/display/track_users.py:108
|
||||
#: iwla.py:474 iwla.py:486 plugins/display/feeds.py:99
|
||||
#: plugins/display/ip_to_geo.py:109 plugins/display/operating_systems.py:90
|
||||
#: plugins/display/track_users.py:108
|
||||
msgid "Details"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:490
|
||||
#: iwla.py:474 plugins/display/ip_to_geo.py:96
|
||||
#: plugins/display/ip_to_geo.py:114
|
||||
msgid "Visitors"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:522
|
||||
msgid "Statistics for"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:497
|
||||
#: iwla.py:529
|
||||
msgid "Last update"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:501
|
||||
#: iwla.py:533
|
||||
msgid "Time analysis"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:503
|
||||
#: iwla.py:535
|
||||
msgid "hours"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:504
|
||||
#: iwla.py:536
|
||||
msgid "minutes"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:504
|
||||
#: iwla.py:536
|
||||
msgid "seconds"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:70 plugins/display/feeds.py:75
|
||||
#: plugins/display/top_visitors.py:72
|
||||
#: plugins/display/all_visits.py:70 plugins/display/feeds.py:76
|
||||
#: plugins/display/ip_to_geo.py:64 plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "Host"
|
||||
msgstr ""
|
||||
|
||||
|
@ -242,27 +245,35 @@ msgstr ""
|
|||
msgid "Others"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/browsers.py:105
|
||||
msgid "Top Browsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/browsers.py:107
|
||||
msgid "All Browsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:69
|
||||
#: plugins/display/browsers.py:123
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:70
|
||||
msgid "All Feeds parsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:75
|
||||
#: plugins/display/feeds.py:76
|
||||
msgid "All feeds parsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:91
|
||||
#: plugins/display/feeds.py:92
|
||||
msgid "Merged feeds parsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:96
|
||||
#: plugins/display/feeds.py:97
|
||||
msgid "Feeds parsers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/feeds.py:103
|
||||
#: plugins/display/feeds.py:104
|
||||
msgid "Found"
|
||||
msgstr ""
|
||||
|
||||
|
@ -302,6 +313,15 @@ msgstr ""
|
|||
msgid "Hours"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/ip_to_geo.py:96
|
||||
msgid "Country"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/ip_to_geo.py:96 plugins/display/ip_to_geo.py:107
|
||||
#: plugins/display/ip_to_geo.py:114
|
||||
msgid "Countries"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/operating_systems.py:78
|
||||
#: plugins/display/operating_systems.py:88
|
||||
msgid "Operating Systems"
|
||||
|
@ -344,10 +364,6 @@ msgstr ""
|
|||
msgid "All Key Phrases"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:200
|
||||
msgid "Key phrases"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||
msgid "Key phrase"
|
||||
msgstr ""
|
||||
|
@ -356,6 +372,10 @@ msgstr ""
|
|||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:200 plugins/display/referers_diff.py:56
|
||||
msgid "Key phrases"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:210
|
||||
msgid "Top key phrases"
|
||||
msgstr ""
|
||||
|
@ -369,6 +389,7 @@ msgid "Hit"
|
|||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
|
||||
#: plugins/display/top_downloads_diff.py:56
|
||||
msgid "All Downloads"
|
||||
msgstr ""
|
||||
|
||||
|
@ -402,7 +423,3 @@ msgstr ""
|
|||
msgid "Last Access"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "IP"
|
||||
msgstr ""
|
||||
|
||||
|
|
Binary file not shown.
|
@ -5,8 +5,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iwla\n"
|
||||
"POT-Creation-Date: 2015-03-02 19:44+CET\n"
|
||||
"PO-Revision-Date: 2015-03-02 19:45+0100\n"
|
||||
"POT-Creation-Date: 2016-04-12 08:34+CEST\n"
|
||||
"PO-Revision-Date: 2016-04-12 08:39+0100\n"
|
||||
"Last-Translator: Soutadé <soutade@gmail.com>\n"
|
||||
"Language-Team: iwla\n"
|
||||
"Language: fr_FR\n"
|
||||
|
@ -37,11 +37,13 @@ msgstr "Juillet"
|
|||
msgid "March"
|
||||
msgstr "Mars"
|
||||
|
||||
#: display.py:32 iwla.py:440
|
||||
#: display.py:32
|
||||
#: iwla.py:472
|
||||
msgid "June"
|
||||
msgstr "Juin"
|
||||
|
||||
#: display.py:32 iwla.py:440
|
||||
#: display.py:32
|
||||
#: iwla.py:472
|
||||
msgid "May"
|
||||
msgstr "Mai"
|
||||
|
||||
|
@ -65,147 +67,177 @@ msgstr "Octobre"
|
|||
msgid "September"
|
||||
msgstr "Septembre"
|
||||
|
||||
#: display.py:187
|
||||
#: display.py:195
|
||||
msgid "Ratio"
|
||||
msgstr "Pourcentage"
|
||||
|
||||
#: iwla.py:381
|
||||
#: iwla.py:413
|
||||
msgid "Statistics"
|
||||
msgstr "Statistiques"
|
||||
|
||||
#: iwla.py:389 iwla.py:442
|
||||
#: iwla.py:421
|
||||
#: iwla.py:474
|
||||
msgid "Not viewed Bandwidth"
|
||||
msgstr "Traffic non vu"
|
||||
|
||||
#: iwla.py:389 iwla.py:442
|
||||
#: iwla.py:421
|
||||
#: iwla.py:474
|
||||
msgid "Visits"
|
||||
msgstr "Visites"
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:75 plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83 plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153 plugins/display/top_downloads.py:97
|
||||
#: plugins/display/top_visitors.py:72 plugins/display/track_users.py:113
|
||||
#: iwla.py:421
|
||||
#: iwla.py:474
|
||||
#: plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:76
|
||||
#: plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83
|
||||
#: plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153
|
||||
#: plugins/display/top_downloads.py:97
|
||||
#: plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "Hits"
|
||||
msgstr "Hits"
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:75 plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83 plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153 plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:77 plugins/display/track_users.py:113
|
||||
#: iwla.py:421
|
||||
#: iwla.py:474
|
||||
#: plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:76
|
||||
#: plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83
|
||||
#: plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153
|
||||
#: plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:77
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "Pages"
|
||||
msgstr "Pages"
|
||||
|
||||
#: iwla.py:389 iwla.py:442 plugins/display/all_visits.py:70
|
||||
#: plugins/display/hours_stats.py:73 plugins/display/hours_stats.py:83
|
||||
#: iwla.py:421
|
||||
#: iwla.py:474
|
||||
#: plugins/display/all_visits.py:70
|
||||
#: plugins/display/hours_stats.py:73
|
||||
#: plugins/display/hours_stats.py:83
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Bandwidth"
|
||||
msgstr "Bande passante"
|
||||
|
||||
#: iwla.py:389 plugins/display/hours_stats.py:71
|
||||
#: iwla.py:421
|
||||
#: plugins/display/hours_stats.py:71
|
||||
msgid "By day"
|
||||
msgstr "Par jour"
|
||||
|
||||
#: iwla.py:389 plugins/display/hours_stats.py:73
|
||||
#: iwla.py:421
|
||||
#: plugins/display/hours_stats.py:73
|
||||
msgid "Day"
|
||||
msgstr "Jour"
|
||||
|
||||
#: iwla.py:426
|
||||
#: iwla.py:458
|
||||
msgid "Average"
|
||||
msgstr "Moyenne"
|
||||
|
||||
#: iwla.py:431 iwla.py:476
|
||||
#: iwla.py:463
|
||||
#: iwla.py:508
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Apr"
|
||||
msgstr "Avr"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Aug"
|
||||
msgstr "Août"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Dec"
|
||||
msgstr "Déc"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Feb"
|
||||
msgstr "Fév"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Jan"
|
||||
msgstr "Jan"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Jul"
|
||||
msgstr "Jui"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Mar"
|
||||
msgstr "Mars"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Nov"
|
||||
msgstr "Nov"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Oct"
|
||||
msgstr "Oct"
|
||||
|
||||
#: iwla.py:440
|
||||
#: iwla.py:472
|
||||
msgid "Sep"
|
||||
msgstr "Sep"
|
||||
|
||||
#: iwla.py:441
|
||||
#: iwla.py:473
|
||||
msgid "Summary"
|
||||
msgstr "Résumé"
|
||||
|
||||
#: iwla.py:442
|
||||
#: iwla.py:474
|
||||
msgid "Month"
|
||||
msgstr "Mois"
|
||||
|
||||
#: iwla.py:442
|
||||
msgid "Visitors"
|
||||
msgstr "Visiteurs"
|
||||
|
||||
#: iwla.py:442 iwla.py:454 plugins/display/feeds.py:98
|
||||
#: plugins/display/operating_systems.py:90 plugins/display/track_users.py:108
|
||||
#: iwla.py:474
|
||||
#: iwla.py:486
|
||||
#: plugins/display/feeds.py:99
|
||||
#: plugins/display/ip_to_geo.py:109
|
||||
#: plugins/display/operating_systems.py:90
|
||||
#: plugins/display/track_users.py:108
|
||||
msgid "Details"
|
||||
msgstr "Détails"
|
||||
|
||||
#: iwla.py:490
|
||||
#: iwla.py:474
|
||||
#: plugins/display/ip_to_geo.py:96
|
||||
#: plugins/display/ip_to_geo.py:114
|
||||
msgid "Visitors"
|
||||
msgstr "Visiteurs"
|
||||
|
||||
#: iwla.py:522
|
||||
msgid "Statistics for"
|
||||
msgstr "Statistiques pour"
|
||||
|
||||
#: iwla.py:497
|
||||
#: iwla.py:529
|
||||
msgid "Last update"
|
||||
msgstr "Dernière mise à jour"
|
||||
|
||||
#: iwla.py:501
|
||||
#: iwla.py:533
|
||||
msgid "Time analysis"
|
||||
msgstr "Durée de l'analyse"
|
||||
|
||||
#: iwla.py:503
|
||||
#: iwla.py:535
|
||||
msgid "hours"
|
||||
msgstr "heures "
|
||||
|
||||
#: iwla.py:504
|
||||
#: iwla.py:536
|
||||
msgid "minutes"
|
||||
msgstr "minutes"
|
||||
|
||||
#: iwla.py:504
|
||||
#: iwla.py:536
|
||||
msgid "seconds"
|
||||
msgstr "secondes"
|
||||
|
||||
#: plugins/display/all_visits.py:70 plugins/display/feeds.py:75
|
||||
#: plugins/display/all_visits.py:70
|
||||
#: plugins/display/feeds.py:76
|
||||
#: plugins/display/ip_to_geo.py:64
|
||||
#: plugins/display/top_visitors.py:72
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "Host"
|
||||
msgstr "Hôte"
|
||||
|
||||
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||
#: plugins/display/all_visits.py:70
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Last seen"
|
||||
msgstr "Dernière visite"
|
||||
|
||||
|
@ -213,7 +245,8 @@ msgstr "Dernière visite"
|
|||
msgid "All visits"
|
||||
msgstr "Toutes les visites"
|
||||
|
||||
#: plugins/display/all_visits.py:93 plugins/display/top_visitors.py:72
|
||||
#: plugins/display/all_visits.py:93
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Top visitors"
|
||||
msgstr "Top visiteurs"
|
||||
|
||||
|
@ -221,50 +254,70 @@ msgstr "Top visiteurs"
|
|||
msgid "Browsers"
|
||||
msgstr "Navigateurs"
|
||||
|
||||
#: plugins/display/browsers.py:79 plugins/display/browsers.py:113
|
||||
#: plugins/display/browsers.py:79
|
||||
#: plugins/display/browsers.py:113
|
||||
msgid "Browser"
|
||||
msgstr "Navigateur"
|
||||
|
||||
#: plugins/display/browsers.py:79 plugins/display/browsers.py:113
|
||||
#: plugins/display/browsers.py:79
|
||||
#: plugins/display/browsers.py:113
|
||||
#: plugins/display/operating_systems.py:78
|
||||
#: plugins/display/operating_systems.py:95 plugins/display/top_hits.py:71
|
||||
#: plugins/display/top_hits.py:97 plugins/display/top_pages.py:71
|
||||
#: plugins/display/operating_systems.py:95
|
||||
#: 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 "Entrance"
|
||||
msgstr "Entrées"
|
||||
|
||||
#: plugins/display/browsers.py:98 plugins/display/browsers.py:128
|
||||
#: plugins/display/referers.py:110 plugins/display/referers.py:125
|
||||
#: plugins/display/referers.py:140 plugins/display/referers.py:163
|
||||
#: plugins/display/referers.py:174 plugins/display/referers.py:185
|
||||
#: plugins/display/referers.py:222 plugins/display/top_downloads.py:83
|
||||
#: plugins/display/top_downloads.py:103 plugins/display/top_hits.py:82
|
||||
#: plugins/display/top_hits.py:103 plugins/display/top_pages.py:82
|
||||
#: plugins/display/top_pages.py:102 plugins/display/top_visitors.py:92
|
||||
#: plugins/display/browsers.py:98
|
||||
#: plugins/display/browsers.py:128
|
||||
#: plugins/display/referers.py:110
|
||||
#: plugins/display/referers.py:125
|
||||
#: plugins/display/referers.py:140
|
||||
#: plugins/display/referers.py:163
|
||||
#: plugins/display/referers.py:174
|
||||
#: plugins/display/referers.py:185
|
||||
#: plugins/display/referers.py:222
|
||||
#: plugins/display/top_downloads.py:83
|
||||
#: plugins/display/top_downloads.py:103
|
||||
#: plugins/display/top_hits.py:82
|
||||
#: plugins/display/top_hits.py:103
|
||||
#: plugins/display/top_pages.py:82
|
||||
#: plugins/display/top_pages.py:102
|
||||
#: plugins/display/top_visitors.py:92
|
||||
msgid "Others"
|
||||
msgstr "Autres"
|
||||
|
||||
#: plugins/display/browsers.py:105
|
||||
msgid "Top Browsers"
|
||||
msgstr "Top Navigateurs"
|
||||
|
||||
#: plugins/display/browsers.py:107
|
||||
msgid "All Browsers"
|
||||
msgstr "Tous les navigateurs"
|
||||
|
||||
#: plugins/display/feeds.py:69
|
||||
#: plugins/display/browsers.py:123
|
||||
msgid "Unknown"
|
||||
msgstr "Inconnu"
|
||||
|
||||
#: plugins/display/feeds.py:70
|
||||
msgid "All Feeds parsers"
|
||||
msgstr "Tous les agrégateurs"
|
||||
|
||||
#: plugins/display/feeds.py:75
|
||||
#: plugins/display/feeds.py:76
|
||||
msgid "All feeds parsers"
|
||||
msgstr "Tous les agrégateurs"
|
||||
|
||||
#: plugins/display/feeds.py:91
|
||||
#: plugins/display/feeds.py:92
|
||||
msgid "Merged feeds parsers"
|
||||
msgstr "Agrégateurs fusionnés"
|
||||
|
||||
#: plugins/display/feeds.py:96
|
||||
#: plugins/display/feeds.py:97
|
||||
msgid "Feeds parsers"
|
||||
msgstr "Agrégateurs"
|
||||
|
||||
#: plugins/display/feeds.py:103
|
||||
#: plugins/display/feeds.py:104
|
||||
msgid "Found"
|
||||
msgstr "Trouvé"
|
||||
|
||||
|
@ -304,6 +357,16 @@ msgstr "Par heures"
|
|||
msgid "Hours"
|
||||
msgstr "Heures"
|
||||
|
||||
#: plugins/display/ip_to_geo.py:96
|
||||
msgid "Country"
|
||||
msgstr "Pays"
|
||||
|
||||
#: plugins/display/ip_to_geo.py:96
|
||||
#: plugins/display/ip_to_geo.py:107
|
||||
#: plugins/display/ip_to_geo.py:114
|
||||
msgid "Countries"
|
||||
msgstr "Pays"
|
||||
|
||||
#: plugins/display/operating_systems.py:78
|
||||
#: plugins/display/operating_systems.py:88
|
||||
msgid "Operating Systems"
|
||||
|
@ -318,19 +381,23 @@ msgstr "Système d'exploitation"
|
|||
msgid "Connexion from"
|
||||
msgstr "Connexion depuis"
|
||||
|
||||
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||
#: plugins/display/referers.py:95
|
||||
#: plugins/display/referers.py:153
|
||||
msgid "Origin"
|
||||
msgstr "Origine"
|
||||
|
||||
#: plugins/display/referers.py:99 plugins/display/referers.py:156
|
||||
#: plugins/display/referers.py:99
|
||||
#: plugins/display/referers.py:156
|
||||
msgid "Search Engine"
|
||||
msgstr "Moteur de recherche"
|
||||
|
||||
#: plugins/display/referers.py:114 plugins/display/referers.py:167
|
||||
#: plugins/display/referers.py:114
|
||||
#: plugins/display/referers.py:167
|
||||
msgid "External URL"
|
||||
msgstr "URL externe"
|
||||
|
||||
#: plugins/display/referers.py:129 plugins/display/referers.py:178
|
||||
#: plugins/display/referers.py:129
|
||||
#: plugins/display/referers.py:178
|
||||
msgid "External URL (robot)"
|
||||
msgstr "URL externe (robot)"
|
||||
|
||||
|
@ -347,17 +414,20 @@ msgid "All Key Phrases"
|
|||
msgstr "Toutes les phrases clé"
|
||||
|
||||
#: plugins/display/referers.py:200
|
||||
msgid "Key phrases"
|
||||
msgstr "Phrases clé"
|
||||
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||
#: plugins/display/referers.py:216
|
||||
msgid "Key phrase"
|
||||
msgstr "Phrase clé"
|
||||
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||
#: plugins/display/referers.py:200
|
||||
#: plugins/display/referers.py:216
|
||||
msgid "Search"
|
||||
msgstr "Recherche"
|
||||
|
||||
#: plugins/display/referers.py:200
|
||||
#: plugins/display/referers_diff.py:56
|
||||
msgid "Key phrases"
|
||||
msgstr "Phrases clé"
|
||||
|
||||
#: plugins/display/referers.py:210
|
||||
msgid "Top key phrases"
|
||||
msgstr "Top phrases clé"
|
||||
|
@ -370,13 +440,18 @@ msgstr "Toutes les phrases clé"
|
|||
msgid "Hit"
|
||||
msgstr "Hit"
|
||||
|
||||
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
|
||||
#: plugins/display/top_downloads.py:71
|
||||
#: plugins/display/top_downloads.py:91
|
||||
#: plugins/display/top_downloads_diff.py:56
|
||||
msgid "All Downloads"
|
||||
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
|
||||
#: 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"
|
||||
msgstr "URI"
|
||||
|
||||
|
@ -384,11 +459,13 @@ msgstr "URI"
|
|||
msgid "Top Downloads"
|
||||
msgstr "Top Téléchargements"
|
||||
|
||||
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:91
|
||||
#: plugins/display/top_hits.py:71
|
||||
#: plugins/display/top_hits.py:91
|
||||
msgid "All Hits"
|
||||
msgstr "Tous les hits"
|
||||
|
||||
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:90
|
||||
#: plugins/display/top_pages.py:71
|
||||
#: plugins/display/top_pages.py:90
|
||||
msgid "All Pages"
|
||||
msgstr "Toutes les pages"
|
||||
|
||||
|
@ -396,17 +473,18 @@ msgstr "Toutes les pages"
|
|||
msgid "Top Pages"
|
||||
msgstr "Top Pages"
|
||||
|
||||
#: plugins/display/track_users.py:77 plugins/display/track_users.py:106
|
||||
#: plugins/display/track_users.py:77
|
||||
#: plugins/display/track_users.py:106
|
||||
msgid "Tracked users"
|
||||
msgstr "Utilisateurs traqués"
|
||||
|
||||
#: plugins/display/track_users.py:77 plugins/display/track_users.py:113
|
||||
#: plugins/display/track_users.py:77
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "Last Access"
|
||||
msgstr "Dernière visite"
|
||||
|
||||
#: plugins/display/track_users.py:113
|
||||
msgid "IP"
|
||||
msgstr "IP"
|
||||
#~ msgid "IP"
|
||||
#~ msgstr "IP"
|
||||
|
||||
#~ msgid "Page"
|
||||
#~ msgstr "Page"
|
||||
|
|
|
@ -83,11 +83,12 @@ class IWLADisplayBrowsers(IPlugin):
|
|||
for (browser, entrance) in new_list:
|
||||
if browser != 'unknown':
|
||||
try:
|
||||
icon = '<img src="/%s/browser/%s.png"/>' % (self.icon_path, awstats_data.browsers_icons[self.icon_names[browser]])
|
||||
name = awstats_data.browsers_icons[self.icon_names[browser]]
|
||||
icon = '<img alt="%s icon" src="/%s/browser/%s.png"/>' % (name, self.icon_path, name)
|
||||
except:
|
||||
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
icon = '<img alt="Unknown browser icon" src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
else:
|
||||
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
icon = '<img alt="Unknown browser icon" src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
browser = 'Unknown'
|
||||
table.appendRow([icon, browser, entrance])
|
||||
total_browsers[2] += entrance
|
||||
|
@ -115,11 +116,12 @@ class IWLADisplayBrowsers(IPlugin):
|
|||
for (browser, entrance) in browsers[:10]:
|
||||
if browser != 'unknown':
|
||||
try:
|
||||
icon = '<img src="/%s/browser/%s.png"/>' % (self.icon_path, awstats_data.browsers_icons[self.icon_names[browser]])
|
||||
name = awstats_data.browsers_icons[self.icon_names[browser]]
|
||||
icon = '<img alt="%s icon" src="/%s/browser/%s.png"/>' % (name, self.icon_path, name)
|
||||
except:
|
||||
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
icon = '<img alt="Unknown browser icon" src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
else:
|
||||
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
icon = '<img alt="Unknown browser icon" src="/%s/browser/unknown.png"/>' % (self.icon_path)
|
||||
browser = self.iwla._(u'Unknown')
|
||||
table.appendRow([icon, browser, entrance])
|
||||
total_browsers[2] -= entrance
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright Grégory Soutadé 2015
|
||||
# Copyright Grégory Soutadé 2016
|
||||
|
||||
# This file is part of iwla
|
||||
|
||||
|
@ -54,7 +54,7 @@ class IWLADisplayTopGeo(IPlugin):
|
|||
def __init__(self, iwla):
|
||||
super(IWLADisplayTopGeo, self).__init__(iwla)
|
||||
self.API_VERSION = 1
|
||||
self.requires = ['IWLAPostAnalysisIPToGeo']
|
||||
#self.requires = ['IWLAPostAnalysisIPToGeo']
|
||||
|
||||
def load(self):
|
||||
self.icon_path = self.iwla.getConfValue('icon_path', '/')
|
||||
|
@ -65,19 +65,19 @@ class IWLADisplayTopGeo(IPlugin):
|
|||
|
||||
return True
|
||||
|
||||
@staticmethod # Needed to have unbound methd
|
||||
@staticmethod # Needed to have unbound method
|
||||
def FlagFilter(host, self):
|
||||
cc = None
|
||||
host_name = host.split(' ')[0] # hostname or ip
|
||||
if host_name in self.valid_visitors.keys():
|
||||
cc = self.valid_visitors[host_name]['country_code']
|
||||
cc = self.valid_visitors[host_name].get('country_code', None)
|
||||
else:
|
||||
for visitor in self.valid_visitors.values():
|
||||
if visitor['remote_addr'] == host_name:
|
||||
cc = visitor['country_code']
|
||||
cc = visitor.get('country_code', None)
|
||||
break
|
||||
if not cc or cc == 'ip': return None
|
||||
icon = '<img src="/%s/flags/%s.png"/>' % (self.icon_path, cc)
|
||||
icon = '<img alt="%s flag" src="/%s/flags/%s.png"/>' % (cc, self.icon_path, cc)
|
||||
return '%s %s' % (icon ,host)
|
||||
|
||||
def hook(self):
|
||||
|
@ -96,7 +96,7 @@ class IWLADisplayTopGeo(IPlugin):
|
|||
table = display.createBlock(DisplayHTMLBlockTable, self.iwla._(u'Countries'), ['', self.iwla._(u'Country'), self.iwla._(u'Visitors')])
|
||||
table.setColsCSSClass(['', '', 'iwla_hit'])
|
||||
for (cc, visitors) in geo:
|
||||
icon = '<img src="/%s/flags/%s.png"/>' % (self.icon_path, cc)
|
||||
icon = '<img alt="%s flag" src="/%s/flags/%s.png"/>' % (cc, self.icon_path, cc)
|
||||
table.appendRow([icon, cc, visitors])
|
||||
table.computeRatio(2)
|
||||
page.appendBlock(table)
|
||||
|
@ -114,7 +114,7 @@ class IWLADisplayTopGeo(IPlugin):
|
|||
table = display.createBlock(DisplayHTMLBlockTable, title, ['', self.iwla._(u'Countries'), self.iwla._(u'Visitors')])
|
||||
table.setColsCSSClass(['', '', 'iwla_hit'])
|
||||
for (cc, visitors) in geo[:10]:
|
||||
icon = '<img src="/%s/flags/%s.png"/>' % (self.icon_path, cc)
|
||||
icon = '<img alt="%s flag" src="/%s/flags/%s.png"/>' % (cc, self.icon_path, cc)
|
||||
table.appendRow([icon, cc, visitors])
|
||||
table.computeRatio(2)
|
||||
index.appendBlock(table)
|
||||
|
|
|
@ -78,7 +78,7 @@ class IWLADisplayTopOperatingSystems(IPlugin):
|
|||
table = display.createBlock(DisplayHTMLBlockTable, self.iwla._(u'Operating Systems'), ['', self.iwla._(u'Operating System'), self.iwla._(u'Entrance')])
|
||||
table.setColsCSSClass(['', '', 'iwla_hit'])
|
||||
for (os_name, entrance) in operating_systems:
|
||||
icon = '<img src="/%s/os/%s.png"/>' % (self.icon_path, os_name)
|
||||
icon = '<img alt="%s icon" src="/%s/os/%s.png"/>' % (os_name, self.icon_path, os_name)
|
||||
table.appendRow([icon, os_name, entrance])
|
||||
page.appendBlock(table)
|
||||
|
||||
|
@ -95,7 +95,7 @@ class IWLADisplayTopOperatingSystems(IPlugin):
|
|||
table = display.createBlock(DisplayHTMLBlockTable, title, ['', self.iwla._(u'Operating System'), self.iwla._(u'Entrance')])
|
||||
table.setColsCSSClass(['', '', 'iwla_hit'])
|
||||
for (family, entrance) in os_families:
|
||||
icon = '<img src="/%s/os/%s.png"/>' % (self.icon_path, self.icon_names[family])
|
||||
icon = '<img alt="%s icon" src="/%s/os/%s.png"/>' % (self.icon_names[family], self.icon_path, self.icon_names[family])
|
||||
table.appendRow([icon, family, entrance])
|
||||
table.computeRatio(2)
|
||||
index.appendBlock(table)
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright 2016 Grégory Soutadé
|
||||
#
|
||||
# This file is part of iptogeo.
|
||||
#
|
||||
# iptogeo is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# iptogeo is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with iptogeo. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import socket
|
||||
import struct
|
||||
|
||||
|
@ -27,26 +46,44 @@ class IPToGeo(object):
|
|||
5 : 'Unsupported IP version',
|
||||
6 : 'IP not found'}
|
||||
|
||||
def __init__(self, remote_addr='127.0.0.1', remote_port=53333, timeout=None):
|
||||
def __init__(self, remote_addr='127.0.0.1', remote_port=53333, timeout=None, family=socket.AF_INET):
|
||||
self._remote_addr = remote_addr
|
||||
self._remote_port = remote_port
|
||||
self._timeout = timeout
|
||||
|
||||
self._family = family
|
||||
|
||||
self._create_socket()
|
||||
|
||||
def _create_socket(self):
|
||||
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self._socket = socket.socket(self._family, socket.SOCK_STREAM)
|
||||
if not self._timeout is None:
|
||||
self._socket.settimeout(self._timeout)
|
||||
self._socket.connect((self._remote_addr, self._remote_port))
|
||||
|
||||
def _create_request(self, ip):
|
||||
def _extend_ipv6(self, ipv6):
|
||||
tmp = ''
|
||||
for s in ipv6.split(':'):
|
||||
if not s: break
|
||||
while len(s) != 4:
|
||||
s = '0' + s
|
||||
tmp += s
|
||||
while len(tmp) < 16*2:
|
||||
tmp += '0'
|
||||
res = ''
|
||||
for i in range(0, 15*2, 2):
|
||||
res += tmp[i] + tmp[i+1] + ':'
|
||||
res += tmp[30] + tmp[31]
|
||||
|
||||
return res
|
||||
|
||||
def _create_request(self, ip, ip_type):
|
||||
packet = ''
|
||||
packet += struct.pack('<IBBBBI', IPToGeo.MAGIC, IPToGeo.VERSION, IPToGeo.REQ,
|
||||
0, #err
|
||||
IPToGeo.IPV4, # ip type
|
||||
ip_type, # ip type
|
||||
0) # flags
|
||||
packet += struct.pack('<BBBB', ip[0], ip[1], ip[2], ip[3]) # ipv4
|
||||
for i in ip:
|
||||
packet += struct.pack('<B', i) # ipv4
|
||||
packet += struct.pack('<III', 0, 0, 0) # ipv6
|
||||
packet += struct.pack('<I', 0) # country code
|
||||
|
||||
|
@ -58,18 +95,35 @@ class IPToGeo(object):
|
|||
if magic != IPToGeo.MAGIC:
|
||||
raise IPToGeoException('Invalid magic %08x' % (magic))
|
||||
|
||||
if err == IPToGeo.IP_NOT_FOUND: return (ipv4, None) # IP not found
|
||||
ip_res = '%08x' % (ipv4)
|
||||
if ip_type == IPToGeo.IPV6:
|
||||
ip_res += '%08x' % (ipv6b)
|
||||
ip_res += '%08x' % (ipv6c)
|
||||
ip_res += '%08x' % (ipv6d)
|
||||
|
||||
if err == IPToGeo.IP_NOT_FOUND: return (ip_res, None) # IP not found
|
||||
if err != 0:
|
||||
raise IPToGeoException(IPToGeo.ERRORS[err])
|
||||
|
||||
(cc0, cc1, cc2, cc3) = struct.unpack_from('BBBB', packet, 7*4)
|
||||
|
||||
return (ipv4, '%c%c%c%c' % (cc0, cc1, cc2, cc3))
|
||||
return (ip_res, '%c%c%c%c' % (cc0, cc1, cc2, cc3))
|
||||
|
||||
def ip_to_geo(self, ip):
|
||||
splitted_ip = [int(a) for a in ip.split('.')]
|
||||
ip_type = IPToGeo.IPV4
|
||||
if ip.find('.') >= 0:
|
||||
splitted_ip = [int(a) for a in ip.split('.')]
|
||||
if len(splitted_ip) != 4:
|
||||
raise Exception('Bad IP %s' % (ip))
|
||||
elif ip.find(':') >= 0:
|
||||
splitted_ip = [int(a, 16) for a in self._extend_ipv6(ip).split(':')]
|
||||
if len(splitted_ip) != 16:
|
||||
raise Exception('Bad IP %s' % (ip))
|
||||
ip_type = IPToGeo.IPV6
|
||||
else:
|
||||
raise Exception('Bad IP %s' % (ip))
|
||||
|
||||
packet = self._create_request(splitted_ip)
|
||||
packet = self._create_request(splitted_ip, ip_type)
|
||||
try:
|
||||
self._socket.send(packet)
|
||||
except IOError, e:
|
||||
|
|
BIN
resources/icon/os/macosx4.png
Normal file
BIN
resources/icon/os/macosx4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
BIN
resources/icon/os/macosx5.png
Normal file
BIN
resources/icon/os/macosx5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
BIN
resources/icon/os/macosx6.png
Normal file
BIN
resources/icon/os/macosx6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
BIN
resources/icon/os/macosx7.png
Normal file
BIN
resources/icon/os/macosx7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
BIN
resources/icon/os/macosx8.png
Normal file
BIN
resources/icon/os/macosx8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
BIN
resources/icon/os/macosx9.png
Normal file
BIN
resources/icon/os/macosx9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
Loading…
Reference in New Issue
Block a user