Skip to content

This will scan BP for their papyri info and compare it to the data in PN, and allow a user to correct the PN databse with new data

Notifications You must be signed in to change notification settings

halosm1th/BPtoPNDataCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPtoPNDataCompiler

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.

🖥️ Requirements

  • 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)

📥 Installing .NET SDK on macOS

  1. Visit the .NET Download page.

  2. 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.
  3. Run the downloaded installer and follow the prompts.

  4. Once installed, verify the installation by running:

    dotnet --version

You should see the installed version number (e.g., 6.0.4).


🔧 Cloning the Repository

Open your terminal and run:

git clone https://github.com/halosm1th/BPtoPNDataCompiler.git
cd BPtoPNDataCompiler

🚀 Running the Project

Run the compiled app using:

dotnet run

You 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).


📁 Directory structure

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
 └── *.sln

Opening the .zip archive downloaded from GitHub will create an additional BPtoPNDataCompiler/ folder, whose contents should be moved up a level.


Help Menu

To see the help menu use:

dotnet run -m

or

./BPtoPnDataCompiler -m

If 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 information

📁 Project Structure

BPtoPNDataCompiler/
├── Program.cs          # Main entry point
├── ...                 # Other C# source files
├── BPtoPNDataCompiler.csproj
└── README.md           # Project documentation

❓ Troubleshooting

  • dotnet: command not found Ensure 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 .csproj file for the target framework (e.g., net6.0) and install the corresponding SDK version.


🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss your ideas.


👤 Author

About

This will scan BP for their papyri info and compare it to the data in PN, and allow a user to correct the PN databse with new data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages