start new:
tmux
start new with session name:
tmux new -s myname
require 'csv' | |
require 'faraday' | |
require 'faraday_middleware' | |
require 'pry' | |
# Process DOIs from Altmetrics CSV file | |
altmetric_csv_file = 'Altmetric - Mentions - University of York - 2019-04-16.csv' | |
# Store all processed unpaywall responses in new csv file | |
unpaywall_csv_file = 'Unpaywall_York.csv' |
ERROR 06:25:50.697 (RepositoryNodeTypeManager) Node types were read from the system content, and appear to be inconsistent or invalid: repo | |
org.modeshape.jcr.value.ValueFormatException: Error converting "ns010:OriginalFile" from String to a Name | |
at org.modeshape.jcr.value.basic.NameValueFactory.create(NameValueFactory.java:157) | |
at org.modeshape.jcr.value.basic.NameValueFactory.create(NameValueFactory.java:46) | |
at org.modeshape.jcr.cache.document.DocumentTranslator.childReferenceFrom(DocumentTranslator.java:966) | |
at org.modeshape.jcr.cache.document.ImmutableChildReferences$Medium.<init>(ImmutableChildReferences.java:220) | |
at org.modeshape.jcr.cache.document.ImmutableChildReferences.create(ImmutableChildReferences.java:53) | |
at org.modeshape.jcr.cache.document.DocumentTranslator.getChildReferences(DocumentTranslator.java:887) | |
at org.modeshape.jcr.cache.document.LazyCachedNode.getChildReferences(LazyCachedNode.java:449) | |
at org.modeshape.jcr.SystemContent |
/** | |
* Generic connector to route to create initiate Orcid Auth process. | |
* While we are only using the app to read data (in the intial phase) | |
* we need all the scopes: /read-limited, /activities/update and /person/update. | |
* | |
* @return redirect to authorization URL | |
*/ | |
public function connect() | |
{ | |
$this->oauth->setClientId(config('orcid.client_id')) |
# Register DOI metadata first, pass metadata as external @file | |
curl -v -i --basic -u 'BL.USER:PASSXXX' \ | |
--header 'Content-Type:application/xml;charset=UTF-8' \ | |
--data-binary @datacite-example-full-v3.1.xml \ | |
--request POST https://test.datacite.org/mds/metadata | |
# Register DOI with its landing page, pass parameters in external via @file | |
curl -v -i --basic -u 'BL.USER:PASXXX' \ | |
--header 'Content-Type:text/plain;charset=UTF-8' \ | |
--data-binary @example-full-du-test.doi \ |
require 'httparty' | |
# Based on | |
class Datacite | |
include HTTParty | |
base_uri 'https://test.datacite.org' | |
# PRODUCTION # base_uri 'https://mds.datacite.org' | |
def initialize | |
@auth = {:username => Rails.application.secrets.mduser, :password => Rails.application.secrets.mdpassword} |
[vagrant@vagrant-centos70 af-tutorial]$ rails console | |
Loading development environment (Rails 4.1.8) | |
irb(main):001:0> class DublinCoreAsset < ActiveFedora::Rdf::Resource | |
irb(main):002:1> property :title, predicate: RDF::DC.title | |
irb(main):003:1> end | |
TypeError: superclass must be a Class (ActiveSupport::Deprecation::DeprecatedConstantProxy given) | |
from (irb):1 | |
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/console.rb:90:in `start' | |
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/console.rb:9:in `start' | |
from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:69:in `console' |