-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathsettings.base.py
329 lines (239 loc) · 7.38 KB
/
settings.base.py
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
End-User setup (README):
replace all instances of "SOMETHING" with your own directory paths.
Add your username + password for each site.
Yes, this is all stored in plaintext. It's not high security.
You are not using the same password everywhere anyways, .... right?
Delete all lines above and including this one before trying to run anything, please.
# Your postgres SQL database credentials for the primary database.
# the DATABASE_USER must have write access to the database DATABASE_DB_NAME
DATABASE_USER = "MangaCMSUser"
DATABASE_PASS = "password"
DATABASE_DB_NAME = "MangaCMS"
DATABASE_IP = "127.0.0.1"
# Note that a local socket will be tried before the DATABASE_IP value, so if DATABASE_IP is
# invalid, it may work anyways.
# If you have a statsd instance, put it's IP here. Otherwise, it can be set to None to disable
GRAPHITE_DB_IP = "127.0.0.1"
# Note: Paths have to be absolute.
pickedDir = r"/SOMETHING/MP"
baseDir = r"/SOMETHING/Manga/"
unlinkedDir = r"/SOMETHING/MangaUnlinked/"
# The directory "Context" of all the hentai items.
# This determines the path mask that will be used when deduplicating
# hentai items.
# If you aren't running the deduper, just specify something basic, like "/"
mangaCmsHContext = r"/SOMETHING/H/"
fufuDir = r"/SOMETHING/H/Fufufuu"
djMoeDir = r"/SOMETHING/H/DjMoe"
puRinDir = r"/SOMETHING/H/Pururin"
ExhenMadokamiDir = r"/SOMETHING/H/ExhenMadokami"
fkDir = r"/SOMETHING/H/Fakku"
hbDir = r"/SOMETHING/H/H-Browse"
nhDir = r"/SOMETHING/H/N-Hentai"
spDir = r"/SOMETHING/H/ExHentai"
tadanohitoDir = r"/SOMETHING/H/Tadanohito"
globalDedupContext = [pickedDir, baseDir, unlinkedDir, mangaCmsHContext]
# Paths for database and web content
webCtntPath = '/SOMETHING/MangaCMS/ctnt/oldCtnt'
webMvcPath = '/SOMETHING/MangaCMS/ctnt/mvcCtnt'
staticCtntPath = '/SOMETHING/MangaCMS/ctnt/staticContent'
bookCachePath = '/SOMETHING/MangaCMS/BookCache'
# This is the path to the deduplication tool database API python file.
# and the file hashing python file.
# You only need to set this if you want to use the on-the-fly duplicate
# removal, which is complex and not fully finished at this time.
# You must have https://github.com/fake-name/IntraArchiveDeduplicator somewhere,
# and have allowed it to build a database of the extant local files for it to
# be of any use.
# TODO: Allow remote deduper addresses (right now, localhost is assumed).
# Folders to scan for folders to use as download paths.
# Directories are scanned by sorted keys
# the key 0 is special, and should not be used.
mangaFolders = {
1 : {
"dir" : pickedDir,
"interval" : 5,
"lastScan" : 0
},
10 : {
"dir" : baseDir,
"interval" : 5,
"lastScan" : 0
},
# Keys above 100 are not included in normal directory search behaviour when
# deciding where to place downloaded files (e.g. downloads will never be placed
# in a directory with a key >= 100)
#100 : {
# "dir" : baseDir,
# "interval" : 45,
# "lastScan" : 0
# }
}
ratingsSort = {
"thresh" : 2, # At or greater then what rating is the automover is triggered.
"tokey" : 1,
"fromkey" : [10],
}
# How long should entries in the logging table be kept for?
# Units are in seconds
maxLogAge = 60*60*24*3 # Keep logs for 3 days
# Check that the ratingsSort values are valid by verifying they
# map to key present in the mangaVolders dict.
for key in ratingsSort['fromkey']:
if key not in mangaFolders:
raise ValueError("All fromKey values in ratingsSort must be present in the mangaFolders dict.")
if not ratingsSort['tokey'] in mangaFolders:
raise ValueError("ratingsSort tokey must be present in the mangaFolders dict.")
captcha_solvers = {
"2captcha" : {
'api_key' : "<KEY GOES HERE>"
}
}
tagHighlight = [
"tags",
"to",
"highlight",
"in",
"the",
"hentai"
"table"
]
# Items with one of the tags in this list will be NOT downloaded.
skipTags = [
'tags to not download'
]
tagNegativeHighlight = [
]
noHighlightAddresses = [
# "IP Addresses which won't get the tag highlighting behaviour"
]
# ExHentai
sadPanda = {
"login" : "username",
"passWd" : "pass",
"dlDir" : spDir,
# Sadpanda searches to scrape, and tags which will not be downloaded
"sadPandaSearches" :
[
'stuff'
],
"sadPandaExcludeTags" :
[
'other stuff'
],
# Exclude compound tags are slightly complex. Basically, if the first item is present,
# and the second is *NOT*, the item will be filtered. In the below case, if something is tagged
# "translated", and is not also tagged "english", it will be filtered (and not downloaded)
"excludeCompoundTags" :
[
['translated', 'english']
],
# Categories to exclude
"sadPandaExcludeCategories" :
[
"gamecg",
'misc'
]
}
# Extract contents of searches, and add them to the tag-highlight list.
for tag in sadPanda['sadPandaSearches']:
tag = tag.split(":")[-1]
tag = tag.replace(" ", "-")
if tag not in tagHighlight:
tagHighlight.append(tag)
# General Conf
noHighlightAddresses = [
"10.1.1.47"
]
pronWhiteList = '10.1.1.0/24'
# Directory of files/images that will be removed from any and all downloads.
badImageDir = r"/somepath/dir"
# When files are "deleted" through the web UI, they're moved here.
recycleBin = r'/media/Storage/MangaRecycleBin'
batotoSettings = {
"login" : "username",
"passWd" : "password",
}
suraSettings = {
"login" : "username",
"passWd" : "password",
}
# Manga.Madokami
mkSettings = {
"login" : "username",
"passWd" : "password",
"dirs" : {
"dlDir" : pickedDir,
"mDlDir" : baseDir
},
# And settings for the automated upload system
# "ftpAddr" : "ftp.madokami.com",
# "mainContainerDir" : "/Manga",
# "uploadContainerDir" : "/Manga/_Autouploads",
# "uploadDir" : "Name this directory"
}
tadanohito = {
"login" : "username",
"passWd" : "password",
'dlDir' : tadanohitoDir,
}
mbSettings = {
"dirs" : {
"dlDir" : pickedDir,
"mDlDir" : baseDir
}
}
jzSettings = {
"dirs" : {
"dlDir" : pickedDir,
"mDlDir" : baseDir
}
}
czSettings = {
"dlDir" : pickedDir,
"mDlDir" : baseDir,
"dirs" : {
"dlDir" : pickedDir,
"mDlDir" : baseDir
}
}
# Manga Updates
buSettings = {
"login" : "username",
"passWd" : "password",
}
djSettings = {
"dlDir" : djMoeDir,
"retag" : 60*60*24*31, # 1 month
"retagMissing" : 60*60*24*1 # 7 Days (This is for items that have *no* tags)
}
puSettings = {
"dlDir" : puRinDir,
"retag" : 60*60*24*31, # 1 month
"retagMissing" : 60*60*24*7, # 7 Days (This is for items that have *no* tags)
"accountKey" : "YOUR ACOCUNT KEY GOES HERE!"
}
emSettings = {
"dlDir" : ExhenMadokamiDir
}
fkSettings = {
"dlDir" : fkDir
}
hbSettings = {
"dlDir" : hbDir
}
nhSettings = {
"dlDir" : nhDir
}
# Hat-tip to Penny arcade re:bot naming
ircBot = {
"name" : "YOUR-BOT-NAME",
"rName" : "YOUR BOT REAL NAME",
"unknown-series" : "WHERE TO PUT ITEMS FOR WHICH THE SERIES CANNOT BE INFERRED FROM THE TITLE",
"pubmsg_prefix" : "PREFIX TO MESSAGES TO THE BOT THAT CAUSES THE BOT TO SAY THEM ",
"dlDir" : pickedDir
}
# Channels to ignore when looking for triggers in channel MOTDs.
ircMotdScraperMaskChannels = [
'#bodzio'
]