Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unzipped entry #305

Merged
merged 24 commits into from
Jun 5, 2022
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ea6cbbd
Split Entry and ZippedEntry, Fix to work anyway
Leeingnyo May 14, 2022
10587f4
Implement is_supported_image_file
Leeingnyo May 15, 2022
55ccd92
Implement DirectoryEntry
Leeingnyo May 15, 2022
3b3a073
Scan DirectoryEntry when init and examine
Leeingnyo May 15, 2022
137e84d
Fix caching policy
Leeingnyo May 15, 2022
caf4cfb
Fix Entry.new in YAML::Serializable to support DirectyEntry
Leeingnyo May 15, 2022
9f6be70
Rename Entry.exists? to Entry.examine
Leeingnyo May 15, 2022
3a60286
Run 'crystal tool format'
Leeingnyo May 15, 2022
3da5d9b
Fix contents_signature
Leeingnyo May 15, 2022
0ed5655
Rollback crystal format
Leeingnyo May 15, 2022
f18f6a5
Fix linter issues
hkalexling May 19, 2022
1f5aed6
Rename Entries to ArchiveEntry and DirEntry
Leeingnyo May 20, 2022
238539c
Split files
Leeingnyo May 20, 2022
648cdd7
Add back `zip_path` for backward compatibility
hkalexling May 22, 2022
ae503ae
Remove unnecessary `createtime` method
hkalexling May 22, 2022
82c60cc
Replace puts with Logger.debug
hkalexling May 22, 2022
872e6dc
Better method naming in DirEntry
hkalexling May 22, 2022
e6dbeb6
Use `is_valid?`
hkalexling May 22, 2022
5b23a11
Remove unnecessary `path` method
hkalexling May 22, 2022
2fb6202
Choose correct subclass based on YAML node
hkalexling May 29, 2022
df61870
Fix linter
hkalexling May 29, 2022
39a331c
Avoid not_nil in date_added
hkalexling May 29, 2022
8e4bb99
Add zip_path to API document, add path property
Leeingnyo Jun 3, 2022
9ce8e91
Replace to is_valid?
Leeingnyo Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary createtime method
  • Loading branch information
hkalexling committed May 22, 2022
commit ae503ae099545c23ff636d971068f8aacee9e337
4 changes: 0 additions & 4 deletions src/library/archive_entry.cr
Original file line number Diff line number Diff line change
@@ -52,10 +52,6 @@ class ArchiveEntry < Entry
@zip_path
end

def createtime : Time
ctime @zip_path
end

private def sorted_archive_entries
ArchiveFile.open @zip_path do |file|
entries = file.entries
4 changes: 0 additions & 4 deletions src/library/dir_entry.cr
Original file line number Diff line number Diff line change
@@ -60,10 +60,6 @@ class DirEntry < Entry
@dir_path
end

def createtime : Time
ctime @dir_path
end

def read_page(page_num)
img = nil
begin
4 changes: 1 addition & 3 deletions src/library/entry.cr
Original file line number Diff line number Diff line change
@@ -211,7 +211,7 @@ abstract class Entry
TitleInfo.new @book.dir do |info|
info_da = info.date_added[@title]?
if info_da.nil?
date_added = info.date_added[@title] = createtime
date_added = info.date_added[@title] = ctime path
info.save
else
date_added = info_da
@@ -222,8 +222,6 @@ abstract class Entry

abstract def path : String

abstract def createtime : Time

abstract def read_page(page_num)

abstract def page_dimensions