This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"database/sql" |
This file contains 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
# This will remove the manual work of copying the file names | |
# You can run this in batches to processes it | |
# pip install --user tika to download the tika library | |
# the first run will download tika.jar | |
from tika import parser | |
filename="path_to_file" | |
#parse the pdf |
This file contains 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 gzip | |
import json | |
import re | |
import os | |
import datetime | |
import pprint | |
import argparse | |
from collections import OrderedDict | |
class _RegEx: |
This file contains 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
""" | |
I'm really new to python and flask so this maybe terribly wrong but it works at least for me | |
usage: | |
python clitools.py --config {{your config}} command | |
It also prompts just in case you forget. | |
The ctx object from the click documentation along with the '@click.pass_context helps to push the app variable through | |
all the functions. |
NewerOlder