basic OPDS (and HTML) catalog provider for eBooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
6.5KB

  1. <?php
  2. #############################################################################
  3. # miniCalOPe (c) 2010-2019 by Itzchak Rehberg #
  4. # written by Itzchak Rehberg <izzysoft AT qumran DOT org> #
  5. # https://www.izzysoft.de/ #
  6. # ------------------------------------------------------------------------- #
  7. # This program is free software; you can redistribute and/or modify it #
  8. # under the terms of the GNU General Public License (see doc/LICENSE) #
  9. # ------------------------------------------------------------------------- #
  10. # Simple configuration (no language-specific stuff) #
  11. #############################################################################
  12. #================================[ Directories ]===
  13. // database file
  14. $dbfile = dirname(__FILE__).'/metadata.db';
  15. // Where your books are stored.
  16. $bookroot = 'books';
  17. // Which book formats you want to use (file extensions). supported are epub and mobi
  18. $bookformats = ['epub','mobi'];
  19. // file extension for book descriptions
  20. $bookdesc_ext = ['desc'];
  21. // file extension for Metadata
  22. $bookmeta_ext = 'data';
  23. #================================[ Logging ]===
  24. // Logfile to use. Empty means no logging to file.
  25. $logfile = './minicalope.log';
  26. // Seperate log file to log downloads to (in addition to the normal log).
  27. // Empty string to disable for now.
  28. $dllogfile = './minical_dl.log';
  29. // Available log levels: NOLOG, EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG
  30. // Yes - case IS important. Specified level includes all before-mentioned
  31. // File log level
  32. $fileloglevel = INFO;
  33. // Screen output when running in web mode
  34. $screenloglevel = NOLOG;
  35. // Screen output when running from command line
  36. $screenloglevel_cli = INFO;
  37. // Report New/Moved/Deleted on Scan
  38. $scan_report_changes = FALSE;
  39. #============================[ Book Covers ]===
  40. // Where to get the covers: calibre, simple, or off (none)
  41. $cover_mode = 'off';
  42. // maximum width (in px) to display them
  43. $cover_width = '200';
  44. // where to place the cover img links
  45. $cover_base = 'covers';
  46. // generate fake-covers when no real img available (HTML only)?
  47. $cover_fake_fallback = TRUE;
  48. #==========================[ Scan Specials ]===
  49. // Protect scan scripts against being run by web visitors
  50. $scan_cli_only = TRUE;
  51. // when found in .data files, what shall override definitions collected from the
  52. // directory structure? If not named here, it will be "merged". Currently
  53. // supported: author
  54. $data_overrides = ['author'];
  55. // As it's advisable to use 7-bit ASCII only for directory and file names,
  56. // one might wish to get the "correct spelling" into the Metadata by other means.
  57. // You can place ".name" files to have the directory name "replaced". Keep in
  58. // mind, however, that non-ASCII characters might cause issues with sorting.
  59. // Also remember to keep the .name and the "tag::"/"author::" in sync with .data files :)
  60. $dotname_overrides = ['author','genre'];
  61. // Whether to interprete content of .desc files as Markdown (1) or not (0).
  62. // This is the global switch. If enabled (1), you can override it per-genre
  63. // and/or per author by placing a file named .nomarkdown in their directory.
  64. $use_markdown = 0;
  65. #-------------------------------[ Checking ]---
  66. // check for possible XML errors in description files and log them?
  67. $check_xml = TRUE;
  68. // as XML errors break OPDS, better skip the broken content.
  69. // Needs above check to be enabled in order to work.
  70. $skip_broken_xml = TRUE;
  71. // how to insert books into the database:
  72. // 'rebuild': drop all data and do a fresh insert (books are likely to get new IDs this way)
  73. // 'merge' : try to figure out what has changed (recommended; keeps the book IDs, but is slower)
  74. $scan_dbmode = 'merge';
  75. #------------------------[ data extraction ]---
  76. // we can extract some details from EPUB files. Define here whether we shall do
  77. // so, and what to extract.
  78. // Main switch to toggle it on/off:
  79. $autoExtract = TRUE;
  80. // Shall we extract covers? 0=no, 1=extract, 2=extract&resize
  81. // Covers will only be extracted if there is no cover image already.
  82. $extractCover = 1;
  83. // Which details to extract to .data files if autoExtract is enabled.
  84. // Valid values are either 'all' (to extract everything), or one or a
  85. // combination of author,isbn,publisher,rating,series,series_index,tag,title,uri
  86. // note that while 'isbn' and 'uri' are safe to use, there might be
  87. // issues with the others. For details, see issue #4 at Github:
  88. // https://github.com/IzzySoft/miniCalOPe/issues/4
  89. // Empty array switches off .data extraction completely (default)
  90. $extract2data = [];
  91. // What to extract to .desc files if autoExtract is enabled.
  92. // Valid values are either 'all' (to extract everything), or one or a
  93. // combination of 'desc' (book description only), 'head' (the heading
  94. // part with Metadata), 'toc' (table of contents). Future versions might diverse
  95. // further). For some background, make sure to read issue #4 at Github:
  96. // https://github.com/IzzySoft/miniCalOPe/issues/4
  97. // Empty array switches off .data extraction completely (default)
  98. $extract2desc = [];
  99. #============================[ Web Service ]===
  100. // Timezone
  101. $timezone = '+01:00';
  102. // Site Title
  103. $sitetitle = 'Book Server';
  104. // Full URL to miniCalOPe
  105. $baseurl = 'https://'.$_SERVER['SERVER_NAME'].'/opds/';
  106. // Path relative to the web servers DOCUMENT_ROOT
  107. $relurl = '/opds/';
  108. // how many items per page
  109. $perpage = 25;
  110. // Full URL to the Wikipedia to use for author info
  111. $wikibase= 'https://de.wikipedia.org/wiki/';
  112. // Enable some ISBN searches (empty array to disable this feature)
  113. $isbnservices = ['Amazon.DE','Bookzilla.DE','Buchhandel.DE','Google.DE','Buchfreund.DE','ZVAB.COM'];
  114. // Enable some book search services (search by author and title of the selected book;
  115. // empty array to disable this feature)
  116. $booksearchservices = ['Amazon.DE','Bookzilla.DE','Google.DE','Buchfreund.DE','ZVAB.COM'];
  117. #=========================[ Monetarization ]===
  118. // While our content is served for free, we won't object to any donations :)
  119. // -=[ Donations ]-
  120. // Specifying your Donation page here will enable the corresponding button.
  121. // Just copy the example file provided in 'doc/donationinfo.csv' and adjust it
  122. // to your liking (you can add more entries), then specify the file here:
  123. $donationInfo = 'doc/donationinfo.csv';
  124. #============================[ Person Info ]===
  125. // about you: Name, Homepage, Email, Amazon PartnerID (leave empty if you have none)
  126. $owner = 'John Doe';
  127. $homepage= 'https://www.johndoe.com/';
  128. $email = 'john@johndoe.com';
  129. $amazonID= '';
  130. #===========================[ stuff ]===
  131. $uselangs = []; // empty = all
  132. ?>