Re: [Archivesspace_Users_Group] EAD Importer and DAOs

2018-05-24 Thread Timothy Dilauro
Hi Brian,

I don't think it's a good idea to change the data model just to avoid imports 
failing, though there may be other rationales that result in such a change.

In the mean time, it might be useful to write some XSLT or some other custom 
code to perform sanity checks relative to ASpace restrictions ahead of EAD 
import attempts. In that manner, those non-conformant captions (and anything 
else you check on) could be tweaked before import.

Cheers,
~Tim

> On May 23, 2018, at 2:39 PM, Brian Harrington  
> wrote:
> 
> 
> Currently when importing an EAD, s are used to create digital objects.  
> As part of this process, the @title attribute is used for both the digital 
> object title, and the caption under file versions.  I've recently run into a 
> fun issue with s with @titles longer than 255 characters.  These titles 
> are OK for digital_object:title, which is VARCHAR(8704) but too long for 
> file_version:caption, which is VARCHAR(255).  So the import fails.
> 
> Should this be considered a bug?  If it is, and if one were theoretically 
> considering a PR, would it make more sense to harmonize the length of the 
> title and caption, or truncate the caption to 255 characters?  My inclination 
> is just to increase the maximum length of captions, and rely on people to 
> show restraint, but I know that other people might have different opinions.
> 
> Thanks,
> 
> Brian
> 
> --
> Brian Harrington
> Migration Specialist
> LYRASIS
> brian.harring...@lyrasis.org
> skype: abbistani
> 
> 
> ___
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group@lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
> 



signature.asc
Description: Message signed with OpenPGP
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] Southern California Regional Forum -- Save the date! June 28

2018-04-12 Thread Timothy Dilauro
Hi Christine,

I wonder if organizers might consider providing a remote access option for 
these fora in the future. I was looking at the upcoming Boston event and there 
are a number of topics that I think would be of interest to others outside that 
region (and possibly to some within who don't have the ability to travel for 
whatever reason). I suspect that future events would draw similar interest.

Cheers,
~Tim

> On Apr 12, 2018, at 1:18 PM, Christine Kim  wrote:
> 
> Hi everyone,
> 
> We’re happy to announce our next Regional Forum, this time in Southern 
> California!
> 
> Please save the date for Thursday, June 28, 2018. The forum will be held at 
> the University of California, Irvine, which nests happily in Orange County, 
> between the major cities in Los Angeles and San Diego. Special thanks to our 
> hosts at the UCI Libraries for generously sponsoring this program.
> 
> Program details and registration are forthcoming. The regional forums are 
> opportunities for our diverse ArchivesSpace members to meet up more locally 
> to share and learn from each other through workshops, focused discussion 
> sessions, and presentations. We look forward to having the content shaped by 
> our community.
> 
> Please let me know if you have any questions. Thanks!
> 
> Best wishes,
> Christine Kim
> 
> Christine Kim
> ArchivesSpace Community Engagement Coordinator
> christine@lyrasis.org 
> 800.999.8558 x4820
> 404.592.4820
> Skype: ckim.lyrasis
> 
> ___
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group@lyralists.lyrasis.org 
> 
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group 
> 


signature.asc
Description: Message signed with OpenPGP
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] Overriding/Extending the new public interface in 2.2.0

2018-01-29 Thread Timothy Dilauro
You can control the timing of the loading of your extensions by placing them in 
an "config.after_initialize" block in plugin_init.rb. For the 1.5.4 PUI, I used 
the following block:

ArchivesSpacePublic::Application.config.after_initialize do
end

In addition, you can ensure that each needed module/class is loaded by 
mentioning it before you attempt to extend it:

RecordsController
class RecordsController
...
end

See 
https://github.com/jhu-archives-and-manuscripts/aspace_plugin-jhu_public/blob/master/public/plugin_init.rb
 


Cheers,
~Tim

> On Jan 29, 2018, at 11:25 PM, Majewski, Steven Dennis (sdm7g) 
>  wrote:
> 
> 
> I had a need to look into this issue of overriding existing routes or 
> controllers again.
> I was trying to make repositories#index be the default landing page instead 
> of welcome#show .
> 
> Adding this to plugins/local/public/routes.rb and loading those routes from 
> plugin_init.rb appended the new route to the end of the routes. This was 
> visible when I ran ‘rake routes’ on the public rails app. However routing 
> takes the first match from the route table, so the default ‘welcome@show’ was 
> what was run.
> 
> I haven’t yet figured out if there is any way to add a new route to the start 
> of the routes table rather than at the end.
> 
> I unsuccessfully tried several different methods of overriding welcome#show.
> During that process, I also stuck in a binding.pry breakpoint in 
> plugins/local/public/plugin_init.rb and verified that ApplicationController 
> is not in scope. In fact, I suspect that since it is being loaded as an 
> initializer, the controllers may not have been loaded and defined at that 
> point.
> 
> What finally worked for me was:
> 
> plugins/local/public/controllers/my_controller.rb:
> 
> class WelcomeController
>   def show
> redirect_to :controller => 'repositories' , :action => 'index'
>   end
> end
> 
> 
> This did successfully override welcome#show so that going to 
> http://localhost:3001/  redirects to 
> http://localhost:3001/repositories  and 
> show the list of repositories.
> 
> ( In this case, I’ve also overridden views/repositories/index.html.erb in the 
> the plugin so that it also includes the search form above the repository 
> list. )
> 
> 
> What I don’t completely understand is that if the same file is named 
> plugins/local/public/controllers/welcome_controller.rb, it does not seem to 
> work.  Other arbitrary names, like “x_controller.rb” for example, do work. 
> Just not “welcome_controller.rb” . It would appear that the existing 
> application welcome controller may keep this file from loading. I just added 
> a binding.pry breakpoint and renamed that file and verified that it never 
> executes when named “welcome_controller.rb” .
> 
> 
> So you might try something similar. Routes or plugin_init are probably not 
> required if you’re just extending existing controller.
> Add a file to the plugin controller directory that redefines resource 
> controller, but give it a name that doesn’t duplicate any existing controller 
> file.
> 
> If you try to inherit from and extend an existing controller, you may be able 
> to add a new route pointing to it, but I don’t know a way to change the 
> existing route to point to a the new class.
> 
> Let us know if you find something that works!
> 
> 
> — Steve Majewski
> 
> 
> 
> 
>> On Dec 22, 2017, at 3:07 PM, Flanagan, Patrick > > wrote:
>> 
>> I think I just encountered that sort of issue. From public/plugin_init.rb 
>> both ResourcesController and ApplicationController don't appear to be in 
>> scope; so I can't even replace it let alone extend it. That, or I'm supposed 
>> to use require to get at the specific classes - but I haven't been able to 
>> do so. I think it's one of the intricacies of Rails that is escaping me.
>> 
>> Ideally, for an identifier of A/B/C/D on a given resource, I wanted the 
>> breadcrumb to link back to A - B - C - D - This Resource, a behavior that's 
>> more similar to Archon, and more useful than the default behavior of simply 
>> linking to the repository top itself, I think.
>> 
>> ~Patrick Flanagan
>> KLN Applications Administrator
>> Keystone Library Network Hub
>> From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
>>  
>> > > on behalf 
>> of Majewski, Steven Dennis (sdm7g) > >
>> Sent: Thursday, December 21, 2017 4:40:29 PM
>> To: Archivesspace Users Group
>> Subject: Re: [Archivesspace_Users_Group] Overriding/Extending the new public 
>> interface in 2.2.0
>> 
>> 
>> I remember running into something like this where the problem was Rails