Store files in month directory
This commit is contained in:
@@ -15,11 +15,10 @@ class IWLADisplayAllVisits(IPlugin):
|
||||
|
||||
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
|
||||
|
||||
cur_time = self.iwla.getCurTime()
|
||||
title = time.strftime('All visits - %B %Y', cur_time)
|
||||
title = time.strftime('All visits - %B %Y', self.iwla.getCurTime())
|
||||
|
||||
filename = 'all_visits_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'all_visits.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('Last seen', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])
|
||||
|
@@ -54,8 +54,8 @@ class IWLADisplayReferers(IPlugin):
|
||||
cur_time = self.iwla.getCurTime()
|
||||
title = time.strftime('Connexion from - %B %Y', cur_time)
|
||||
|
||||
filename = 'referers_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'referers.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('Connexion from', ['Origin', 'Pages', 'Hits'])
|
||||
@@ -93,8 +93,8 @@ class IWLADisplayReferers(IPlugin):
|
||||
# All key phrases in a file
|
||||
title = time.strftime('Key Phrases - %B %Y', cur_time)
|
||||
|
||||
filename = 'key_phrases_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'key_phrases.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('Top key phrases', ['Key phrase', 'Search'])
|
||||
|
@@ -22,11 +22,10 @@ class IWLADisplayTopDownloads(IPlugin):
|
||||
table.appendRow([uri, entrance])
|
||||
index.appendBlock(table)
|
||||
|
||||
cur_time = self.iwla.getCurTime()
|
||||
title = time.strftime('Top Downloads - %B %Y', cur_time)
|
||||
title = time.strftime('Top Downloads - %B %Y', self.iwla.getCurTime())
|
||||
|
||||
filename = 'top_downloads_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'top_downloads.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('All Downloads', ['URI', 'Hit'])
|
||||
|
@@ -22,11 +22,10 @@ class IWLADisplayTopHits(IPlugin):
|
||||
table.appendRow([uri, entrance])
|
||||
index.appendBlock(table)
|
||||
|
||||
cur_time = self.iwla.getCurTime()
|
||||
title = time.strftime('All Hits - %B %Y', cur_time)
|
||||
title = time.strftime('All Hits - %B %Y', self.iwla.getCurTime())
|
||||
|
||||
filename = 'top_hits_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'top_hits.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('Top Hits', ['URI', 'Entrance'])
|
||||
|
@@ -22,11 +22,10 @@ class IWLADisplayTopPages(IPlugin):
|
||||
table.appendRow([uri, entrance])
|
||||
index.appendBlock(table)
|
||||
|
||||
cur_time = self.iwla.getCurTime()
|
||||
title = time.strftime('All Pages - %B %Y', cur_time)
|
||||
title = time.strftime('All Pages - %B %Y', self.iwla.getCurTime())
|
||||
|
||||
filename = 'top_pages_%d.html' % (cur_time.tm_mon)
|
||||
path = '%d/%s' % (cur_time.tm_year, filename)
|
||||
filename = 'top_pages.html'
|
||||
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
|
||||
|
||||
page = DisplayHTMLPage(title, path)
|
||||
table = DisplayHTMLBlockTable('Top Pages', ['URI', 'Entrance'])
|
||||
|
Reference in New Issue
Block a user