mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Fixed improper python shebang
This commit is contained in:
2
makeCollections
vendored
2
makeCollections
vendored
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
@@ -128,9 +128,9 @@ class Catalogue:
|
||||
except KeyError:
|
||||
cover_image = None
|
||||
title = book.title().decode("utf-8")
|
||||
author = book.author().decode(
|
||||
"utf-8"
|
||||
) # TODO some files are still passing encoded data for author.
|
||||
author = book.author().decode("utf-8")
|
||||
breakpoint()
|
||||
# TODO some files are still passing encoded data for author.
|
||||
return [title, author, cover_image, book.f.name]
|
||||
|
||||
def extract_content(self, book_zip, book):
|
||||
@@ -182,7 +182,8 @@ class Catalogue:
|
||||
Gets a list of new files via compare_shelf_current.
|
||||
Iterates over list and inserts new books into database.
|
||||
"""
|
||||
# TODO Refactor metadata extraction into process_book call to more easily handle additional formats
|
||||
# TODO Refactor metadata extraction into process_book \
|
||||
# call to more easily handle additional formats
|
||||
book_list = self.compare_shelf_current()
|
||||
db = Storage(self.config)
|
||||
for book in book_list:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
@@ -16,7 +16,7 @@ def MakeCollections(root):
|
||||
config = Config(root) # Get configuration settings
|
||||
# InitFiles(config.file_array) # Initialize file system
|
||||
_storage = Storage(config)
|
||||
_storage.make_collections()
|
||||
_storage.make_collections()
|
||||
_t2 = time.time()
|
||||
scan_time = round(_t2 - _t1)
|
||||
print("Collections Made.")
|
||||
|
||||
Reference in New Issue
Block a user