Skip to content

Commit

Permalink
Add isbn, issn, and note fields (#26)
Browse files Browse the repository at this point in the history
* add isbn and issn fields to In

* remove commented code

---------

Co-authored-by: Christoph Becker <[email protected]>
  • Loading branch information
Christovis and Christoph Becker authored Nov 1, 2024
1 parent ffe46fe commit 38affbd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/constant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const entries = [
:eprint,
:howpublished,
:institution,
:isbn,
:issn,
:journal,
:key,
:month,
Expand Down Expand Up @@ -82,6 +84,8 @@ const fields = [
:eprint,
:howpublished,
:institution,
:isbn,
:issn,
:journal,
:key,
:month,
Expand Down
13 changes: 12 additions & 1 deletion src/entry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ end
chapter::String
edition::String
institution::String
isbn::String
issn:String
journal::String
number::String
organization::String
Expand All @@ -214,6 +216,8 @@ struct In
chapter::String
edition::String
institution::String
isbn::String
issn::String
journal::String
number::String
organization::String
Expand All @@ -233,6 +237,8 @@ function In(fields)
chapter = get_delete!(fields, "chapter")
edition = get_delete!(fields, "edition")
institution = get_delete!(fields, "institution")
isbn = get_delete!(fields, "isbn")
issn = get_delete!(fields, "issn")
journal = get_delete!(fields, "journal")
number = get_delete!(fields, "number")
organization = get_delete!(fields, "organization")
Expand All @@ -246,6 +252,8 @@ function In(fields)
chapter,
edition,
institution,
isbn,
issn,
journal,
number,
organization,
Expand All @@ -268,6 +276,7 @@ end
id::String
in::In
fields::Dict{String,String}
note::String
title::String
type::String
end
Expand All @@ -283,6 +292,7 @@ struct Entry <: AbstractEntry
id::String
in::In
fields::Dict{String,String}
note::String
title::String
type::String
end
Expand All @@ -300,10 +310,11 @@ function Entry(id, fields)
editors = names(get_delete!(fields, "editor"))
eprint = Eprint(fields)
in_ = In(fields)
note = get_delete!(fields, "note")
title = get_delete!(fields, "title")
type = get_delete!(fields, "_type")
return Entry(
access, authors, booktitle, date, editors, eprint, id, in_, fields, title, type
access, authors, booktitle, date, editors, eprint, id, in_, fields, note, title, type
)
end

Expand Down

0 comments on commit 38affbd

Please sign in to comment.