Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
fb89b86dba
|
|||
| 0871a319f5 | |||
| 7d723eeb0d | |||
| 9e67d1bd6f |
Generated
+4
-4
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769338528,
|
"lastModified": 1780178524,
|
||||||
"narHash": "sha256-t18ZoSt9kaI1yde26ok5s7aFLkap1Q9+/2icVh2zuaE=",
|
"narHash": "sha256-2PcNyNqbGCWBpAMdCU1HxSQmhQiG6evdjxVnPA7w5bQ=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "7218348163fd8d84df4a6f682c634793e67a3fed",
|
"rev": "2406de41ce9d0a1404cbf4e55537e3f720f37f23",
|
||||||
"revCount": 13,
|
"revCount": 15,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/libdib.git"
|
"url": "https://git.pvv.ntnu.no/Projects/libdib.git"
|
||||||
},
|
},
|
||||||
|
|||||||
+3
-3
@@ -7,10 +7,10 @@ license = { file = "LICENSE" }
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alembic>=1.17",
|
"alembic>=1.16",
|
||||||
"beautifulsoup4>=4.14",
|
"beautifulsoup4>=4.14",
|
||||||
"click>=8.3",
|
"click>=8.2",
|
||||||
"flask-admin>=2.0",
|
"flask-admin>=1.6",
|
||||||
"flask-sqlalchemy>=3.1",
|
"flask-sqlalchemy>=3.1",
|
||||||
"flask>=3.0",
|
"flask>=3.0",
|
||||||
"isbnlib>=3.10",
|
"isbnlib>=3.10",
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ class WorblehatCli(NumberedCmd):
|
|||||||
)
|
)
|
||||||
bookcase_selector.cmdloop()
|
bookcase_selector.cmdloop()
|
||||||
bookcase = bookcase_selector.result
|
bookcase = bookcase_selector.result
|
||||||
|
if bookcase == None:
|
||||||
|
return
|
||||||
|
|
||||||
for shelf in bookcase.shelfs:
|
for shelf in bookcase.shelfs:
|
||||||
print(shelf.short_str())
|
print(shelf.short_str())
|
||||||
@@ -138,6 +140,8 @@ class WorblehatCli(NumberedCmd):
|
|||||||
)
|
)
|
||||||
bookcase_selector.cmdloop()
|
bookcase_selector.cmdloop()
|
||||||
bookcase = bookcase_selector.result
|
bookcase = bookcase_selector.result
|
||||||
|
if bookcase == None:
|
||||||
|
return
|
||||||
|
|
||||||
bookcase_item.shelf = select_bookcase_shelf(bookcase, self.sql_session)
|
bookcase_item.shelf = select_bookcase_shelf(bookcase, self.sql_session)
|
||||||
|
|
||||||
@@ -152,6 +156,8 @@ class WorblehatCli(NumberedCmd):
|
|||||||
|
|
||||||
media_type_selector.cmdloop()
|
media_type_selector.cmdloop()
|
||||||
bookcase_item.media_type = media_type_selector.result
|
bookcase_item.media_type = media_type_selector.result
|
||||||
|
if bookcase_item.media_type == None:
|
||||||
|
return
|
||||||
|
|
||||||
username = input("Who owns this book? [PVV]> ")
|
username = input("Who owns this book? [PVV]> ")
|
||||||
if username != "":
|
if username != "":
|
||||||
|
|||||||
@@ -384,6 +384,8 @@ class EditBookcaseCli(NumberedCmd):
|
|||||||
)
|
)
|
||||||
bookcase_selector.cmdloop()
|
bookcase_selector.cmdloop()
|
||||||
bookcase = bookcase_selector.result
|
bookcase = bookcase_selector.result
|
||||||
|
if bookcase == None:
|
||||||
|
return
|
||||||
assert isinstance(bookcase, Bookcase)
|
assert isinstance(bookcase, Bookcase)
|
||||||
|
|
||||||
shelf = select_bookcase_shelf(bookcase, self.sql_session)
|
shelf = select_bookcase_shelf(bookcase, self.sql_session)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Config:
|
|||||||
def read_password(password_field: str) -> str:
|
def read_password(password_field: str) -> str:
|
||||||
if Path(password_field).is_file():
|
if Path(password_field).is_file():
|
||||||
with Path(password_field).open() as f:
|
with Path(password_field).open() as f:
|
||||||
return f.read()
|
return f.read().strip()
|
||||||
else:
|
else:
|
||||||
return password_field
|
return password_field
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user