Compare commits
17 Commits
dthomas-db
...
523915feb0
| Author | SHA1 | Date | |
|---|---|---|---|
| 523915feb0 | |||
| b5b2a936c1 | |||
| afd144bd32 | |||
| eb221a5206 | |||
| db7c8c4577 | |||
|
|
21b1bf7992 | ||
| d376dba67c | |||
| 95631dbdbe | |||
| 9aef296763 | |||
| 2b287492de | |||
| d2a4d93590 | |||
| 58605dbe85 | |||
| 7bf3276ce9 | |||
| 818688452b | |||
| 01526524d4 | |||
| 33671683ea | |||
| fad885c610 |
@@ -157,7 +157,7 @@ def get_multi(partnums):
|
|||||||
bar(skipped=True)
|
bar(skipped=True)
|
||||||
fprint("Parsing Datasheet contents of " + partnum)
|
fprint("Parsing Datasheet contents of " + partnum)
|
||||||
bar.text = "Parsing Datasheet contents of " + partnum + ".pdf..."
|
bar.text = "Parsing Datasheet contents of " + partnum + ".pdf..."
|
||||||
read_datasheet.parse(path, output_dir)
|
read_datasheet.parse(path, output_dir, partnum)
|
||||||
bar(skipped=False)
|
bar(skipped=False)
|
||||||
|
|
||||||
def __downloaded_datasheet(partnum, path, output_dir):
|
def __downloaded_datasheet(partnum, path, output_dir):
|
||||||
@@ -166,7 +166,7 @@ def get_multi(partnums):
|
|||||||
bar(skipped=False)
|
bar(skipped=False)
|
||||||
fprint("Parsing Datasheet contents of " + partnum)
|
fprint("Parsing Datasheet contents of " + partnum)
|
||||||
bar.text = "Parsing Datasheet contents of " + partnum + ".pdf..."
|
bar.text = "Parsing Datasheet contents of " + partnum + ".pdf..."
|
||||||
read_datasheet.parse(path, output_dir)
|
read_datasheet.parse(path, output_dir, partnum)
|
||||||
bar(skipped=False)
|
bar(skipped=False)
|
||||||
|
|
||||||
for partnum in partnums:
|
for partnum in partnums:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import io
|
|||||||
import json
|
import json
|
||||||
from util import fprint
|
from util import fprint
|
||||||
|
|
||||||
def parse(filename, output_dir):
|
def parse(filename, output_dir, partnum):
|
||||||
|
|
||||||
# Extract table data
|
# Extract table data
|
||||||
|
|
||||||
@@ -165,6 +165,10 @@ def parse(filename, output_dir):
|
|||||||
|
|
||||||
|
|
||||||
fprint(tables)
|
fprint(tables)
|
||||||
|
|
||||||
|
# summary
|
||||||
|
|
||||||
|
tables["partnum"] = partnum
|
||||||
with open(output_dir + "/tables.json", 'w') as json_file:
|
with open(output_dir + "/tables.json", 'w') as json_file:
|
||||||
json.dump(tables, json_file)
|
json.dump(tables, json_file)
|
||||||
|
|
||||||
@@ -177,4 +181,4 @@ def parse(filename, output_dir):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parse("test2.pdf", "10GXS13")
|
parse("test2.pdf", "cables/10GXS13", "10GXS13")
|
||||||
@@ -5,7 +5,7 @@ pypdf2==2.12.1
|
|||||||
alive-progress
|
alive-progress
|
||||||
requests
|
requests
|
||||||
git+https://github.com/Byeongdulee/python-urx.git
|
git+https://github.com/Byeongdulee/python-urx.git
|
||||||
psycopg2
|
psycopg2-binary
|
||||||
pyyaml
|
pyyaml
|
||||||
Flask
|
Flask
|
||||||
selenium
|
selenium
|
||||||
|
|||||||
Reference in New Issue
Block a user