Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peel Redirects #1769

Closed
5 tasks done
mbarnett opened this issue Jul 21, 2020 · 6 comments
Closed
5 tasks done

Peel Redirects #1769

mbarnett opened this issue Jul 21, 2020 · 6 comments
Assignees

Comments

@mbarnett
Copy link
Contributor

mbarnett commented Jul 21, 2020

Peel Redirects

  • Stub out models identified with bare minimum of attributes.
  • Stub out redirect controller.
  • routes
  • seeds & test data
  • redirects and tests

TLDR;

We will need the following redirects

to /books/*

http://peel.library.ualberta.ca/bibliography/*.html
http://peel.library.ualberta.ca/bibliography/*/*.html
http://peel.library.ualberta.ca/bibliography/*/*/*.html
http://peel.library.ualberta.ca/bibliography/*/*/*/*.html

Then the controller might do something like this:

@book = if Book.find_by(peel_id: 3693, run: 2, part_number: 1).present?
  Book.find_by(peel_id: 3693, run: 2, part_number: 1)
elsif Book.find_by(peel_id: 3693, part_number: 1).present?
   Book.find_by(peel_id: 3693, part_number: 1)
else
  Book.find_by(peel_id: 3693)
end

to /newspapers/*

http://peel.library.ualberta.ca/newspapers/*/*/*/*/
http://peel.library.ualberta.ca/newspapers/*/*/*/*/*/

Then the controller might do something like this:

@newspaper= Newspaper.find_by(publication_code: 'LSV', year: '1967', month: '03', day: '29')

to /images/*

http://peel.library.ualberta.ca/magee/*.html
http://peel.library.ualberta.ca/postcards/*.html

Then the controller might do something like this:

@image= Image.find_by(peel_image_id: 'MGNGBG0001')

to /maps/*

http://peel.library.ualberta.ca/maps/*.html

Then the controller might do something like this:

@map= Map.find_by(map_number: 'M000230')

Analysis

http://peel.library.ualberta.ca/

Books, Pamphlets and Other Materials (for simplicity we'll call the smallest individual unit of these things a Book)

/bibliography/:peel_number.html
i.e. bibliography/4542.html is just metadata about an item
i.e. bibliography/4062.html is a book

peel_number is the item number
image
from Peel's Bibliography of the Prairie Provinces

Henderson’s

bibliography/:peel_number.html
bibliography/:peel_number.:run.html
bibliography/:peel_number.:run.:part_number.html
I.e. bibliography/3178.html - 3178.2.12.html

run_number might not be the correct name for this but in the case of Henderson's the directories from 1908-1919 are bibliography/3178.1.html
part_number also isn't quite accurate. bibliography/3178.1.1.html is the volume for 1908. The first one.

Folk Fest

bibliography/:peel_number.html
bibliography/:peel_number.:part_number.html
i.e. bibliography/10572.1.html

part_number in this case maps to the volume number.

Government Documents

bibliography/:peel_number.:part_number.html
i.e. bibliography/10571.2.html

part_number isn't exactly what's going on here either. For the title there are many volumes and issues (for example v.11 no.2 (Oct 1958)
and v.12 (1959/1960), etc). We have some of the issues (for example we have v.1 no.5 (1 May, 1934) but not v.1 no.1, v.1. no.2, etc). It looks like we have assigned sequential numbers to the issues that we do have (for example v.1 no.5 (1 May, 1934) is bibliography/10571.1, v.2 no.1 (Aug 1934) is bibliography/10571.2 and v.2 no.2 (Nov 1934) is bibliography/10571.3).

Newspaper

newspapers/:publication_code/:year/:month/:day/
I.e. newspapers/LSV/1967/03/29/

publication_code is three letters that represent the newspaper's title. For example: LSV is La survivance
year is the four digit year of publication.
month is the two digit (zero padded) month (i.e. 01 is January - 12 is December) of publication.
day is the two digit (zero padded) day of the month (i.e. 30 days has September...) of publication.

Image

magee/:magee_number.html
i.e. magee/MGNGBG0464.html
postcards/:postcard_number.html
I.e postcards/PC006393.html

magee_number is a with the prefix MG, four letters (i.e. NGBG) and four zero padded numbers. Some pattern examples are MGNGBG[0001-0539] MGNGEN[0001-0360], i.e. MGNGBG0001
postcard_number is a eight digit string with the prefix PC and ends in a six digit zero padded number [000001-032000]

We could keep these intact as peel_image_id or something similar.

Map

maps/:map_number.html
I.e. maps/M000230.html

map_number is a with the prefix M and six zero padded numbers. Some pattern examples are M[000001-000764] i.e. M000230

Excludes

https://github.com/ualbertalib/steele-www | https://steele.library.ualberta.ca/
https://github.com/ualbertalib/railways.library.ualberta.ca | https://railways.library.ualberta.ca/
bibliography/author/3573.html
https://web.archive.org/web/20190423191735/https://folklore.library.ualberta.ca/
https://web.archive.org/web/20190723191748/https://royal.library.ualberta.ca/royal.cfm

More Information

The cocoon sitemap and sitemap were both informative. As was Sarah Severson.

Refinement directive

Refinement needed ahead of implementation: investigate http://peel.library.ualberta.ca/ and document the routes and related information we will need in order to provide a comprehensive set of redirects for the items in Peel. Note that we are not interested in providing redirects for the homepage, New & Updates, About sections, search queries, etc. Just the items themselves.

Need to identify:

  1. Models we will need in Jupiter (not to be confused with the more generic metadata model the Metadata team has put together. We're looking to identify concrete Rails models here: Books, Newspapers, Images, etc) at a high level (eg. Books not pages, Newpaper Issues not individual pages or columns)
  2. Document the pattern of routes we will need to redirect eg) http://peel.library.ualberta.ca/bibliography/3693.html would need to redirect to something like /books/ in standard Rails RESTful routing. For now, we're only looking to redirect pages to the top level of the item they belong to, eg) http://peel.library.ualberta.ca/bibliography/3693/3.html would redirect to the top level book /books/ URL
  3. Document minimal set of specific properties we'll need in order to look up the items for the redirect, eg) Books would need a peel_id so that we could do Book.find_by(peel_id: 3693) in order to find the target for the redirect.
@pgwillia pgwillia self-assigned this Sep 18, 2020
@mbarnett
Copy link
Contributor Author

I assume those are for some older URLs and not current-peel? I can ask in the next biweekly meeting. It might be useful for us to know if those URLs are ever used, but I do not know if Peel has Google Analytics or who might have access to that account.

@sarahseverson
Copy link

Under Books, Pamphlets and Other Materials, you can add serials like

And under Images, there are a few examples of postcard booklet with multiples images (but they way they are structured you could leave them I think(

@pgwillia
Copy link
Member

@mbarnett the redirects I asked about are functional. For GET | http://peel.library.ualberta.ca/cocoon/peel/3693.html I get 301 Moved Permanently and redirected to http://peel.library.ualberta.ca/bibliography/3693.html. Not sure about Analytics. That's not one that I can see.

The only question I have left is if we are going to worry about partial newspaper matches. For example: with something like http://peel.library.ualberta.ca/newspapers/LSV/1967/ are we planning to redirect it? To a search?

Otherwise does this make sense to proceed with?

@mbarnett
Copy link
Contributor Author

I could see us possibly covering that case with something like a redirect to a faceted search, yeah, although that's in the "nice to have" bucket in terms of priorities.

I'll give this a thorough read-through tomorrow and then we can talk next steps.

@pgwillia
Copy link
Member

I assume those are for some older URLs and not current-peel? I can ask in the next biweekly meeting. It might be useful for us to know if those URLs are ever used, but I do not know if Peel has Google Analytics or who might have access to that account.

@mbarnett did you get an answer to this question?

pgwillia added a commit that referenced this issue Dec 1, 2020
Peel Redirects.

We will be moving Peel Prairie Province content (Folk Fest Programs first!) into the digitization subdomain. This will allow us to redirect the old urls to our new structure.

Not included in this PR is complex or voluminous seeds data. I think that might be better suited to when we flesh out the book, newspaper, image and maps models with the full compliment of metadata and attachments.

Related to #1769
What's New

    Stub out models identified with bare minimum of attributes (basically just the old identifiers).
    Stub out redirect controller.
    routes
    redirects and tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants