closed livingstoneonline/livingstoneonline#139

Directory structure for Drupal images

awisnicki

I've reviewed the files.csv file and would like to go with the following structure:

1) Create six main directories, numbered, that correspond to the six sections of the site.

About-this-Site In-His-Own-Words, Spectral-Imaging

etc.

2) In each section, create sub-directories for the pages that constitute that section. Into those sub-directions, put the images that go with each given page. If an image is used for two or more different pages, put separate copies of the image in each relevant sub-directory.

So, for instance, an image from a page in the In His Own Words section, would have the following path:

In-His-Own-Words/The-Livingstone-Online-Digital-Collection/liv_012043_0001-article.jpg

3) In the case of critical edition page, add one more layer of sub-directories.

Spectral-Imaging/Livingstone's-1870-Field-Diary/Project-Team/liv_000073_0002-article.jpg

4) Finally, for images that are not linked to any given page, create one subdirectory at the top level (same level as the six main sections) and call that directory "Unlinked." (On prod, you will now find some images that are unlinked to any given site page in just this way.)

awisnicki

Also, note that for ZIP and PDF files, I'd like to follow a slightly different process. For those files, put them in two top level directories "ZIPs" and "PDFs" (same level as "Unlinked" and the six main sections). All relevant pages, should then point to these two directories.

In other words, zip and pdf files should not be duplicated and distributed into individual page directories.

awisnicki

Also, one question. I see you in your CSV file that there are many instances, where a line is duplicated and the same page points to the same image twice:

6fb642c6-5b13-41a6-a99f-462bc4fcef2e Overview of Processing Objectives /sites/default/files/liv_016141_0001.jpg 6fb642c6-5b13-41a6-a99f-462bc4fcef2e Overview of Processing Objectives /sites/default/files/liv_016141_0001.jpg

This does not always happen, but only sometimes. Can you explain this?

nigelgbanks

Also, one question. I see you in your CSV file that there are many instances, where a line is duplicated and the same page points to the same image twice:

6fb642c6-5b13-41a6-a99f-462bc4fcef2e Overview of Processing Objectives /sites/default/files/liv_016141_0001.jpg 6fb642c6-5b13-41a6-a99f-462bc4fcef2e Overview of Processing Objectives /sites/default/files/liv_016141_0001.jpg

This does not always happen, but only sometimes. Can you explain this?

To make sure we got all references to all files, we extracted them from links (<a> tags) and also image tags (<img>) in this case and in others you have a file embedded in the image tag is surrounded by a link tag that points to the same file, so it's referenced twice and as such gets extracted twice.

awisnicki

Ah, that's quite useful to know, then. As I think some images that should have both <a> and <img> don't. This will help me identify them.

nigelgbanks

I'm putting this on hold until we're ready to do the migration to production as I'm going to have to do some of this manually.

awisnicki

OK, no problem. I was thinking along the same lines, as I've been adding images over the last few weeks, so we'd want to make a pause while you set this up.

nigelgbanks

Just a note, the TEI makes references to files that exist on the server, these need to be accounted for and be left in place, otherwise they will break the transcription displays.

awisnicki

OK, great. Thanks for letting me know. Can you generate a list of such files for me and, perhaps, which TEI files are referencing them? I suspect that it's just a handful of TEI files, so this is something I could sort out myself down the road and you can leave all relevant files in place for now.

nigelgbanks

Deployed to stage, you can browse by clicking on your user name in the top right hand corner then selecting "File Browser", images within the section pages will refer to these new locations.

nigelgbanks

<img width="1440" alt="screen shot 2017-09-13 at 08 17 16" src="https://user-images.githubusercontent.com/487373/30364412-0953aa16-985c-11e7-8dc0-357acb16dc4a.png">

awisnicki

A few questions about File Browser

I see a few empty folders here: css, ctools, js, materials, pictures, print_pdf, schemas. Are these needed? Can these be removed?

How is the styles folder being used?

I also see a folder for Filedepot, but no files in it. However, I see that the "private" folder has the Filedepot files. How will this work? I see that I can't access it via the usual method of just adding "filedepot" to the end of the home page URL.

Where are the ZIP and PDF files, and unlinked images, which I'd asked to have in separate directories above?

Above, I'd asked to have critical edition pages be in one more set of subdirectories. So, for instance, in the main spectral imaging directory, you'd just have an 1870 Field Diary directory, and then all the pages for that edition would be in subdirectories of the main one. Since you haven't set that up, I'm guessing that's not feasible?

Is there a way to upload more than one file at once?

A few theming/functional questions

Can we add a search box?

Please refresh my memory on this. I will have a local copy of all the files here and will be able to sync with the online version. Is that correct?

nigelgbanks

I see a few empty folders here: css, ctools, js, materials, pictures, print_pdf, schemas. Are these needed? Can these be removed?

Drupal will create some folders and files, it's best not to delete them, lest they cause some bug.

How is the styles folder being used?

These are generate by Drupal, it applies styles for particular views of images (croping or resizing images, etc). Best not to edit this folder directly.

I also see a folder for Filedepot, but no files in it. However, I see that the "private" folder has the Filedepot files. How will this work? I see that I can't access it via the usual method of just adding "filedepot" to the end of the home page URL.

Filedepot is a tool that is no longer in use so these folders could be deleted safely. The private folder is a Drupal folder for non-public files (files that are only accessible to authenticated users). The files in the folder "private/filedepot" are not referenced by any of the section pages, it's likely they are not used anywhere, and could be safely deleted, unless of course you wish to leave them on as a sort of backup).

Where are the ZIP and PDF files, and unlinked images, which I'd asked to have in separate directories above?

The staging server does not have enough space for all of these files so they are stripped out. They will be available on production though.

Above, I'd asked to have critical edition pages be in one more set of subdirectories. So, for instance, in the main spectral imaging directory, you'd just have an 1870 Field Diary directory, and then all the pages for that edition would be in subdirectories of the main one. Since you haven't set that up, I'm guessing that's not feasible?

This is not feasible. You can move them around afterwards manually though (after the move to production) if you see fit.

Is there a way to upload more than one file at once?

There is now, I've just added this functionality.

Can we add a search box?

Yes I've just added this functionality.

Please refresh my memory on this. I will have a local copy of all the files here and will be able to sync with the online version. Is that correct?

We can set that up for production, after the move.

awisnicki

Re: Filedepot, I think then that we can delete the main Filedepot directory (that is empty).

The private folder with Filedepot files, however, I'd like to keep. Indeed, this is not referenced anywhere in the site, but include documentation, such as permissions etc. Before we overwrite prod, I'll make sure I have all the Filedepot files from prod (what's on private at present is a bit disoraganized).

Re: ZIP & PDF sounds good.

Re: Critical ed subdirectories, no prob.

Re: Upload and Search functionality, look good. For search, can we have partial search, i.e., so that if I enter only the first part of the name I get some results? Right now, it looks like it's only exact match or nothing.

Finally, note that the theming on upload and search is slightly off, see below.

screen shot 2017-09-21 at 12 15 32 screen shot 2017-09-21 at 12 15 36

nigelgbanks

Re: Upload and Search functionality, look good. For search, can we have partial search, i.e., so that if I enter only the first part of the name I get some results? Right now, it looks like it's only exact match or nothing.

That would be out of scope, I didn't implement this functionality; It's simply what's provided by a contrib module.

Finally, note that the theming on upload and search is slightly off, see below.

Updating the look would be out of scope this is only viewable by you (it's not public). We are not maintaining or modifying this module.

awisnicki

Ah-ha. No prob. I suspect that once the files are on my local machine, I'll probably be accessing/searching, etc. them that way anyway, so all should be good. Thanks again for your other work on this ticket.

awisnicki

I have one more question about File Browser, so am reopening this ticket. I see that along the top there are a few features that we don't need: Thumbnails and Resize. Can you easily turn these two options off and/or hide them? The "create thumbnails" option on "Upload" could also be turned off.

nigelgbanks

Fortunately there was some settings which allowed me to remove them.

awisnicki

OK, looks great. Thank you!