Skip to content

Commit

Permalink
Merge branch 'master' into lts
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzaare authored Nov 1, 2024
2 parents 49af848 + 38affbd commit 1154ef0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
35 changes: 33 additions & 2 deletions src/constant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,37 @@ const entries = [
]

"""
const fields
const fields = [
:address,
:annote,
:archivePrefix,
:author,
:booktitle,
:chapter,
:crossref,
:edition,
:editor,
:eprint,
:howpublished,
:institution,
:isbn,
:issn,
:journal,
:key,
:month,
:note,
:number,
:organization,
:pages,
:primaryClass,
:publisher,
:school,
:series,
:title,
:type,
:volume,
:year
]
List of possible fields (currently based on bibtex). Keep it sorted for readability
"""
const fields = [
Expand All @@ -42,6 +71,8 @@ const fields = [
:eprint,
:howpublished,
:institution,
:isbn,
:issn,
:journal,
:key,
:month,
Expand Down
15 changes: 13 additions & 2 deletions src/entry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ end
chapter::String
edition::String
institution::String
isbn::String
issn:String
journal::String
number::String
organization::String
Expand All @@ -213,6 +215,8 @@ struct In
chapter::String
edition::String
institution::String
isbn::String
issn::String
journal::String
number::String
organization::String
Expand All @@ -232,6 +236,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 @@ -245,6 +251,8 @@ function In(fields)
chapter,
edition,
institution,
isbn,
issn,
journal,
number,
organization,
Expand All @@ -267,6 +275,7 @@ end
id::String
in::In
fields::Dict{String,String}
note::String
title::String
type::String
end
Expand All @@ -281,7 +290,8 @@ struct Entry <: AbstractEntry
eprint::Eprint
id::String
in::In
fields::Dict{String, String}
fields::Dict{String,String}
note::String
title::String
type::String
end
Expand All @@ -299,10 +309,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 1154ef0

Please sign in to comment.