Skip to main content

ScrapeBiblio: PDF Reference Extraction and Verification Library

Powered by Scrapegraphai

ScrapeBiblio Logo Downloads

ScrapeBiblio is a powerful library designed to extract references from PDF files, verify them against various databases, and convert the content to Markdown format.

Features

  • Extract text from PDF files
  • Extract references using OpenAI's GPT models
  • Verify references using Semantic Scholar, CORE, and BASE databases
  • Convert PDF content to Markdown format
  • Integration with ScrapeGraph for additional reference checking

Installation

Install ScrapeBiblio using pip:

pip install scrapebiblio

Configuration

Create a .env file in your project root with the following content:

OPENAI_API_KEY=your_openai_api_key
SEMANTIC_SCHOLAR_API_KEY=your_semantic_scholar_api_key
CORE_API_KEY=your_core_api_key
BASE_API_KEY=your_base_api_key

Usage

Here's a basic example of how to use ScrapeBiblio:

from scrapebiblio.core.find_reference import process_pdf
from dotenv import load_dotenv
import os
load_dotenv()
pdf_path = 'path/to/your/pdf/file.pdf'
output_path = 'references.md'
openai_api_key = os.getenv('OPENAI_API_KEY')
semantic_scholar_api_key = os.getenv('SEMANTIC_SCHOLAR_API_KEY')
core_api_key = os.getenv('CORE_API_KEY')
base_api_key = os.getenv('BASE_API_KEY')
process_pdf(pdf_path, output_path, openai_api_key, semantic_scholar_api_key,
core_api_key=core_api_key, base_api_key=base_api_key)

Advanced Usage

ScrapeBiblio offers additional functionalities:

  1. Convert PDF to Markdown:
from scrapebiblio.core.convert_to_md import convert_to_md
convert_to_md(pdf_path, output_path, openai_api_key)
  1. Check references with ScrapeGraph:
from scrapebiblio.utils.api.reference_utils import check_reference_with_scrapegraph
result = check_reference_with_scrapegraph("Reference Title")

Contributing

We welcome contributions! Please see our Contributing Guidelines for more details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for scrapebiblio 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapebiblio 1.2.0
File Size Uploaded
scrapebiblio-1.2.0.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapebiblio 1.2.0
File Interpreter ABI Platform
scrapebiblio-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / scrapebiblio-1.2.0.tar.gz

Download URL scrapebiblio-1.2.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
efc4a578a4badd6d8f0303a87198e78f50bf5eb69b3f612f946e497db324860b
BLAKE2b-256 checksum
How to use checksums
5d4c287fc3aa5bb8b4724654ac6544110df917eb3c1ad93b76a6b03cfb08be0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / scrapebiblio-1.2.0-py3-none-any.whl

Download URL scrapebiblio-1.2.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95f5e0f3a0ea207d6dc5d91542d923aeebc853f8969e904aaaae65ebb462467a
BLAKE2b-256 checksum
How to use checksums
cafd439a018a641a92351c805962276d9c7a21d29211657a7435ebc5eb160468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page