Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
Browse files Browse the repository at this point in the history
…734_reformat_the_broken_links_report
  • Loading branch information
RK206 committed Dec 5, 2023
2 parents 116d668 + 47ba98c commit fb79a15
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions portality/scripts/231127_withdrawn_journals.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
}
}

IN_DOAJ = {
"query" : {
"bool" : {
"must" : [
{"term" : {"admin.in_doaj" : True}}
]
}
}
}

if __name__ == "__main__":

import argparse
Expand All @@ -33,15 +43,24 @@
"P-ISSN"
])

for journal in Journal.iterate(q=NOT_IN_DOAJ, keepalive='5m', wrap=True):
in_doaj_issns = set()
for journal in Journal.iterate(q=IN_DOAJ, keepalive='5m', wrap=True):
bibjson = journal.bibjson()
in_doaj_issns.add(bibjson.get_one_identifier(bibjson.E_ISSN))
in_doaj_issns.add(bibjson.get_one_identifier(bibjson.P_ISSN))

writer.writerow([journal.id,
bibjson.title,
bibjson.get_single_url(urltype="homepage"),
bibjson.get_one_identifier(bibjson.E_ISSN),
bibjson.get_one_identifier(bibjson.P_ISSN),
])

for journal in Journal.iterate(q=NOT_IN_DOAJ, keepalive='5m', wrap=True):
bibjson = journal.bibjson()
eissn = bibjson.get_one_identifier(bibjson.E_ISSN)
pissn = bibjson.get_one_identifier(bibjson.P_ISSN)
if (eissn not in in_doaj_issns and pissn not in in_doaj_issns):
writer.writerow([journal.id,
bibjson.title,
bibjson.get_single_url(urltype="homepage"),
eissn,
pissn,
])



Expand Down

0 comments on commit fb79a15

Please sign in to comment.