You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -517,6 +517,8 @@ P._wrapper = (f, n) -> # the function to wrap and the string name of the functio
517
517
else
518
518
res=status:404
519
519
nfeml=@params.email
520
+
pfs=@params.funders
521
+
deleteqry.funders
520
522
deleteqry.email
521
523
delete@params.size
522
524
deleteqry.size
@@ -560,44 +562,65 @@ P._wrapper = (f, n) -> # the function to wrap and the string name of the functio
560
562
ks=ks.splice(ex, 1) if ex isnt-1
561
563
if nfeml
562
564
await@mailto: nfeml, subject:'Your export has started (ref: '+ flid +'.csv)', text:'Your export has started. You can download the file any time, it will keep growing until it is complete, when you will get another notification.<br><br><a href="'+ eurl +'">Download csv</a><br><br>Thanks'
val=val.replace(/"/g, '').replace(/\n/g, '').replace(/\s\s+/g, '') iftypeof val is'string'
619
+
awaitfs.appendFile out, (ifnot first then',"'else'"') + val +'"'
620
+
first=false
598
621
if notify
599
622
await@mailto: notify, subject:'Your export is complete (ref: '+out.split('/').pop() +')', text:'Your export is complete. This link will expire in approximately 2 days.<br><br><a href="'+ eurl +'">Download csv</a>\n\nThanks'
if prc?andnotprc.is_retractedandnotprc.is_paratext
378
-
deleteprc.is_retracted
379
-
deleteprc.is_paratext
380
-
dt=await@date()
381
-
ifdt.includes(year) and timestamp
382
-
exists=await@report.workscr.DOI
383
-
ifexists?.supplements?
384
-
prc[e] ?= exists[e] for e in ['supplements', 'orgs', 'author_email_name', 'pmc_checked', 'paid', 'PMCID', 'epmc_licence', 'pmc_has_data_availability_statement']
385
-
batch.push prc
386
-
ifbatch.lengthis10000
387
-
await@report.works batch
388
-
console.log'OA report works loading', total, Math.ceil ((await@epoch()) - started)/60000
389
-
batch= []
373
+
if overwrite istrueornotawait@report.workscr.DOI
374
+
total+=1
375
+
console.log('report works load xref', total) ifnot timestamp and total %20is0
376
+
prc=await@report.works._process cr
377
+
if prc?andnotprc.is_retractedandnotprc.is_paratext
378
+
deleteprc.is_retracted
379
+
deleteprc.is_paratext
380
+
dt=await@date()
381
+
ifdt.includes(year) and timestamp
382
+
exists=await@report.workscr.DOI
383
+
ifexists?.supplements?
384
+
prc[e] ?= exists[e] for e in ['supplements', 'orgs', 'author_email_name', 'pmc_checked', 'paid', 'PMCID', 'epmc_licence', 'pmc_has_data_availability_statement']
385
+
batch.push prc
386
+
ifbatch.lengthis10000
387
+
await@report.works batch
388
+
console.log'OA report works loading', total, Math.ceil ((await@epoch()) - started)/60000
389
+
batch= []
390
390
391
391
oaqry?='authorships.institutions.display_name:* AND publication_year:'+ year
392
392
oaqry='('+ oaqry +') AND publication_year:'+ year if year andnotoaqry.includes':'+ year
Copy file name to clipboardExpand all lines: worker/src/utilities/object.coffee
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,6 @@ P.dot = (o, k, v, d) ->
47
47
48
48
P.flatten= (obj, arrayed) ->
49
49
arrayed?=@params.arrayed?false# arrayed puts objects in arrays at keys like author.0.name Whereas not arrayed shoves them all in one author.name (which means some that don't have the value could cause position mismatch in lists)
0 commit comments