Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions portality/forms/application_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ class FieldDefinitions:
"name": "deposit_policy",
"label": "Does the journal have a policy allowing authors to deposit versions of their work in an "
"institutional or other repository of their choice? Where is this policy recorded?",
"input": "checkbox",
"input": "radio",
"multiple": True,
"options": [
{"display": "Diadorim", "value": "Diadorim", "subfields": ["deposit_policy_url"]},
Expand All @@ -1478,7 +1478,7 @@ class FieldDefinitions:
{"display": "Open Policy Finder", "value": "Open Policy Finder", "subfields": ["deposit_policy_url"]},
{"display": "Other (including publisher’s own site)", "value": "other",
"subfields": ["deposit_policy_other", "deposit_policy_url"]},
{"display": HTMLString("<em>The journal has no repository policy</em>"), "value": "none", "exclusive": True}
{"display": HTMLString("<em>The journal has no repository policy</em>"), "value": "none"}
],
"help": {
"long_help": ["Many authors wish to deposit a copy of their paper in an institutional or other repository "
Expand Down
29 changes: 29 additions & 0 deletions portality/scripts/4165_multiple_repository_policy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from portality.models import Journal, Application
import csv

if __name__ == "__main__":

RECORDS = [Journal, Application]
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--out", help="output file path")
args = parser.parse_args()

out = "out.csv"

with open(out, "w", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["IN DOAJ", "ID", "DEPOSIT POLICY SERVICES", "TYPE OF RECORD"])
count = 0
for record in RECORDS:
for r in record.iterate():
dp_services = r.bibjson().deposit_policy
if dp_services and len(dp_services) > 1:
try:
if record is Application:
field = r.application_type
else:
field = r.is_in_doaj()
writer.writerow([field, r.id, dp_services])
except AttributeError:
print("Error reading attributes for journal {0}".format(r.id))