Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JingQunCui committed Dec 5, 2023
1 parent 942ce96 commit eafca69
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ACMAS/app/ACMAS_Web/ocr.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import fitz # PyMuPDF
import os
from datetime import date

import fitz # PyMuPDF
from django.conf import settings
from django.core.files.storage import FileSystemStorage

from .models import Course, UploadedFile


Expand All @@ -16,6 +18,8 @@
- Issues: Had trouble installing PyMuPDF with python alpine in docker containers
- Solution: Installed from source and made custom wheel for module package
"""


class OCR:
def extract_text_from_pdf(self, fType, course, fileName, fileUrl):
# Adding file to filesystem
Expand All @@ -38,6 +42,6 @@ def extract_text_from_pdf(self, fType, course, fileName, fileUrl):
file_dir=txt_file_path,
course=Course.objects.get(name=course),
date_uploaded=date.today,
flag=fType,
flag=fType
)
uploaded_file.save()

0 comments on commit eafca69

Please sign in to comment.