Sequence Archives

Storing Sequences

The web site provides archives of aerobatic sequences. I created a special node type, Sequence, to hold an individual sequence file. The PDF to ImageField module automatically generates a thumbnail of the first page of the PDF file when a Sequence node is saved (except in the case of bulk uploads, see below). For the sake of consistency, sequence files must be in PDF format. Each Sequence node also contains an optional Year field that can be used in sorting and filtering.

Viewing

A Drupal view (creatively named "Sequences") allows users to browse and filter sequence files.

Filenames

To maintain a semblance of order with the sequence file names, I've established a naming convention:

  • Each filename will start with a four-letter category abbreviation: PRMP (for Primary Power), SPTP, SPTG, INTP, INTG, ADVP, ADVG, UNLP, or UNLG.

  • That's followed by the sequence type, Known, Free, Unk, FreeKnown or FreeUnk.

  • Knowns are then followed by the year, e.g. INTG-Known-2012.pdf.

  • Free programs include the pilot's last name and the year, e.g. ADVP-Free-Smith-2014.

  • Unknown programs include a three-digit sequence number (needed because there is a different Unknown for each contest week) and the year, e.g. INTP-Unk123-2005.pdf.

Uploading

Brian Howard supplied nearly 800 Unknowns, creating a big logistical challenge in terms of saving each of those PDF files to its own Sequence node. I used a module called Bulk Media Upload to accomplish this. The process is a little cumbersome, but it beats the heck out of adding dozens/hundreds of sequences individually! Here are the steps:

  1. Navigate to /admin/content/file/bulk_upload
  2. Leave the Title field alone
  3. Add the files to the Bulk Media Upload area, either by dragging them from a Windows Explorer / Mac Finder screen, or by clicking on Add Files at the bottom of the Bulk Media Upload area.
  4. Important: Click on Start Upload at the bottom of the Bulk Media Upload area and wait for the uploads to complete. If you don't do this now, the files will not upload when you submit the form!
  5. Fill in the Year, Category, and Type of Sequence selections further down the page. Note: You can't specify different years, categories, and sequence types (Known/Free/Unknown), but you can leave one or more of those attributes blank. See "Tweak Sequences" below for instructions on how to handle that sort of thing.
  6. Click on the Generate Node entities button. If you're adding a lot of files, be patient, it can take a while.

The good news: the sequences are now safely archived in the iac.org server. The bad news: this bulk upload process doesn't generate the thumbnail images. The so-so news: this is fixable. Read on...

I created a view called Tweak Sequences that can perform mass updates -- e.g. setting the Year field -- with the help of the Views Bulk Operations module. Any node update will trigger generation of the thumbnails, so all we need to do is update the newly uploaded sequence nodes as follows:

  1. Navigate to the Tweak Sequences screen.
  2. Under the Title area, select an operator (Starts with, Contains all words, etc.) that will be useful in isolating the newly uploaded sequences. For example, if you just uploaded a bunch of 2012 Intermediate Power Free programs, you could use Contains all words and then type INTP Free 2012 in the text box below.
    • Note: It's OK if your title filter picks up some extra items.
  3. Click the Apply button.
  4. Double-check the list of sequences to make sure you got the ones you want.
  5. Under Operations, select Modify entity values.
  6. Check the box labeled Select all items on this page.
  7. Click on the Execute button.
  8. Click on a check box (Year, Category, or Type of Sequence) whose value should be the same for all of the sequences you've selected.
  9. Enter or select the corresponding value. E.g., if you selected sequences from 2013, enter the year as 2013.
  10. Click the Next button.
  11. Click the Confirm button.

Even though you're overwriting the year, category, or sequence type with the same value it had before, updating the Sequence node triggers the PDF to ImageField module to generate the thumbnail -- a step that is unfortunately not performed by the bulk upload.

And with that, you're done!