From 4f29b5c778c4bc8dc268382a985a8bb0f5594e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Mon, 26 Feb 2024 17:20:47 +0100 Subject: [PATCH] Add PB type --- Records.cs | 2 +- Text2Bib.cs | 3 ++- Txt2Bib.csproj | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Records.cs b/Records.cs index 24b7bfd..a4b42fa 100644 --- a/Records.cs +++ b/Records.cs @@ -22,7 +22,7 @@ namespace Txt2Bib.Records a = a.Trim(); var s = a.Split(' '); return s.Length > 1 ? - $"{s[1]} {s[0][0]}{s[0][1..].ToLowerInvariant()}" : a; + $"{s[1]} {s[0][0]}{s[0][1..].ToLower()}" : a; } protected string CreatePages(string pages) diff --git a/Text2Bib.cs b/Text2Bib.cs index f1a25b1..d4b56d6 100644 --- a/Text2Bib.cs +++ b/Text2Bib.cs @@ -15,7 +15,7 @@ namespace Txt2Bib /// public class Text2Bib { - private readonly string[] _citTypes = { "J", "B", "C", "P" }; + private readonly string[] _citTypes = { "J", "B", "C", "P", "PB" }; /// /// Generate single .bib file from input text files @@ -85,6 +85,7 @@ namespace Txt2Bib { "J" => new Article().Convert(lines), "B" => new Book().Convert(lines), + "PB" => new Book().Convert(lines), "C" => new Chapter().Convert(lines), "P" => new Proceedings().Convert(lines), _ => "" diff --git a/Txt2Bib.csproj b/Txt2Bib.csproj index 2940ba7..aada5b7 100644 --- a/Txt2Bib.csproj +++ b/Txt2Bib.csproj @@ -5,7 +5,7 @@ net6.0-windows enable true - 0.1.9 + 0.2.0