diff --git a/src/bibliography/bib_types/manual.rs b/src/bibliography/bib_types/manual.rs new file mode 100644 index 0000000..7b1b031 --- /dev/null +++ b/src/bibliography/bib_types/manual.rs @@ -0,0 +1,26 @@ +use crate::bibliography::bib_types::LocalDate; + +/// A manual entry source +#[derive(Clone, Debug)] +pub struct Manual { + pub title: String, + pub author: Option, + pub organization: Option, + pub address: Option, + pub edition: Option, + pub date: Option, +} + +impl Manual { + /// Creates a new manual source with only the mandatory fields filled + pub fn new(title: String) -> Self { + Self { + title, + author: None, + organization: None, + address: None, + edition: None, + date: None, + } + } +} diff --git a/src/bibliography/bib_types/mod.rs b/src/bibliography/bib_types/mod.rs index c2b2b51..00013c3 100644 --- a/src/bibliography/bib_types/mod.rs +++ b/src/bibliography/bib_types/mod.rs @@ -3,6 +3,7 @@ use crate::bibliography::bib_types::book::Book; use crate::bibliography::bib_types::booklet::Booklet; use crate::bibliography::bib_types::in_book::InBook; use crate::bibliography::bib_types::in_collection::InCollection; +use crate::bibliography::bib_types::manual::Manual; use chrono::{Date, Local}; pub mod article; @@ -10,6 +11,7 @@ pub mod book; pub mod booklet; pub mod in_book; pub mod in_collection; +pub mod manual; pub type LocalDate = Date; @@ -21,7 +23,7 @@ pub enum BibliographyType { Booklet(Booklet), InBook(InBook), InCollection(InCollection), - Manual, + Manual(Manual), Thesis, TechReport, Unpublished,