A utility for scraping data from the Bibliographie Papyrologique en ligne (BP) and reformatting it in the XML format in which it appears in papyri.info (PN), to enable a computational comparison of the two systems' versions of a given item. Users are presented with a side-by-side, element-by-element comparison of discrepancies and can elect to indicate which version of the file is correct, the results of which are logged to facilitate the improved integration of these two foundational resources in digital papyrology. This tool is developed with .NET Core and designed to run cross-platform.
- macOS 10.15 or later
- Windows 10 or later
- The Instructions for installing DotNet can be found here
- Will need to download DotNet from here
- A terminal application (e.g., Terminal, iTerm2)
-
Visit the .NET Download page.
-
Scroll down to macOS and download the .NET SDK (x64) or ARM64 version depending on your Mac architecture.
- Intel Macs: use x64.
- Apple Silicon (M1/M2/M3): use ARM64.
-
Run the downloaded installer and follow the prompts.
-
Once installed, verify the installation by running:
dotnet --version
You should see the installed version number (e.g., 6.0.4).
Open your terminal and run:
git clone https://github.com/halosm1th/BPtoPNDataCompiler.git
cd BPtoPNDataCompilerRun the compiled app using:
dotnet runYou can pass any required arguments as needed. If the program expects input files or specific parameters, be sure to include them in your command line call (you may need to consult the code or usage examples for details).
The BPtoPNDataCompiler/ folder containing the program files should be a sibling of the idp.data/ folder whose Biblio/ child provides the local *.xml files that will be compared to the BP en ligne, as in the following structure:
- Base folder/
├── idp.data/
└── Biblio/
├── BPtoPNDataCompiler/
├── bin/ (generated by C# when building the program)
├── obj/ (generated by C# when building the program)
├── *.cs
├── *.csproj
├── *.md
├── *.csv
└── *.slnOpening the .zip archive downloaded from GitHub will create an additional BPtoPNDataCompiler/ folder, whose contents should be moved up a level.
To see the help menu use:
dotnet run -mor
./BPtoPnDataCompiler -mIf entered, the following menu will print:
Description:
BP to PN Data Compiler: Compiles and updates bibliographic data from BP and PN sources.
Usage:
BPtoPNDataCompiler [options]
Options:
-s, -t, --start-year <start-year> Sets the start year for data compilation. Use -s or --start-year. Default is 1932. Cannot be less than 1932. [default: 1932]
-d, -e, --end-year <end-year> Sets the end year for data compilation. Use -d or --end-year. Default is the current system year -1 (Currently: 2024). Cannot be lower than the start year. [default:
2024]
-b, -bps, --bp-start-number <bp-start-number> Sets the beginning number for BP data processing. Use -bps or --bp-start-number. Default is 0. Cannot be negative. [default: 1]
-bpe, -f, --bp-end-number <bp-end-number> Sets the finishing number for BP data processing. Use -bpe or --bp-end-number. Default is maximum integer value. Cannot be less than the BP start number. [default:
9999]
-c, --compare-author-names Sets if the author names should be a field to be compared. Defaults to false. [default: False]
-nd, --no-delete If used, will **not** delete the resulting folder that is zipped. By default this folder is zipped and deleted after the program is run [default: False]
-m, --menu Show help menu. [default: False]
--version Show version information
-?, -h, --help Show help and usage informationBPtoPNDataCompiler/
├── Program.cs # Main entry point
├── ... # Other C# source files
├── BPtoPNDataCompiler.csproj
└── README.md # Project documentation
-
dotnet: command not foundEnsure the .NET SDK is correctly installed and added to your$PATH. -
Project not building? Make sure you're using the right version of the .NET SDK. Check the
.csprojfile for the target framework (e.g.,net6.0) and install the corresponding SDK version.
Pull requests are welcome. For major changes, please open an issue first to discuss your ideas.