@@ -13,7 +13,7 @@ const UploadTranscriptPresenter = observer(({ model }) => {
1313 const [ fileInputValue , setFileInputValue ] = useState ( "" ) ; // Controls upload field state
1414
1515 async function transcriptScraperFunction ( file ) {
16- console . log ( file ) ;
16+ // console.log(file);
1717 //const pdfjsLib = window['pdfjsLib'];
1818 //pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.worker.min.js';
1919 if ( ! file ) {
@@ -80,7 +80,7 @@ const UploadTranscriptPresenter = observer(({ model }) => {
8080
8181
8282 localStorage . setItem ( "completedCourses" , JSON . stringify ( newcodes ) ) ;
83- console . log ( newcodes ) ;
83+ // console.log(newcodes);
8484
8585 window . dispatchEvent ( new Event ( "completedCourses changed" ) ) ;
8686 }
@@ -125,7 +125,10 @@ const UploadTranscriptPresenter = observer(({ model }) => {
125125 if ( ! flagTableDone ) {
126126 flagTable = true ;
127127 } else {
128- if ( textObjects [ i - 2 ] . transform [ 4 ] !== 497.66899718999997 ) {
128+ if ( ( textObjects [ i - 1 ] . transform [ 4 ] !== 532.71801758 ) && ( textObjects [ i - 11 ] . transform [ 4 ] !== 532.71801758 ) ) {
129+ //if its i-1, the page number is the object directly behind, otherwise if -11 its because theres some filter,
130+ //e.g. utskrift datum, personnummer and others. hopefully this should cover all base (probably doesn't)
131+ //this is a very hardcoded solution to this problem.
129132 //the new table (that is the new found "Kod" / "Code" is not because unexpected page break, therefore we are done transcribing
130133 //KTH courses, these are either uncomplete courses, or courses from other universities
131134 flagTable = false ;
0 commit comments