Add some fields to records

This commit is contained in:
Nicolò P 2023-12-21 16:37:38 +01:00
parent 131cd2ea1b
commit ba6c6ac589

View File

@ -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";
}
}