Skip to content

Commit

Permalink
Merge pull request #34 from BobLd/pdfpig-0.1.9
Browse files Browse the repository at this point in the history
Pdfpig 0.1.9
  • Loading branch information
BobLd authored Oct 6, 2024
2 parents b29d4f8 + aecc801 commit 6f810d7
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 69 deletions.
6 changes: 3 additions & 3 deletions Tabula.Csv/Tabula.Csv.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net452;net46;net461;net462;net47;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462;net471;net6.0;net8.0</TargetFrameworks>
<Description>Extract tables from PDF files (port of tabula-java using PdfPig). Csv and Tsv writers.</Description>
<PackageProjectUrl>https://github.com/BobLd/tabula-sharp</PackageProjectUrl>
<Version>0.1.4-alpha001</Version>
<Version>0.1.4</Version>
<Authors>BobLd</Authors>
<PackageTags>pdf, extract, table, tabula, pdfpig, parse, extraction, csv, tsv, excel, export</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="CsvHelper" Version="33.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Tabula.Json/Tabula.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net452;net46;net461;net462;net47;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462;net471;net6.0;net8.0</TargetFrameworks>
<Description>Extract tables from PDF files (port of tabula-java using PdfPig). Json writer.</Description>
<PackageProjectUrl>https://github.com/BobLd/tabula-sharp</PackageProjectUrl>
<Version>0.1.4-alpha001</Version>
<Version>0.1.4</Version>
<Company>BobLd</Company>
<Authors>BobLd</Authors>
<PackageTags>pdf, extract, table, tabula, pdfpig, parse, extraction, json, export</PackageTags>
Expand Down
53 changes: 25 additions & 28 deletions Tabula.Tests/PdfPigExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,46 +350,43 @@ public void TestNaturalOrderOfRectangles()
Assert.Equal("North Carolina State\rUniversity", cells[8].GetText());

//Third row
Assert.Equal("Social and ethical research and education in agrifood", cells[9].GetText());
Assert.Equal("nanotechnology (NIRT)", cells[10].GetText());
Assert.Equal("NSF", cells[11].GetText());
Assert.Equal("Michigan State University", cells[12].GetText());
Assert.Equal("Social and ethical research and education in agrifood\rnanotechnology (NIRT)", cells[9].GetText());
Assert.Equal("NSF", cells[10].GetText());
Assert.Equal("Michigan State University", cells[11].GetText());

//Fourth row
Assert.Equal("From laboratory to society: developing an informed", cells[13].GetText());
Assert.Equal("approach to nanoscale science and engineering (NIRT)", cells[14].GetText());
Assert.Equal("NSF", cells[15].GetText());
Assert.Equal("University of South Carolina", cells[16].GetText());
Assert.Equal("From laboratory to society: developing an informed\rapproach to nanoscale science and engineering (NIRT)", cells[12].GetText());
Assert.Equal("NSF", cells[13].GetText());
Assert.Equal("University of South Carolina", cells[14].GetText());

//Fifth row
Assert.Equal("Database and innovation timeline for nanotechnology", cells[17].GetText());
Assert.Equal("NSF", cells[18].GetText());
Assert.Equal("UCLA", cells[19].GetText());
Assert.Equal("Database and innovation timeline for nanotechnology", cells[15].GetText());
Assert.Equal("NSF", cells[16].GetText());
Assert.Equal("UCLA", cells[17].GetText());

//Sixth row
Assert.Equal("Social and ethical dimensions of nanotechnology", cells[20].GetText());
Assert.Equal("NSF", cells[21].GetText());
Assert.Equal("University of Virginia", cells[22].GetText());
Assert.Equal("Social and ethical dimensions of nanotechnology", cells[18].GetText());
Assert.Equal("NSF", cells[19].GetText());
Assert.Equal("University of Virginia", cells[20].GetText());

//Seventh row
Assert.Equal("Undergraduate exploration of nanoscience,", cells[23].GetText());
Assert.Equal("applications and societal implications (NUE)", cells[24].GetText());
Assert.Equal("NSF", cells[25].GetText());
Assert.Equal("Michigan Technological\rUniversity", cells[26].GetText());
Assert.Equal("Undergraduate exploration of nanoscience,\rapplications and societal implications (NUE)", cells[21].GetText());
Assert.Equal("NSF", cells[22].GetText());
Assert.Equal("Michigan Technological\rUniversity", cells[23].GetText());

//Eighth row
Assert.Equal("Ethics and belief inside the development of", cells[27].GetText());
Assert.Equal("nanotechnology (CAREER)", cells[28].GetText());
Assert.Equal("NSF", cells[29].GetText());
Assert.Equal("University of Virginia", cells[30].GetText());
Assert.Equal("Ethics and belief inside the development of\rnanotechnology (CAREER)", cells[24].GetText());
//Assert.Equal("nanotechnology (CAREER)", cells[28].GetText());
Assert.Equal("NSF", cells[25].GetText());
Assert.Equal("University of Virginia", cells[26].GetText());

//Ninth row
Assert.Equal("All centers, NNIN and NCN have a societal", cells[31].GetText());
Assert.Equal("NSF, DOE,", cells[32].GetText());
Assert.Equal("All nanotechnology centers", cells[33].GetText());
Assert.Equal("implications components", cells[34].GetText());
Assert.Equal("DOD, and NIH", cells[35].GetText());
Assert.Equal("and networks", cells[36].GetText());
Assert.Equal("All centers, NNIN and NCN have a societal", cells[27].GetText());
Assert.Equal("NSF, DOE,", cells[28].GetText());
Assert.Equal("All nanotechnology centers", cells[29].GetText());
Assert.Equal("implications components", cells[30].GetText());
Assert.Equal("DOD, and NIH", cells[31].GetText());
Assert.Equal("and networks", cells[32].GetText());
}
}

Expand Down
10 changes: 5 additions & 5 deletions Tabula.Tests/Tabula.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
52 changes: 24 additions & 28 deletions Tabula.Tests/TestBasicExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,46 +314,42 @@ public void TestNaturalOrderOfRectangles()
Assert.Equal("North Carolina State\rUniversity", cells[8].GetText());

//Third row
Assert.Equal("Social and ethical research and education in agrifood", cells[9].GetText());
Assert.Equal("nanotechnology (NIRT)", cells[10].GetText());
Assert.Equal("NSF", cells[11].GetText());
Assert.Equal("Michigan State University", cells[12].GetText());
Assert.Equal("Social and ethical research and education in agrifood\rnanotechnology (NIRT)", cells[9].GetText());
Assert.Equal("NSF", cells[10].GetText());
Assert.Equal("Michigan State University", cells[11].GetText());

//Fourth row
Assert.Equal("From laboratory to society: developing an informed", cells[13].GetText());
Assert.Equal("approach to nanoscale science and engineering (NIRT)", cells[14].GetText());
Assert.Equal("NSF", cells[15].GetText());
Assert.Equal("University of South Carolina", cells[16].GetText());
Assert.Equal("From laboratory to society: developing an informed\rapproach to nanoscale science and engineering (NIRT)", cells[12].GetText());
Assert.Equal("NSF", cells[13].GetText());
Assert.Equal("University of South Carolina", cells[14].GetText());

//Fifth row
Assert.Equal("Database and innovation timeline for nanotechnology", cells[17].GetText());
Assert.Equal("NSF", cells[18].GetText());
Assert.Equal("UCLA", cells[19].GetText());
Assert.Equal("Database and innovation timeline for nanotechnology", cells[15].GetText());
Assert.Equal("NSF", cells[16].GetText());
Assert.Equal("UCLA", cells[17].GetText());

//Sixth row
Assert.Equal("Social and ethical dimensions of nanotechnology", cells[20].GetText());
Assert.Equal("NSF", cells[21].GetText());
Assert.Equal("University of Virginia", cells[22].GetText());
Assert.Equal("Social and ethical dimensions of nanotechnology", cells[18].GetText());
Assert.Equal("NSF", cells[19].GetText());
Assert.Equal("University of Virginia", cells[20].GetText());

//Seventh row
Assert.Equal("Undergraduate exploration of nanoscience,", cells[23].GetText());
Assert.Equal("applications and societal implications (NUE)", cells[24].GetText());
Assert.Equal("NSF", cells[25].GetText());
Assert.Equal("Michigan Technological\rUniversity", cells[26].GetText());
Assert.Equal("Undergraduate exploration of nanoscience,\rapplications and societal implications (NUE)", cells[21].GetText());
Assert.Equal("NSF", cells[22].GetText());
Assert.Equal("Michigan Technological\rUniversity", cells[23].GetText());

//Eighth row
Assert.Equal("Ethics and belief inside the development of", cells[27].GetText());
Assert.Equal("nanotechnology (CAREER)", cells[28].GetText());
Assert.Equal("NSF", cells[29].GetText());
Assert.Equal("University of Virginia", cells[30].GetText());
Assert.Equal("Ethics and belief inside the development of\rnanotechnology (CAREER)", cells[24].GetText());
Assert.Equal("NSF", cells[25].GetText());
Assert.Equal("University of Virginia", cells[26].GetText());

//Ninth row
Assert.Equal("All centers, NNIN and NCN have a societal", cells[31].GetText());
Assert.Equal("NSF, DOE,", cells[32].GetText());
Assert.Equal("All nanotechnology centers", cells[33].GetText());
Assert.Equal("implications components", cells[34].GetText());
Assert.Equal("DOD, and NIH", cells[35].GetText());
Assert.Equal("and networks", cells[36].GetText());
Assert.Equal("All centers, NNIN and NCN have a societal", cells[27].GetText());
Assert.Equal("NSF, DOE,", cells[28].GetText());
Assert.Equal("All nanotechnology centers", cells[29].GetText());
Assert.Equal("implications components", cells[30].GetText());
Assert.Equal("DOD, and NIH", cells[31].GetText());
Assert.Equal("and networks", cells[32].GetText());
}

[Fact]
Expand Down
6 changes: 3 additions & 3 deletions Tabula/Tabula.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net452;net46;net461;net462;net47;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462;net471;net6.0;net8.0</TargetFrameworks>
<Description>Extract tables from PDF files (port of tabula-java using PdfPig).</Description>
<PackageProjectUrl>https://github.com/BobLd/tabula-sharp</PackageProjectUrl>
<Version>0.1.4-alpha001</Version>
<Version>0.1.4</Version>
<Authors>BobLd</Authors>
<Company>BobLd</Company>
<PackageTags>pdf, extract, table, tabula, pdfpig, parse, extraction, export</PackageTags>
Expand All @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="PdfPig" Version="0.1.9-alpha-20231019-c6e2d" />
<PackageReference Include="PdfPig" Version="0.1.9" />
</ItemGroup>

</Project>

0 comments on commit 6f810d7

Please sign in to comment.