-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to import external epub books (#155)
Commits: * Add ability to import external epub books * Handle some edge cases in epu parser and add initial import UI * Add complete UI for epub import & some other improvements * Export strings and cleanup * Some more cleanup and improvements * Add Some missing copyright headers --------- Signed-off-by: starry-shivam <[email protected]>
- Loading branch information
1 parent
29661b9
commit f84c962
Showing
60 changed files
with
11,049 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
app/schemas/com.starry.myne.database.MyneDatabase/3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 3, | ||
"identityHash": "c623113d83374eb42b85d35d0ce0118e", | ||
"entities": [ | ||
{ | ||
"tableName": "book_library", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `authors` TEXT NOT NULL, `file_path` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `is_external_book` INTEGER NOT NULL DEFAULT false, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "bookId", | ||
"columnName": "book_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "title", | ||
"columnName": "title", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "authors", | ||
"columnName": "authors", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "filePath", | ||
"columnName": "file_path", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "createdAt", | ||
"columnName": "created_at", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "isExternalBook", | ||
"columnName": "is_external_book", | ||
"affinity": "INTEGER", | ||
"notNull": true, | ||
"defaultValue": "false" | ||
}, | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
}, | ||
{ | ||
"tableName": "reader_table", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `last_chapter_index` INTEGER NOT NULL, `last_chapter_offset` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "bookId", | ||
"columnName": "book_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "lastChapterIndex", | ||
"columnName": "last_chapter_index", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "lastChapterOffset", | ||
"columnName": "last_chapter_offset", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c623113d83374eb42b85d35d0ce0118e')" | ||
] | ||
} | ||
} |
109 changes: 109 additions & 0 deletions
109
app/schemas/com.starry.myne.database.MyneDatabase/4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 4, | ||
"identityHash": "73dddecebf5b45bc31c3d462376c1251", | ||
"entities": [ | ||
{ | ||
"tableName": "book_library", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `authors` TEXT NOT NULL, `file_path` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `is_external_book` INTEGER NOT NULL DEFAULT false, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "bookId", | ||
"columnName": "book_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "title", | ||
"columnName": "title", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "authors", | ||
"columnName": "authors", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "filePath", | ||
"columnName": "file_path", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "createdAt", | ||
"columnName": "created_at", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "isExternalBook", | ||
"columnName": "is_external_book", | ||
"affinity": "INTEGER", | ||
"notNull": true, | ||
"defaultValue": "false" | ||
}, | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
}, | ||
{ | ||
"tableName": "reader_table", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`library_item_id` INTEGER NOT NULL, `last_chapter_index` INTEGER NOT NULL, `last_chapter_offset` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "libraryItemId", | ||
"columnName": "library_item_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "lastChapterIndex", | ||
"columnName": "last_chapter_index", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "lastChapterOffset", | ||
"columnName": "last_chapter_offset", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '73dddecebf5b45bc31c3d462376c1251')" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.