Updated readme for setup calibre binaries
Added h tags to recognized tags for sanitizing comments Avoid depreciation warning in lubimyczytac Removed some unsed imports
This commit is contained in:
		
							parent
							
								
									53a16c5a6f
								
							
						
					
					
						commit
						bc1c097271
					
				|  | @ -107,8 +107,8 @@ Pre-built Docker images are available in the following Docker Hub repositories ( | ||||||
| 
 | 
 | ||||||
|   Both the Calibre-Web and Calibre-Mod images are automatically rebuilt on new releases and updates. |   Both the Calibre-Web and Calibre-Mod images are automatically rebuilt on new releases and updates. | ||||||
| 
 | 
 | ||||||
|   - Set "path to convertertool" to `/usr/bin/ebook-convert` |   - Set "Path to Calibre Binaries" to `/usr/bin` | ||||||
|   - Set "path to unrar" to `/usr/bin/unrar` |   - Set "Path to Unrar" to `/usr/bin/unrar` | ||||||
| 
 | 
 | ||||||
| ## Contributor Recognition | ## Contributor Recognition | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ def clean_string(unsafe_text, book_id=0): | ||||||
|     try: |     try: | ||||||
|         if bleach: |         if bleach: | ||||||
|             allowed_tags = list(ALLOWED_TAGS) |             allowed_tags = list(ALLOWED_TAGS) | ||||||
|             allowed_tags.extend(['p', 'span', 'div', 'pre']) |             allowed_tags.extend(["p", "span", "div", "pre", "h1", "h2", "h3", "h4", "h5", "h6"]) | ||||||
|             safe_text = clean_html(unsafe_text, tags=set(allowed_tags)) |             safe_text = clean_html(unsafe_text, tags=set(allowed_tags)) | ||||||
|         else: |         else: | ||||||
|             safe_text = clean_html(unsafe_text) |             safe_text = clean_html(unsafe_text) | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ | ||||||
| import os | import os | ||||||
| from datetime import datetime | from datetime import datetime | ||||||
| import json | import json | ||||||
| from shutil import copyfile, move | from shutil import copyfile | ||||||
| from uuid import uuid4 | from uuid import uuid4 | ||||||
| from markupsafe import escape, Markup  # dependency of flask | from markupsafe import escape, Markup  # dependency of flask | ||||||
| from functools import wraps | from functools import wraps | ||||||
|  |  | ||||||
|  | @ -21,7 +21,6 @@ import os | ||||||
| import shutil | import shutil | ||||||
| import zipfile | import zipfile | ||||||
| import mimetypes | import mimetypes | ||||||
| import copy |  | ||||||
| from io import BytesIO | from io import BytesIO | ||||||
| try: | try: | ||||||
|     import magic |     import magic | ||||||
|  |  | ||||||
|  | @ -137,7 +137,7 @@ class LubimyCzytac(Metadata): | ||||||
| 
 | 
 | ||||||
|     def _prepare_query(self, title: str) -> str: |     def _prepare_query(self, title: str) -> str: | ||||||
|         query = "" |         query = "" | ||||||
|         characters_to_remove = "\?()\/" |         characters_to_remove = r"\?()\/" | ||||||
|         pattern = "[" + characters_to_remove + "]" |         pattern = "[" + characters_to_remove + "]" | ||||||
|         title = re.sub(pattern, "", title) |         title = re.sub(pattern, "", title) | ||||||
|         title = title.replace("_", " ") |         title = title.replace("_", " ") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user