aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bib.rs')
-rw-r--r--src/backend/bib.rs55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/backend/bib.rs b/src/backend/bib.rs
index 8539ab3..aca08b3 100644
--- a/src/backend/bib.rs
+++ b/src/backend/bib.rs
@@ -113,61 +113,6 @@ impl BibiMain {
keyword_list.dedup();
keyword_list
}
-}
-
-#[derive(Debug)]
-pub struct BibiData {
- pub entry_list: BibiDataSets,
-}
-
-impl BibiData {
- pub fn new(biblio: &Bibliography, citekeys: &Vec<String>) -> Self {
- Self {
- entry_list: {
- let bibentries = citekeys
- .into_iter()
- .map(|citekey| BibiEntry::new(&citekey, &biblio))
- .collect();
- BibiDataSets { bibentries }
- },
- }
- }
-}
-
-// Parent struct which keeps the Vector of all bibentries
-// Necessary for implementing FromIterator
-#[derive(Debug)]
-pub struct BibiDataSets {
- pub bibentries: Vec<Vec<String>>,
-}
-
-// Struct which has to be created for every entry of bibdatabase
-#[derive(Debug)]
-pub struct BibiEntry {
- pub authors: String,
- pub title: String,
- pub year: String,
- pub pubtype: String,
- pub keywords: String,
- pub citekey: String,
- pub weblink: String,
- pub filepath: String,
-}
-
-impl BibiEntry {
- pub fn new(citekey: &str, biblio: &Bibliography) -> Vec<String> {
- vec![
- Self::get_authors(&citekey, &biblio),
- Self::get_title(&citekey, &biblio),
- Self::get_year(&citekey, &biblio),
- Self::get_pubtype(&citekey, &biblio),
- Self::get_keywords(&citekey, &biblio),
- citekey.to_string(),
- Self::get_abstract(&citekey, &biblio),
- Self::get_weblink(&citekey, &biblio),
- Self::get_filepath(&citekey, &biblio),
- ]
- }
pub fn get_authors(citekey: &str, biblio: &Bibliography) -> String {
if biblio.get(&citekey).unwrap().author().is_ok() {