This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.4 | |
ENV PYTHONUNBUFFERED 1 | |
RUN apt-get update ; apt-get --assume-yes install binutils libproj-dev gdal-bin | |
RUN wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 | |
RUN tar -xjf geos-3.4.2.tar.bz2 | |
RUN cd geos-3.4.2; ./configure; make; make install | |
RUN wget http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz | |
RUN tar -xzf gdal-1.11.0.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
from docx import opendocx, getdocumenttext | |
#http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library | |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from cStringIO import StringIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import binascii | |
import subprocess | |
import sys | |
# Set these please! | |
sam_file = "/var/lib/samba/private/sam.ldb.d/DC\=ZENTYAL\,DC\=EXAMPLE\,DC\=ORG.ldb" | |
user_dn = "ou=Users,dc=zentyal,dc=example,dc=org" | |
samba_dn = 'CN=Users,DC=zentyal,DC=example,DC=org' | |
base_dn = "dc=zentyal,dc=example,dc=org" |