Marthee commited on
Commit
9226cf4
·
verified ·
1 Parent(s): cdec1f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -133,6 +133,25 @@ def getprjSectionsfromTestAPI(jsdata):
133
  sections=API.getprjSections(data[0],data[1])
134
  return jsonify(sections)
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  @app.route('/getmethod/<jsdata>', methods=['GET'])
137
  def get_javascript_data(jsdata):
138
  progress_updates = [] # Shared list to store progress
 
133
  sections=API.getprjSections(data[0],data[1])
134
  return jsonify(sections)
135
 
136
+
137
+ @app.route('/findspecificationMVP1/',methods=["POST"])
138
+ def markupsspecification():
139
+ allanswers = eval(request.form.get('answers'))
140
+ print(allanswers)
141
+ pdfpath,pdflink=tsadropboxretrieval.getPathtoPDF_File(nameofPDF=allanswers[0])
142
+ pdfbytes, pdf_document,tablepdfoutput= InitialMarkups.extract_section_under_header(pdflink)
143
+ tablepdfoutput = json.loads(tablepdfoutput,object_pairs_hook=OrderedDict)
144
+ dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
145
+
146
+ # Get metadata using the shared link
147
+ metadata = dbxTeam.sharing_get_shared_link_metadata(pdflink)
148
+ dbPath='/TSA JOBS/ADR Test/FIND/'
149
+ pdflink= tsadropboxretrieval.uploadanyFile(doc=pdf_document,path=dbPath,pdfname=metadata.name) #doc=doc,pdfname=path,pdfpath=pdfpath+'Measured Plan/
150
+ print('LINKS0',pdflink)
151
+
152
+ return jsonify([pdflink,tablepdfoutput])
153
+
154
+
155
  @app.route('/getmethod/<jsdata>', methods=['GET'])
156
  def get_javascript_data(jsdata):
157
  progress_updates = [] # Shared list to store progress