Skip to main content

library for extracting reference from documents

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapebiblio-1.2.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapebiblio-1.2.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file scrapebiblio-1.2.0.tar.gz.

File metadata

  • Download URL: scrapebiblio-1.2.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for scrapebiblio-1.2.0.tar.gz
Algorithm Hash digest
SHA256 efc4a578a4badd6d8f0303a87198e78f50bf5eb69b3f612f946e497db324860b
MD5 8c9c1a9a0bf33b19049b7d11a162b395
BLAKE2b-256 5d4c287fc3aa5bb8b4724654ac6544110df917eb3c1ad93b76a6b03cfb08be0a

See more details on using hashes here.

File details

Details for the file scrapebiblio-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: scrapebiblio-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for scrapebiblio-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95f5e0f3a0ea207d6dc5d91542d923aeebc853f8969e904aaaae65ebb462467a
MD5 520c8fd944c023139e18db1fdd0a9f5f
BLAKE2b-256 cafd439a018a641a92351c805962276d9c7a21d29211657a7435ebc5eb160468

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page