more changes

This commit is contained in:
2025-01-14 09:44:32 +01:00
parent 997d618ff1
commit 2acaea588b
6 changed files with 6 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ dependencies = [
"beautifulsoup4>=4.12.3", "beautifulsoup4>=4.12.3",
"bump-my-version>=0.29.0", "bump-my-version>=0.29.0",
"chardet>=5.2.0", "chardet>=5.2.0",
"comtypes>=1.4.9",
"darkdetect>=0.8.0", "darkdetect>=0.8.0",
"docx2pdf>=0.1.8", "docx2pdf>=0.1.8",
"loguru>=0.7.3", "loguru>=0.7.3",

View File

@@ -1,11 +1,9 @@
import os import os
import inspect
import sqlite3 as sql import sqlite3 as sql
import tempfile import tempfile
from pathlib import Path from pathlib import Path
from src import settings from src import settings
from typing import Any, Dict, List, Optional, Tuple, Union from typing import Any, List, Optional, Tuple, Union
from omegaconf import OmegaConf
import datetime import datetime
from src import logger from src import logger
from src.backend.db import ( from src.backend.db import (
@@ -1499,7 +1497,7 @@ class Database:
else: return None else: return None
def getElsaProfs(self)->list[str]: def getElsaProfs(self)->list[str]:
query = f"SELECT fullname FROM elsa_prof" query = "SELECT fullname FROM elsa_prof"
data = self.query_db(query) data = self.query_db(query)
if data: if data:
return [i[0] for i in data] return [i[0] for i in data]

View File

@@ -9,7 +9,7 @@ def delete_temp_contents():
""" """
delete_temp_contents deletes the contents of the temp directory. delete_temp_contents deletes the contents of the temp directory.
""" """
path = database.tempdir path = database.temp
path = path.replace("~", str(Path.home())) path = path.replace("~", str(Path.home()))
path = Path(path) path = Path(path)
path = path.resolve() path = path.resolve()

View File

@@ -1,5 +1,4 @@
from enum import Enum
APP_NRS = [i for i in range(1, 181)] APP_NRS = [i for i in range(1, 181)]

View File

@@ -1,6 +1,6 @@
import requests import requests
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from src import logger
# import sleep_and_retry decorator to retry requests # import sleep_and_retry decorator to retry requests
from ratelimit import limits, sleep_and_retry from ratelimit import limits, sleep_and_retry
@@ -21,7 +21,7 @@ AUTHOR = "RDS_PERSON"
HEADERS = { HEADERS = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 \ "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 \
(KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36", (HTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
"Accept-Language": "en-US, en;q=0.5", "Accept-Language": "en-US, en;q=0.5",
} }
RATE_LIMIT = 20 RATE_LIMIT = 20

View File

@@ -1,7 +1,6 @@
import pandas as pd import pandas as pd
from docx import Document from docx import Document
import re
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
def word_docx_to_csv(path) -> pd.DataFrame: def word_docx_to_csv(path) -> pd.DataFrame: