Skip to content

Commit

Permalink
Fully complete for Version 1
Browse files Browse the repository at this point in the history
  • Loading branch information
vedaprakashms committed May 3, 2020
1 parent 937fc00 commit b575115
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 19 deletions.
39 changes: 24 additions & 15 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
<div class="column-width-min">
Application/PCT #
<br>
<label class="label-fontsize">123456</label>
<label class="label-fontsize" id="appno">123456</label>
</div>
<div class="column-width-min">
Status Date <br>
<label class="label-fontsize"> mm/dd/yyyy</label>
<label class="label-fontsize" id="statdate"> mm/dd/yyyy</label>
</div>
<div class="column-width-max">
Status <br>
<label class="label-fontsize">ipsum Lorem ipsum dolor sit amet consectetur </label>
<label class="label-fontsize" id="status">ipsum Lorem ipsum dolor sit amet consectetur </label>
</div>

</div>
Expand All @@ -66,66 +66,74 @@
<div class="column-width-min">
Publication number
<br>
<label class="label-fontsize">1234567890</label>
<label class="label-fontsize" id="Pubno">1234567890</label>
</div>
<div class="column-width-min">
Publication Date <br>
<label class="label-fontsize"> mm/dd/yyyy</label>
<label class="label-fontsize" id="Pubdate"> mm/dd/yyyy</label>
</div>
<div class="column-width-max">
Title <br>
<label class="label-fontsize">ipsum Lorem ipsum dolor sit amet consectetur </label>
<label class="label-fontsize" id="Title">ipsum Lorem ipsum dolor sit amet consectetur </label>
</div>

</div>
<div class="column-layout ">
<div class="column-width-min">
Patent number
<br>
<label class="label-fontsize">1234567890</label>
<label class="label-fontsize" id="patno">1234567890</label>
</div>
<div class="column-width-min">
Patent Date <br>
<label class="label-fontsize"> mm/dd/yyyy</label>
<label class="label-fontsize" id="patdate"> mm/dd/yyyy</label>
</div>
<div class="column-width-max">
Entity Type <br>
<label class="label-fontsize">ipsum Lorem ipsum dolor sit amet consectetur </label>
<label class="label-fontsize" id="entity">ipsum Lorem ipsum dolor sit amet consectetur </label>
</div>

</div>
<div class="column-layout ">
<div class="column-width-min">
PTA
<br>
<label class="label-fontsize">1234567890</label>
<label class="label-fontsize" id="pta">1234567890</label>
</div>
<div class="column-width-min">
Number of Assiginments <br>
<label class="label-fontsize"> mm/dd/yyyy</label>
<label class="label-fontsize" id="Assign"> mm/dd/yyyy</label>
</div>
<div class="column-width-max">
Inventors <br>
<label class="label-fontsize">ipsum Lorem ipsum dolor sit amet consectetur </label>
<label class="label-fontsize" id="Inv">ipsum Lorem ipsum dolor sit amet consectetur </label>
</div>

</div>
<div class="column-layout ">
<div class="column-width-min">
No. of Parent Patents
<br>
<label class="label-fontsize">1234567890</label>
<label class="label-fontsize" id="parentcon">1234567890</label>
</div>
<div class="column-width-min">
No. of Child Patents <br>
<label class="label-fontsize"> 1234567890</label>
<label class="label-fontsize" id="childcon"> 1234567890</label>
</div>
<div class="column-width-max">
AIA? <br>
<label class="label-fontsize">ipsum Lorem ipsum dolor sit amet consectetur </label>
<label class="label-fontsize" id="AIA">ipsum Lorem ipsum dolor sit amet consectetur </label>
</div>

</div>
<div class="column-width-max">
<label class="label-fontsize" id="prgresstrack"></label>

</div>
<div class="column-width-max">
<label class="label-fontsize"> The Displaying may not be live due to the sheer Speed of the tool!!! Enjoy</label>

</div>


</main>
Expand All @@ -146,6 +154,7 @@
</footer>
<script src="../javascripts/renderer1.js" async defer></script>
<script src="../javascripts/create_bare_Excelsheet.js" async defer></script>
<script src="../javascripts/exceltoarray.js" async defer></script>
</body>

</html>
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,9 @@ ipcMain.on('gen_template', (e, a) => {
ipcMain.on('Start_work', (e, a) => {

e.reply('download-start', second_win_selection)
})

ipcMain.on('Excel-completed', (e, a) => {
e.reply('tmplt-notification', a);

})
6 changes: 4 additions & 2 deletions src/javascripts/create_bare_Excelsheet.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const app = require('electron').remote.app;
const { ipcRenderer } = require('electron');
const Excel = require('exceljs');
const path = require('path');
const fs = require('fs');
Expand Down Expand Up @@ -162,7 +163,7 @@ module.exports.writexldata = async(jsonFP, jsonobj) => {
AssignmentSheet.properties.defaultRowHeight = 75;

jsonfile = fs.readFileSync(jsonFP);
console.log(jsonfile);
//console.log(jsonfile);
var obj = JSON.parse(jsonfile);

for (var k in obj) {
Expand Down Expand Up @@ -258,7 +259,8 @@ module.exports.writexldata = async(jsonFP, jsonobj) => {

workbook.commit().then(function() {
console.log('excel file cretaed');

document.getElementById('prgresstrack').innerHTML = "Finished writing Excel file, please check the file at <br>" + options['filename']
ipcRenderer.send("Excel-completed", options['filename'])
});
var t1 = performance.now()
console.log("Call to fetch application data from uspto took " + (t1 - t0) / 1000 + " seconds to complete a set ")
Expand Down
34 changes: 32 additions & 2 deletions src/javascripts/exceltoarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,50 @@ module.exports.data2json = async(array) => {
//console.log(num)
await xlarray.peds_fetch(payload)
.then(res => {
//console.log(res)
console.log(res)
data_json[num] = res
document.getElementById('appno').innerHTML = res['applId'];
document.getElementById('statdate').innerHTML = res['appStatusDate'];
document.getElementById('status').innerHTML = res['appStatus'];
document.getElementById('Pubno').innerHTML = res['appEarlyPubNumber'];
document.getElementById('Pubdate').innerHTML = res['appEarlyPubDate'];
document.getElementById('Pubdate').innerHTML = res['appEarlyPubDate'];
document.getElementById('Title').innerHTML = res['patentTitle'];
document.getElementById('patno').innerHTML = res['patentNumber'];
document.getElementById('patdate').innerHTML = res['patentIssueDate'];
document.getElementById('entity').innerHTML = res['appEntityStatus'];
document.getElementById('pta').innerHTML = res['totalPtoDays'];
if (res['assignments'] != undefined) {
document.getElementById('Assign').innerHTML = res['assignments'].length;
} else {
document.getElementById('Assign').innerHTML = '0';
}
document.getElementById('Inv').innerHTML = res['inventorName'];
if (res['parentContinuity'] != undefined) {
document.getElementById('parentcon').innerHTML = res['parentContinuity'].length;
} else {
document.getElementById('parentcon').innerHTML = 0;
}
if (res['childContinuity'] != undefined) {
document.getElementById('childcon').innerHTML = res['childContinuity'].length;
} else {
document.getElementById('childcon').innerHTML = 0;
}
document.getElementById('AIA').innerHTML = res['firstInventorFileFacet'];
})
.catch(err => {
console.log(err)
})

progressbar.value = "" + i + "";

i++;
document.getElementById('prgresstrack').innerHTML = "Completed " + progressbar.value + " of " + progressbar.max;
}

//console.log(path.dirname(excel_path))
//console.log(path.basename(excel_path, '.xlsx'))

document.getElementById('prgresstrack').innerHTML = "Writing data to Excel file!!, please wait for a notification :)"
data_jasonsting = JSON.stringify(data_json)
var filenama = path.join(path.dirname(excel_path), path.basename(excel_path, '.xlsx')) + '.json'
//console.log(filenama)
Expand Down

0 comments on commit b575115

Please sign in to comment.