diff --git a/init.sh b/init.sh index 2546f81..8ab13cd 100755 --- a/init.sh +++ b/init.sh @@ -7,8 +7,8 @@ mkdir -p data ls data | grep "$DATABASE" > /dev/null if [ $? -eq 0 ]; then - echo "Created data/books-backup.db" - mv "data/$DATABASE" data/books-backup.db + echo "Created data/books-backup.sqlite" + mv "data/$DATABASE" data/books-backup.sqlite fi sqlite3 "data/$DATABASE" < isbn_sort/schema.sql \ No newline at end of file diff --git a/isbn_sort/book.py b/isbn_sort/book.py index f4d7c2f..b273399 100644 --- a/isbn_sort/book.py +++ b/isbn_sort/book.py @@ -9,8 +9,9 @@ class Book: try: isbn = str(isbn).replace("-", "") int(isbn) - except ValueError: - raise ValueError("ISBN must be an int") + except ValueError: # this can be ISBN-10 + pass + # raise ValueError("ISBN must be an int") self.isbn = isbn self.title = None diff --git a/isbn_sort/templates/index.html b/isbn_sort/templates/index.html index 344cc28..4255d1f 100644 --- a/isbn_sort/templates/index.html +++ b/isbn_sort/templates/index.html @@ -62,8 +62,8 @@

{{ book.publisher }}

{{ book.count }}

- - + + {% endfor %}