diff --git a/Dockerfile b/Dockerfile index 22533c8..4082957 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,10 @@ FROM ubuntu - -RUN apt-get update && apt-get install -y python3.6 python3-pip -RUN apt-get install --assume-yes git -RUN pip3 install setuptools pip --upgrade --force-reinstall - WORKDIR /usr/src/app - -RUN git clone https://github.com/eaglebh/blast-dbf.git -RUN cd blast-dbf && make - -COPY requirements.txt /usr/src/app/requirements.txt -COPY dbc2dbf.sh /usr/src/app/dbc2dbf.sh -COPY dbf2csv.py /usr/src/app/dbf2csv.py -COPY Makefile /usr/src/app/Makefile - -RUN pip3 install -r requirements.txt +COPY ["requirements.txt", "dbc2dbf.sh", "dbf2csv.py", "Makefile", "./"] +RUN apt-get update && \ + apt-get install --assume-yes python3 python3-pip git && \ + pip3 install setuptools pip --upgrade --force-reinstall && \ + git clone https://github.com/eaglebh/blast-dbf.git && \ + cd blast-dbf && \ + make && \ + pip3 install -r ../requirements.txt diff --git a/dbf2csv.py b/dbf2csv.py index d44a236..be4e112 100644 --- a/dbf2csv.py +++ b/dbf2csv.py @@ -3,6 +3,6 @@ for file in os.listdir("data"): if file.endswith(".dbf"): - dbf = Dbf5("data/" + file, codec='latin-1') + dbf = Dbf5("data/" + file, codec='utf-8') dbf.to_csv("data/csv/" + os.path.splitext(file)[0] + ".csv") - print("data/" + file + " converted to csv") \ No newline at end of file + print("data/" + file + " converted to csv")