Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions _xlsx_converter.py
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions docker_builder.py
Original file line number Diff line number Diff line change
@@ -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()