forked from seblucas/cops
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config_default.php
345 lines (303 loc) · 11.6 KB
/
config_default.php
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<?php
/**
* COPS (Calibre OPDS PHP Server) class file
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Sébastien Lucas <[email protected]>
*/
if (!isset($config)) {
$config = array();
}
/*
* The directory containing calibre's metadata.db file, with sub-directories
* containing all the formats.
* BEWARE : it has to end with a /
* You can enable multiple database with this notation instead of a simple string :
* $config['calibre_directory'] = array ("My database name" => "/home/directory/calibre1/", "My other database name" => "/home/directory/calibre2/");
*/
$config['calibre_directory'] = './';
/*
* SPECIFIC TO NGINX
* The internal directory set in nginx config file
* Leave empty if you don't know what you're doing
*/
$config['calibre_internal_directory'] = '';
/*
* Full URL prefix (with trailing /)
* useful especially for Opensearch where a full URL is often required
* For example Mantano, Aldiko and Marvin require it.
*/
$config['cops_full_url'] = '';
/*
* Number of recent books to show
*/
$config['cops_recentbooks_limit'] = '50';
/*
* Catalog's author name
*/
$config['cops_author_name'] = 'Sébastien Lucas';
/*
* Catalog's author uri
*/
$config['cops_author_uri'] = 'http://blog.slucas.fr';
/*
* Catalog's author email
*/
$config['cops_author_email'] = '[email protected]';
/*
* Catalog's title
*/
$config['cops_title_default'] = 'COPS';
/*
* Catalog's subtitle
*/
$config['cops_subtitle_default'] = '';
/*
* Wich header to use when downloading books outside the web directory
* Possible values are :
* X-Accel-Redirect : For Nginx
* X-Sendfile : For Lightttpd or Apache (with mod_xsendfile)
* No value (default) : Let PHP handle the download
*/
$config['cops_x_accel_redirect'] = '';
/*
* Height of thumbnail image for OPDS
*/
$config['cops_opds_thumbnail_height'] = '164';
/*
* Height of thumbnail image for HTML
*/
$config['cops_html_thumbnail_height'] = '225';
/*
* Icon for both OPDS and HTML catalog
* Note that this has to be a real icon (.ico)
*/
$config['cops_icon'] = 'favicon.ico';
/*
* Show icon for authors, series, tags and books on OPDS feed
* 1 : enable
* 0 : disable
*/
$config['cops_show_icons'] = '1';
/*
* Default timezone
* Check following link for other timezones :
* http://www.php.net/manual/en/timezones.php
*/
$config['default_timezone'] = 'Europe/Paris';
/*
* Prefered format for HTML catalog
* The two first will be displayed in book entries
* The other only appear in book detail
*/
$config['cops_prefered_format'] = array('EPUB', 'PDF', 'AZW3', 'AZW', 'MOBI', 'CBR', 'CBZ');
/*
* Specify the ignored formats that will never display in COPS
*/
$config['cops_ignored_formats'] = array();
/*
* use URL rewriting for downloading of ebook in HTML catalog
* See Github wiki for more information
* 1 : enable
* 0 : disable
*/
$config['cops_use_url_rewriting'] = '0';
/*
* generate a invalid OPDS stream to allow bad OPDS client to use search
* Example of non compliant OPDS client : Moon+ Reader
* Example of good OPDS client : Mantano, FBReader
* 1 : enable support for non compliant OPDS client
* 0 : always generate valid OPDS code
*/
$config['cops_generate_invalid_opds_stream'] = '0';
/*
* Max number of items per page
* -1 unlimited
*/
$config['cops_max_item_per_page'] = '48';
/*
* split authors by first letter
* 1 : Yes
* 0 : No
*/
$config['cops_author_split_first_letter'] = '1';
/*
* split titles by first letter
* 1 : Yes
* 0 : No
*/
$config['cops_titles_split_first_letter'] = '1';
/*
* Enable the Lightboxes (for popups)
* 1 : Yes (enable)
* 0 : No
*/
$config['cops_use_fancyapps'] = '1';
/*
* Update Epub metadata before download
* 1 : Yes (enable)
* 0 : No
*/
$config['cops_update_epub-metadata'] = '0';
/*
* Filter on tags to book list
* Only works with the OPDS catalog
* Usage : array ("I only want to see books using the tag : Tag1" => "Tag1",
* "I only want to see books not using the tag : Tag1" => "!Tag1",
* "I want to see every books" => "",
*
* Example : array ("All" => "", "Unread" => "!Read", "Read" => "Read")
*/
$config['cops_books_filter'] = array();
/*
* Custom Columns for the index page
* to add as an array containing the lookup names configured in Calibre
*
* For example : array ("genre", "mycolumn");
*
* Note that the composite custom columns are not supported
*/
$config['cops_calibre_custom_column'] = array();
/*
* Custom Columns for the list representation
* to add as an array containing the lookup names configured in Calibre
*
* For example : array ("genre", "mycolumn");
*
* Note that the composite custom columns are not supported
*/
$config['cops_calibre_custom_column_list'] = array ();
/*
* Custom Columns for the book preview panel
* to add as an array containing the lookup names configured in Calibre
*
* For example : array ("genre", "mycolumn");
*
* Note that the composite custom columns are not supported
*/
$config['cops_calibre_custom_column_preview'] = array ();
/*
* Rename .epub to .kepub.epub if downloaded from a Kobo eReader
* The ebook will then be recognized a Kepub so with chaptered paging, statistics, ...
* You have to enable URL rewriting if you want to enable kepup.epub download
* 1 : Yes (enable)
* 0 : No
*/
$config['cops_provide_kepub'] = '0';
/*
* Enable and configure Send To Kindle (or Email) feature.
*
* Don't forget to authorize the sender email you configured in your Kindle's Approved Personal Document E-mail List.
*
* If you want to use a simple smtp server (provided by your ISP for example), you can configure it like that :
* $config['cops_mail_configuration'] = array( "smtp.host" => "smtp.free.fr",
* "smtp.username" => "",
* "smtp.password" => "",
* "smtp.secure" => "",
* "smtp.port" => "", // Not mandatory, if smtp.secure is set then defaults to 465
* "address.from" => "[email protected]",
* "subject" => "Sent by COPS : " // Not mandatory
* );
*
* For Gmail (ssl is mandatory) :
* $config['cops_mail_configuration'] = array( "smtp.host" => "smtp.gmail.com",
* "smtp.username" => "YOUR GMAIL ADRESS",
* "smtp.password" => "YOUR GMAIL PASSWORD",
* "smtp.secure" => "ssl",
* "address.from" => "[email protected]"
* );
*
* For GMX (tls and 587 is mandatory) :
* $config['cops_mail_configuration'] = array( "smtp.host" => "mail.gmx.com",
* "smtp.username" => "YOUR GMX ADRESS",
* "smtp.password" => "YOUR GMX PASSWORD",
* "smtp.secure" => "tls",
* "smtp.port" => "587",
* "address.from" => "[email protected]"
* );
*/
$config['cops_mail_configuration'] = NULL;
/*
* Use filter in HTML catalog
* 1 : Yes (enable)
* 0 : No
*/
$config['cops_html_tag_filter'] = '0';
/*
* Thumbnails are generated on-the-fly so it can be problematic on servers with slow CPU (Raspberry Pi, Dockstar, Piratebox, ...).
* This configuration item allow to customize how thumbnail will be generated
* "" : Generate thumbnail (CPU hungry)
* "1" : always send the full size image (Network hungry)
* any url : Send a constant image as the thumbnail (you can try "images/bookcover.png")
*/
$config['cops_thumbnail_handling'] = '';
/*
* Directory to keep resized thumbnails: allow to resize thumbnails only on first access, then use this cache.
* $config['cops_thumbnail_handling'] must be ""
* "" : don't cache thumbnail
* "/tmp/cache/" (example) : will generate thumbnails in /tmp/cache/
* BEWARE : it has to end with a /
*/
$config['cops_thumbnail_cache_directory'] = '';
/*
* Contains a list of user agent for browsers not compatible with client side rendering
* For now : Kindle, Sony PRS-T1, Sony PRS-T2, All Cybook devices (maybe a little extreme).
* This item is used as regular expression so "." will force server side rendering for all devices
*/
$config['cops_server_side_render'] = 'Kindle\/1\.0|Kindle\/2\.0|Kindle\/3\.0|EBRD1101|EBRD1201|cybook';
/*
* Specify the ignored categories for the home screen and with search
* Meaning that if you don't want to search in publishers or tags just add them from the list
* Only accepted values :
* - author
* - book
* - series
* - tag
* - publisher
* - rating
* - language
*/
$config ['cops_ignored_categories'] = array();
/*
* If you use a Sony eReader or Aldiko you can't download ebooks if your catalog
* is password protected. A simple workaround is to leave fetch.php not protected (see .htaccess).
* But In that case your COPS installation is not completely safe.
* Setting this parameter to "1" ensure that nobody can access fetch.php before accessing
* index.php or feed.php first.
* BEWARE : Do not touch this if you're not using password, not using PRS-TX or not using Aldiko.
*/
$config ['cops_fetch_protect'] = '0';
/*
* WARNING NOT READY FOR PRODUCTION USE
* Make the search better (don't care about diacritics, uppercase should work on Cyrillic) but slower.
* 1 : Yes (enable)
* 0 : No
*/
$config ['cops_normalized_search'] = '0';
/*
* Enable PHP password protection (You can use if htpasswd is not possible for you)
* If possible prefer htpasswd !
* array( "username" => "xxx", "password" => "secret") : Enable PHP password protection
* NULL : Disable PHP password protection (You can still use htpasswd)
*/
$config['cops_basic_authentication'] = NULL;
/*
* Which template is used by default :
* 'default'
* 'bootstrap'
*/
$config['cops_template'] = 'bootstrap2';
/*
* Which style is used by default :
* 'base'
* 'default'
* 'eink' (only available for the 'default' template)
* 'iphone' (only available for the 'default' template)
* 'iphone7' (only available for the 'default' template)
*/
$config['cops_style'] = 'default';
/*
* Set language code to force a language (see lang/ directory for available languages).
* When empty it will auto detect the language.
*/
$config['cops_language'] = '';