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.cc_licenses = { 'Attribution 3.0 United States' => 'http://creativecommons.org/licenses/by/3.0/us/', 'Attribution-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-sa/3.0/us/', 'Attribution-NonCommercial 3.0 United States' => 'http://creativecommons.org/licenses/by-nc/3.0/us/', 'Attribution-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nd/3.0/us/', 'Attribution-NonCommercial-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/', 'Attribution-NonCommercial-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/us/', 'Public Domain Mark 1.0' => 'http://creativecommons.org/publicdomain/mark/1.0/', 'CC0 1.0 Universal' => 'http://creativecommons.org/publicdomain/zero/1.0/', 'All rights reserved' => 'All rights reserved' } config.cc_licenses_reverse = Hash[*config.cc_licenses.to_a.flatten.reverse] 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" } config.queue = Sufia::Resque::Queue # 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 # Enables a select menu on the batch upload page to select a collection into which to add newly uploaded files. # Default is false # config.upload_to_collection = false # How many times to retry to acquire the lock before raising UnableToAcquireLockError # Default is 600ms # config.lock_retry_count = 600 # Up to 2 minutes of trying at intervals up to 200ms # How long to hold the lock in milliseconds # Default is 60_000ms # config.lock_time_to_live = 60_000 # milliseconds # Maximum wait time in milliseconds before retrying. Wait time is a random value between 0 and retry_delay. # Default is 200ms # config.lock_retry_delay = 200 # milliseconds # 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"