| 
									
										
										
										
											2014-11-30 19:05:17 +01:00
										 |  |  | import os | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | # Default configuration | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-19 11:34:25 +01:00
										 |  |  | # Default database directory | 
					
						
							| 
									
										
										
										
											2014-12-16 07:42:42 +01:00
										 |  |  | DB_ROOT = './output_db' | 
					
						
							| 
									
										
										
										
											2014-12-19 11:34:25 +01:00
										 |  |  | # Default HTML output directory | 
					
						
							| 
									
										
										
										
											2014-11-30 19:05:17 +01:00
										 |  |  | DISPLAY_ROOT = './output' | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Hooks directories (don't edit) | 
					
						
							|  |  |  | HOOKS_ROOT = 'plugins' | 
					
						
							| 
									
										
										
										
											2014-11-22 19:23:56 +01:00
										 |  |  | PRE_HOOK_DIRECTORY = HOOKS_ROOT + '.pre_analysis' | 
					
						
							|  |  |  | POST_HOOK_DIRECTORY = HOOKS_ROOT + '.post_analysis' | 
					
						
							|  |  |  | DISPLAY_HOOK_DIRECTORY = HOOKS_ROOT + '.display' | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Meta Database filename | 
					
						
							| 
									
										
										
										
											2014-12-01 21:13:35 +01:00
										 |  |  | META_PATH = os.path.join(DB_ROOT, 'meta.db') | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Database filename per month | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | DB_FILENAME = 'iwla.db' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Web server log format (nginx style). Default is what apache log | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | log_format = '$server_name:$server_port $remote_addr - $remote_user [$time_local] ' +\ | 
					
						
							|  |  |  |     '"$request" $status $body_bytes_sent ' +\ | 
					
						
							|  |  |  |     '"$http_referer" "$http_user_agent"' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Time format used in log format | 
					
						
							| 
									
										
										
										
											2014-12-10 21:41:22 +01:00
										 |  |  | time_format = '%d/%b/%Y:%H:%M:%S %z' | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Hooks that are loaded at runtime (only set names without path and extensions) | 
					
						
							| 
									
										
										
										
											2014-11-21 16:57:11 +01:00
										 |  |  | pre_analysis_hooks = [] | 
					
						
							|  |  |  | post_analysis_hooks = [] | 
					
						
							|  |  |  | display_hooks = [] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Extensions that are considered as a HTML page (or result) | 
					
						
							| 
									
										
										
										
											2014-11-27 12:34:42 +01:00
										 |  |  | pages_extensions = ['/', 'htm', 'html', 'xhtml', 'py', 'pl', 'rb', 'php'] | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # HTTP codes that are cosidered OK | 
					
						
							| 
									
										
										
										
											2014-11-26 16:17:16 +01:00
										 |  |  | viewed_http_codes = [200, 304] | 
					
						
							| 
									
										
										
										
											2014-11-27 09:01:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # If False, doesn't cout visitors that doesn't GET a page but resources only (images, rss...) | 
					
						
							| 
									
										
										
										
											2014-11-27 09:01:51 +01:00
										 |  |  | count_hit_only_visitors = True | 
					
						
							| 
									
										
										
										
											2014-11-27 12:34:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Multimedia extensions (not accounted as downloaded files) | 
					
						
							| 
									
										
										
										
											2014-11-27 12:34:42 +01:00
										 |  |  | multimedia_files = ['png', 'jpg', 'jpeg', 'gif', 'ico', | 
					
						
							|  |  |  |                     'css', 'js'] | 
					
						
							| 
									
										
										
										
											2014-11-30 19:05:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Default resources path (will be symlinked in DISPLAY_OUTPUT) | 
					
						
							| 
									
										
										
										
											2014-11-30 19:05:17 +01:00
										 |  |  | resources_path = ['resources'] | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # Icon path | 
					
						
							| 
									
										
										
										
											2014-12-08 14:13:26 +01:00
										 |  |  | icon_path = '%s/%s' % (os.path.basename(resources_path[0]), 'icon') | 
					
						
							| 
									
										
										
										
											2014-12-08 18:38:40 +01:00
										 |  |  | # CSS path (you can add yours) | 
					
						
							| 
									
										
										
										
											2014-12-02 20:49:56 +01:00
										 |  |  | css_path = ['%s/%s/%s' % (os.path.basename(resources_path[0]), 'css', 'iwla.css')] | 
					
						
							| 
									
										
										
										
											2014-12-15 21:28:25 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-19 11:34:25 +01:00
										 |  |  | # Extensions to compress in gzip during display build | 
					
						
							| 
									
										
										
										
											2014-12-15 21:28:25 +01:00
										 |  |  | compress_output_files = [] | 
					
						
							| 
									
										
										
										
											2014-12-17 19:00:42 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Path to locales files | 
					
						
							|  |  |  | locales_path = './locales' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Default locale (english) | 
					
						
							|  |  |  | locale = 'en_EN' |