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 pathlib
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
@@ -128,9 +128,9 @@ class Catalogue:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
cover_image = None
|
cover_image = None
|
||||||
title = book.title().decode("utf-8")
|
title = book.title().decode("utf-8")
|
||||||
author = book.author().decode(
|
author = book.author().decode("utf-8")
|
||||||
"utf-8"
|
breakpoint()
|
||||||
) # TODO some files are still passing encoded data for author.
|
# TODO some files are still passing encoded data for author.
|
||||||
return [title, author, cover_image, book.f.name]
|
return [title, author, cover_image, book.f.name]
|
||||||
|
|
||||||
def extract_content(self, book_zip, book):
|
def extract_content(self, book_zip, book):
|
||||||
@@ -182,7 +182,8 @@ class Catalogue:
|
|||||||
Gets a list of new files via compare_shelf_current.
|
Gets a list of new files via compare_shelf_current.
|
||||||
Iterates over list and inserts new books into database.
|
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()
|
book_list = self.compare_shelf_current()
|
||||||
db = Storage(self.config)
|
db = Storage(self.config)
|
||||||
for book in book_list:
|
for book in book_list:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
@@ -16,7 +16,7 @@ def MakeCollections(root):
|
|||||||
config = Config(root) # Get configuration settings
|
config = Config(root) # Get configuration settings
|
||||||
# InitFiles(config.file_array) # Initialize file system
|
# InitFiles(config.file_array) # Initialize file system
|
||||||
_storage = Storage(config)
|
_storage = Storage(config)
|
||||||
_storage.make_collections()
|
_storage.make_collections()
|
||||||
_t2 = time.time()
|
_t2 = time.time()
|
||||||
scan_time = round(_t2 - _t1)
|
scan_time = round(_t2 - _t1)
|
||||||
print("Collections Made.")
|
print("Collections Made.")
|
||||||
|
|||||||
Reference in New Issue
Block a user