Add manual source

Signed-off-by: trivernis <trivernis@protonmail.com>
main
trivernis 4 years ago
parent 7cac672ef3
commit a261505e8b
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -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<String>,
pub organization: Option<String>,
pub address: Option<String>,
pub edition: Option<String>,
pub date: Option<LocalDate>,
}
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,
}
}
}

@ -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<Local>;
@ -21,7 +23,7 @@ pub enum BibliographyType {
Booklet(Booklet),
InBook(InBook),
InCollection(InCollection),
Manual,
Manual(Manual),
Thesis,
TechReport,
Unpublished,

Loading…
Cancel
Save