forked from madmatah/seo-ranking-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.sample
106 lines (91 loc) · 3.32 KB
/
config.py.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# Copyright 2010 Matthieu Huguet
#
# This file is part of SEO Ranking Engine.
#
# SEO Ranking Engine is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# SEO Ranking Engine 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with SEO Ranking Engine. If not, see
# <http://www.gnu.org/licenses/>.
import os
# Google AJAX API Key (Recommended)
# (Signup and get an API key at http://code.google.com/apis/ajaxsearch/signup.html )
google_ajax_api_key = ""
# Windows Azure Marketplace account key (Required)
# (Subscribe to Bing Search API - Web Results Only here :
# https://datamarket.azure.com/dataset/8818F55E-2FE5-4CE3-A617-0B8BA8419F65 )
azure_account_id = "4vbpXqSySjfYvoX663aqpQJEeg1kmNFYqWv3f9gqmZM="
# Authorize only administrators to signup
admin_only = True
# If True, each account need to be activated manually by am administrator
moderate_signups = False
# List of available search engines (see search_engine below for the identifiers)
available_search_engines = [1, 2, 5, 6]
# Quotas
# default = 5 keywords
max_keywords_per_user = 5
# default = 2 sites
max_sites_per_user = 2
# Number of days to keep ranking data (0 = indefinitely)
# default = 6 months
data_retention_days = 182
# Number of inactive days for an account to be deleted
# default = delete account after 1 month of inactivity
max_inactive_account_days = 31
###########################################################################################################
################ Don't edit the code below if you don't know exactly what you are doing ###################
###########################################################################################################
search_engines = {
1 : {
'label' : 'Google (AJAX Search API) - EN',
'type' : 'google-ajax-api',
'icon' : 'google',
'gl' : 'us'
},
2 : {
'label' : 'Google (AJAX Search API) - FR',
'type' : 'google-ajax-api',
'icon' : 'google',
'gl' : 'fr'
},
# Yahoo is deprecated, there is no API anymore since they joined bing
# (old yahoo ids in this list : 3 and 4)
5 : {
'label' : 'Bing (en_US)',
'type' : 'bing-api',
'icon' : 'bing',
'market' : 'en-US'
},
6 : {
'label' : 'Bing (fr_FR)',
'type' : 'bing-api',
'icon' : 'bing',
'market' : 'fr-FR'
}
}
TEMPLATES_DIR = os.path.join(os.path.dirname(__file__), 'templates')
# Disable search on :
# - Yahoo! if yahoo_boss_appid is not specified
# - Bing if bing_appid is not specified
try:
azure_account_id
except:
azure_account_id = None
se_filter = []
for i in available_search_engines:
se = search_engines[i]
if se['type'] == 'yahoo-boss' and not yahoo_boss_appid:
se_filter.append(i)
elif se['type'] == 'bing-api' and not azure_account_id:
se_filter.append(i)
for i in se_filter:
available_search_engines.remove(i)