-
Notifications
You must be signed in to change notification settings - Fork 78
/
sufia.rb
137 lines (112 loc) · 4.93 KB
/
sufia.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Sufia.config do |config|
config.fits_to_desc_mapping = {
file_title: :title,
file_author: :creator
}
config.max_days_between_audits = 7
config.max_notifications_for_dashboard = 5
config.resource_types = {
"Article" => "Article",
"Audio" => "Audio",
"Book" => "Book",
"Capstone Project" => "Capstone Project",
"Conference Proceeding" => "Conference Proceeding",
"Dataset" => "Dataset",
"Dissertation" => "Dissertation",
"Image" => "Image",
"Journal" => "Journal",
"Map or Cartographic Material" => "Map or Cartographic Material",
"Masters Thesis" => "Masters Thesis",
"Part of Book" => "Part of Book",
"Poster" => "Poster",
"Presentation" => "Presentation",
"Project" => "Project",
"Report" => "Report",
"Research Paper" => "Research Paper",
"Software or Program Code" => "Software or Program Code",
"Video" => "Video",
"Other" => "Other"
}
config.resource_types_to_schema = {
"Article" => "http://schema.org/Article",
"Audio" => "http://schema.org/AudioObject",
"Book" => "http://schema.org/Book",
"Capstone Project" => "http://schema.org/CreativeWork",
"Conference Proceeding" => "http://schema.org/ScholarlyArticle",
"Dataset" => "http://schema.org/Dataset",
"Dissertation" => "http://schema.org/ScholarlyArticle",
"Image" => "http://schema.org/ImageObject",
"Journal" => "http://schema.org/CreativeWork",
"Map or Cartographic Material" => "http://schema.org/Map",
"Masters Thesis" => "http://schema.org/ScholarlyArticle",
"Part of Book" => "http://schema.org/Book",
"Poster" => "http://schema.org/CreativeWork",
"Presentation" => "http://schema.org/CreativeWork",
"Project" => "http://schema.org/CreativeWork",
"Report" => "http://schema.org/CreativeWork",
"Research Paper" => "http://schema.org/ScholarlyArticle",
"Software or Program Code" => "http://schema.org/Code",
"Video" => "http://schema.org/VideoObject",
"Other" => "http://schema.org/CreativeWork"
}
config.permission_levels = {
"Choose Access" => "none",
"View/Download" => "read",
"Edit" => "edit"
}
config.owner_permission_levels = {
"Edit" => "edit"
}
# Enable displaying usage statistics in the UI
# Defaults to FALSE
# Requires a Google Analytics id and OAuth2 keyfile. See README for more info
config.analytics = false
# Specify a Google Analytics tracking ID to gather usage statistics
# config.google_analytics_id = 'UA-99999999-1'
# Specify a date you wish to start collecting Google Analytic statistics for.
# config.analytic_start_date = DateTime.new(2014,9,10)
# Enables a link to the citations page for a generic_file.
# Default is false
# config.citations = false
# Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)
# config.temp_file_base = '/home/developer1'
# Specify the form of hostpath to be used in Endnote exports
# config.persistent_hostpath = 'http://localhost/files/'
# If you have ffmpeg installed and want to transcode audio and video uncomment this line
# config.enable_ffmpeg = true
# Sufia uses NOIDs for files and collections instead of Fedora UUIDs
# where NOID = 10-character string and UUID = 32-character string w/ hyphens
# config.enable_noids = true
# Specify a different template for your repository's NOID IDs
# config.noid_template = ".reeddeeddk"
# Store identifier minter's state in a file for later replayability
# config.minter_statefile = '/tmp/minter-state'
# Process for translating Fedora URIs to identifiers and vice versa
# config.translate_uri_to_id = ActiveFedora::Noid.config.translate_uri_to_id
# config.translate_id_to_uri = ActiveFedora::Noid.config.translate_id_to_uri
# Specify the prefix for Redis keys:
# config.redis_namespace = "sufia"
# Specify the path to the file characterization tool:
# config.fits_path = "fits.sh"
# Specify how many seconds back from the current time that we should show by default of the user's activity on the user's dashboard
# config.activity_to_show_default_seconds_since_now = 24*60*60
# Sufia can integrate with Zotero's Arkivo service for automatic deposit
# of Zotero-managed research items.
# config.arkivo_api = false
# Specify a date you wish to start collecting Google Analytic statistics for.
# Leaving it blank will set the start date to when ever the file was uploaded by
# NOTE: if you have always sent analytics to GA for downloads and page views leave this commented out
# config.analytic_start_date = DateTime.new(2014,9,10)
config.geonames_username = ''
# If browse-everything has been configured, load the configs. Otherwise, set to nil.
begin
if defined? BrowseEverything
config.browse_everything = BrowseEverything.config
else
Rails.logger.warn "BrowseEverything is not installed"
end
rescue Errno::ENOENT
config.browse_everything = nil
end
end
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"