From ba6c6ac589f3fea0851869583d7df20bcd79e03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Thu, 21 Dec 2023 16:37:38 +0100 Subject: [PATCH] Add some fields to records --- Records.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Records.cs b/Records.cs index 6e14e20..d66d0ce 100644 --- a/Records.cs +++ b/Records.cs @@ -15,6 +15,8 @@ namespace Txt2Bib.Records public byte Issue { get; init; } = 1; public ushort FirstPage { get; init; } = 1; public ushort LastPage { get; init; } = 1; + public string Doi { get; init; } = ""; + public string Url { get; init; } = ""; public override string ToString() { @@ -25,6 +27,8 @@ namespace Txt2Bib.Records $"\tvolume = \"{Volume}\",\n" + $"\tnumber = \"{Issue}\",\n" + $"\tpages = \"{FirstPage}--{LastPage}\",\n" + + $"\tdoi = \"{Doi}\",\n" + + $"\turl = \"{Url}\",\n" + "}\n"; } } @@ -35,6 +39,8 @@ namespace Txt2Bib.Records public string[] Author { get; init; } = { "Gianni e Pinotto" }; public string Title { get; init; } = ""; public string Publisher { get; init; } = ""; + public string Place { get; init; } = ""; + public string Url { get; init; } = ""; public ushort Year { get; init; } = 1950; public override string ToString() @@ -42,7 +48,9 @@ namespace Txt2Bib.Records return $"@{Type}" + "{" +$"{Author[0][..5]}_{Year},\n" + $"\ttitle = \"{Title}\",\n" + $"\tpublisher = \"{Publisher}\",\n" + + $"\taddress = \"{Place}\",\n" + $"\tyear = \"{Year}\",\n" + + $"\turl = \"{Url}\",\n" + "}\n"; } }