aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Winston2024-05-11 15:08:00 -0400
committerBen Winston2024-05-11 15:08:00 -0400
commitfa82dab8db28b3d479698a49bea037f3bf31f82b (patch)
tree85a7a0a4cedf218a94928a74b1882bd30ebf4d71
parentaee9bc91b51c34a96acbcd1d36c1374bf3ec8312 (diff)
add isbn and translator
-rw-r--r--booki.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/booki.c b/booki.c
index 7613495..96e9392 100644
--- a/booki.c
+++ b/booki.c
@@ -116,6 +116,14 @@ struct Book parse_book(char* current_pos) {
struct es language = parse_string(current_pos, &new_pos);
book.language = language;
current_pos = new_pos;
+ } else if (strncmp(attr, "isbn", 4) == 0) {
+ struct es isbn = parse_string(current_pos, &new_pos);
+ book.isbn = isbn;
+ current_pos = new_pos;
+ } else if (strncmp(attr, "translator", 10) == 0) {
+ struct es translator = parse_string(current_pos, &new_pos);
+ book.translator = translator;
+ current_pos = new_pos;
}
// go to (and then past) the newline