Add yaml serializer to Library, Title, Entry

This commit is contained in:
Leeingnyo 2021-09-09 20:45:47 +09:00
parent 0667f01471
commit 291a340cdd
3 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,8 @@
require "image_size"
class Entry
include YAML::Serializable
getter zip_path : String, book : Title, title : String,
size : String, pages : Int32, id : String, encoded_path : String,
encoded_title : String, mtime : Time, err_msg : String?

View File

@ -1,4 +1,6 @@
class Library
include YAML::Serializable
getter dir : String, title_ids : Array(String),
title_hash : Hash(String, Title)

View File

@ -2,6 +2,8 @@ require "digest"
require "../archive"
class Title
include YAML::Serializable
getter dir : String, parent_id : String, title_ids : Array(String),
entries : Array(Entry), title : String, id : String,
encoded_title : String, mtime : Time, signature : UInt64,