Set up an archive

An archive indexes the files under a folder automatically and shows them filtered by attribute. You configure it from the archive detail tabs on the admin screen.

Define axes

An "axis" is one unit of filtering. It can be built either from the folder hierarchy (which level of folder name) or from a word contained in the file name.

"Add axis..." asks for the following.

Field What it is
Axis name The name shown on the filter dropdown. The title template refers to it by this name in braces
Source Either "Folder level" or "Word in file name"
Level number Only for the "Folder level" source. The folder directly under the archive's root is level 1
Match position Only for the "Word in file name" source. Choose "Anywhere", "Start of a word", or "End"
Show as a filter When off, viewers get no dropdown for this axis. The axis is still used for titles and ordering
Build the title even without a value When on, files that match nothing on this axis still get a title, with this axis's part of the template left empty

For files laid out as 2024/session-1/listening.mp3, make "Year" level 1 and "Session" level 2. Something like a subject, which is not a folder of its own but sits inside the file name, belongs to "Word in file name".

The order of the axes is the order their dropdowns appear in. To reorder them, drag the handle at the start of a row. On a wide screen, the arrow buttons on the row move it as well. The new order is saved as soon as you move an axis.

Values

For each axis you can register a dictionary of values: their display names, their order, and the folder or file names they correspond to.

Selecting an axis lists its values. What you can edit depends on the source.

  • Folder level: the values are collected automatically by scanning. Only the display name and the order can be edited.
  • Word in file name: you list the words to match yourself. "Add value" adds a row; put the word contained in the file name under "Raw value" and the name to show under "Display name". Leaving the display name empty is fine — the raw value is shown as it is.

When several words match, the longest one wins. Even when one word contains another, as with math and math1, their order does not matter. Only when matching words have the same length does the upper row win.

Values with the same display name become a single filter choice. For example, if both physics and chemistry are displayed as "Science", choosing "Science" keeps the files of both.

Order of values

The order of the rows in the table is the order of the values. Filter choices and the item list follow it. Values that share a display name are placed where the uppermost of their rows is.

To move a row, drag the handle at the start of the row. On a wide screen, the arrow buttons on its right move it as well. For example, month folders named April, May, … March are listed alphabetically at first. Move them into the order of the school year to list them that way.

A row added with "Add value" goes to the bottom. Saving replaces the whole list with what the table holds at that moment.

Title template

The title shown in the list can be given as a template. Embed an axis value by writing the axis name in braces, as in {Year}.

If even one axis in the template has no value for a file, the file is shown by its file name. Axes with "Build the title even without a value" turned on are the exception: their part is left empty and the title is still built. If no axis in the template has a value for a file, the file is shown by its file name regardless of this setting.

Words that appear on only some files, such as an old-curriculum mark or a cover page, are easier to handle as separate axes. For example, to show kyuusugaku1hyoshi and sugaku1 as "Old Math I (cover)" and "Math I":

Axis Word → display name Match position Build without a value
Curriculum kyuuOld Start of a word On
Subject sugaku1Math I Anywhere Off
Cover hyoshi (cover) End On

The template is {Curriculum}{Subject}{Cover}. With "Start of a word", the kyuu inside tankyuu does not match. Put decorations such as parentheses in the display name rather than the template, so that they do not remain on their own when there is no value.

Rescan

Creating an archive, or saving a new location, also scans the files right away. After that, when you add or remove files under the folder, press the rescan button to update the index. It does not happen automatically.

Publishing items

Indexed files are unpublished by default. You can switch them to published individually or in bulk from the list. Changing the archive's location clears which items you published. Choose them again after the scan that follows the save.