Sign inSign up

benjisho/p2ta-pdf-parser-website

By benjisho

Updated almost 2 years ago

A web interface for `benjisho/p2ta-pdf-parser`

Image
Web servers
0

1.0K

benjisho/p2ta-pdf-parser-website repository overview

P2TA PDF Parser Website

Repository URL: https://hub.docker.com/repository/docker/benjisho/p2ta-pdf-parser-website

Description:
The P2TA PDF Parser Website is the user-facing interface for the PDF-to-text parsing tool tailored for accountants. This web application allows users to upload PDF files related to specific accounting standards and retrieve parsed text files containing key financial insights.

The website integrates seamlessly with the parsing engine, providing a clean UI and background virus scanning for secure file handling.


Key Features:

  • User-Friendly Interface: Upload PDF files easily through an intuitive web interface.
  • Accounting Standard-Specific Parsing: Choose specific standards like ASC 606, ASC 842, and more.
  • Virus Protection: Built-in ClamAV scanning ensures files are safe before processing.
  • File Management: Isolated directories for each standard improve organization.
  • Output Download: Retrieve parsed text outputs with one click.

Getting Started:

  1. Pull the Image:

    docker pull benjisho/p2ta-pdf-parser:latest
    docker pull benjisho/p2ta-pdf-parser-website:latest
    docker pull clamav/clamav:latest
    
  2. Run the Container:

    # Create a custom bridge network
    docker network create p2ta-network
    
    # Re-run containers with the custom network
    docker stop clamav-container p2ta-website
    docker rm clamav-container p2ta-website
    
    docker run -d \
      --name clamav-container \
      --network p2ta-network \
      -v $(pwd)/virus-protection/clamav/freshclam.conf:/etc/clamav/freshclam.conf \
      -v $(pwd)/pdf_files_to_parse:/scan \
      -v $(pwd)/virus-protection/clamav/clamav_logs:/var/log/clamav \
      -v clamav_db:/var/lib/clamav \
      -p 3310:3310 \
      --memory 4g \
      --restart unless-stopped \
      clamav/clamav:latest \
      sh -c "clamd --foreground --debug"
    
    docker run -d \
      --name p2ta-website \
      --network p2ta-network \
      -v $(pwd)/p2ta-pdf-parser-website:/app/p2ta-pdf-parser-website \
      -v $(pwd)/p2ta-pdf-parser-app:/app/p2ta-pdf-parser-app \
      -v $(pwd)/pdf_files_to_parse:/app/pdf_files_to_parse \
      -v $(pwd)/output_files:/app/output_files \
      -p 5000:5000 \
      --restart unless-stopped \
      benjisho/p2ta-pdf-parser-website:latest
    
  • Wait for the service to come up:
docker logs p2ta-website -f
  1. Access the Application:
    Open your browser and navigate to http://localhost:5000.

Environment Variables:

  • PYTHONUNBUFFERED=1: Ensures Python output is visible in real-time for debugging.
  • ClamAV connection details are pre-configured within the container.

Volumes:

  • /app/pdf_files_to_parse: Directory for uploaded PDF files.
  • /app/output_files: Directory for storing parsed text outputs.

Ports:

  • 5000: Default port for accessing the web interface.

Cleanup
# Stop and Remove Containers
docker stop clamav-container p2ta-website
docker rm clamav-container p2ta-website

# Cleanup Volumes and Directories
docker volume rm clamav_db
rm -rf $(pwd)/virus-protection/clamav/clamav_logs
rm -rf $(pwd)/pdf_files_to_parse
rm -rf $(pwd)/output_files

# Remove the Custom Network
docker network rm p2ta-network

# Cleanup the images
docker rmi clamav/clamav:latest benjisho/p2ta-pdf-parser-website:latest

# Verify Cleanup
docker ps -a
docker volume ls
docker network ls
docker images

Tag summary

Content type

Image

Digest

sha256:0279d9cf2

Size

122.7 MB

Last updated

almost 2 years ago

docker pull benjisho/p2ta-pdf-parser-website