diff --git a/_xlsx_converter.py b/_xlsx_converter.py new file mode 100644 index 000000000..7e6469c35 --- /dev/null +++ b/_xlsx_converter.py @@ -0,0 +1,20 @@ +import pandas as pd + +class XlsxConverter: + def convert(self, file_path): + # Read the Excel file into a pandas DataFrame + df = pd.read_excel(file_path) + + # Drop empty rows and columns + df = df.dropna(how='all', axis=0).dropna(how='all', axis=1) + + # Replace 'Unnamed:' headers with empty strings + df.columns = ['' if col.startswith('Unnamed:') else col for col in df.columns] + + # Convert NaN values to empty strings + df = df.fillna('') + + # Convert the DataFrame to HTML + html = df.to_html(na_rep='') + + return html \ No newline at end of file diff --git a/docker_builder.py b/docker_builder.py new file mode 100644 index 000000000..8f87f2f58 --- /dev/null +++ b/docker_builder.py @@ -0,0 +1,18 @@ +import subprocess + +class DockerBuilder: + def __init__(self, dockerfile_path): + self.dockerfile_path = dockerfile_path + + def clone_repo(self, repo_url): + # Clone the repository using git + subprocess.run(['git', 'clone', repo_url]) + + def build_docker_image(self): + # Build the Docker image using the Dockerfile + subprocess.run(['docker', 'build', '-t', 'my-image', self.dockerfile_path]) + +# Usage +builder = DockerBuilder('./Dockerfile') +builder.clone_repo('https://github.com/user/repo.git') +builder.build_docker_image() \ No newline at end of file