Expand description
Keyword search, filter-panel rules, colour matching and sorting, following Eagle’s behaviour (see the Search and filters chapter of the docs).
Like Eagle, everything is a linear pass over the items; there is no index.
Structs§
- Clock
- The current time and the start of the local day, in ms since the epoch.
- Color
Query - A colour-search query: the colour and Eagle’s accuracy (5..=40, default 20; lower is stricter).
- Date
Filter - One date rule of the filter panel (Date Imported, Date Modified).
- Filter
- The filter panel’s rules. Every active rule must pass.
- Query
- A parsed search-box query.
- Search
Scope - Which parts of an item the search box looks at: Eagle’s Search Scope menu. Everything is on by default. An item’s text content, camera and font names are always searched, whatever the scope.
- SetFilter
- Include/exclude lists for tags or folder ids.
Enums§
- Date
Field - Which timestamp a date rule reads.
- Date
Preset - Eagle’s date presets. Several selected presets are OR-ed.
- Duration
Unit - Units of Eagle’s duration fields.
- Font
Filter - The font filter: activated (installed through Eagle) or not. The sets
hold
installed_font_keys. Items that are not fonts fail both. - Logic
- How the tag and folder filters combine their lists.
- OrderBy
- Eagle’s
orderByvalues. - Shape
- Text
Filter has/no/ keywords for the url and note filters.
Constants§
- DAY_MS
- One day in milliseconds; Eagle steps days by this, ignoring DST.
- TYPE_
GROUPS - The type filter’s built-in groups, after the extensions in its list.
Functions§
- bpm
- An item’s
bpm(audio tempo), when it has a non-zero one. - camera
- The camera Eagle stored for a RAW photo (
rawMetas.camera). - comment_
texts - The text of each of an item’s comments (
comments[].annotation). - custom_
shape_ matches - Eagle’s custom W:H shape: the exact ratio, or every item while either side is unset (0).
- delta_
e00 - CIEDE2000 colour difference (kL = kC = kH = 1).
- delta_
e76 - CIE76 colour difference.
- distinct_
cameras - The camera filter’s options: every distinct camera, sorted as Eagle sorts them (plain code-unit order, so case-sensitive).
- distinct_
font_ families - Every distinct font family, in natural order.
- duration
- An item’s
durationin seconds (audio and video). - duration_
range - The shortest and longest duration among
items, for the duration fields’ placeholders. - eagle_
font_ dir - The folder Eagle copies activated fonts into (macOS:
~/Library/Fonts/EagleApp/). - falcon_
font_ dir - The folder falcon copies the fonts it activates into (macOS:
~/Library/Fonts/Falcon/; on WindowsFalcon\Fontsin%LOCALAPPDATA%; elsewherefonts/Falconin the user’s data folder, which fontconfig reads). falcon never writes to Eagle’s folder, which the user’s Eagle manages; it only reads it. - folder_
index - font_
dirs - The folders whose fonts count as activated: Eagle’s and falcon’s.
- font_
family - The font’s family name (
fontMetas.fontFamily). - font_
key - The key Eagle looks up to tell whether a font is activated:
<postScriptName>_.<ext>. - font_
name - First value of one of a font’s
fontMetasname maps, such aspostScriptNameorfontFamily(Eagle takes the first language key). - installed_
font_ keys - Keys of the activated fonts in
dir, built from file names the way Eagle does:<base>_<.ext lower-cased>. The base only loses the extension when the file name ends with the lower-cased form, as with Node’sbasename. - installed_
font_ keys_ in - Keys of the activated fonts across
dirs(seeinstalled_font_keys): a font in any of them counts as activated. - lab
- sRGB to CIELAB (D65), rounded to integers like the
color-convertpackage Eagle uses. - local_
day_ start - Local midnight at the start of
year-month-day, in ms; for buildingDateFilter::rangefrom a date picker. - local_
month - The local
(year, month)of a timestamp in ms. - medium
- The web-video site of a bookmark (
medium: youtube, vimeo, bilibili). - month_
counts - How many items fall in each local month, newest month first; the options of a date rule’s month list.
- natural_
cmp - Case-insensitive comparison with numbers compared by value, like
Intl.Collator(..., {numeric: true, sensitivity: 'base'}). - rank_
key - A name as Eagle compares it when ranking: decomposed, without combining accents, lower-cased.
- rank_
names - Ranks
namesagainst a typed keyword as Eagle’s tag and folder filter searches and Go to Folder do: the keyword loses its spaces, both sides go throughrank_key, names scoring 0 are dropped and the rest are ordered best first (ties keep their order). Returns indices intonames. (Eagle also scores the pinyin of Chinese names; falcon does not.) - search_
text search_text_inwith every part of the scope on.- search_
text_ in - The lower-cased text Eagle searches for an item: its text content
(
text, kept for text files) and camera (rawMetas.camera), then, asscopeallows, the name,.ext, url (for queries of two or more characters), note and comments; a font’s full name (thezhentry first, elseen) and, for queries of three or more characters, its wholefontMetasas JSON; then tags and the name and description of each folder the item is in. - shape_
counts - How many items the Shape filter’s options would find, as Eagle counts them: only items with a width that are not audio or fonts; each falls in one of the five orientations (panoramic ones are not also counted as horizontal or vertical) and at most one of the four ratios.
- sort
- Sorts items as Eagle does: the key’s own direction (time keys newest
first, others ascending), reversed when
increaseis false. The sort is stable, so ties keep their incoming order. - sort_
manual - Sorts items by their hand-arranged order in
folder(a folder’sMANUALsort):order[folder]compared as text, larger first, withmodificationTimestanding in for items that have no entry, as Eagle does. Reversed whenincreaseis false. Stable. - string_
score - How well
wordmatchestextby Eagle’s quick-search score (the string_score method): 1 for identical strings, 0 when the letters ofworddo not all appear in order, otherwise a score rewarding letters that follow each other, start a word or keep their case, and a shared first letter. Lengths and positions are in UTF-16 units, as in JavaScript. - type_
counts - How many items each option of the type filter covers: by extension, or by site for web-video bookmarks, as Eagle counts them, plus the font, video and audio groups (which Eagle lists but never counts, so its panel hides them).
- type_
excluded - Whether one of the type filter’s excluded types covers an item.
- type_
group - Eagle’s file-type groups for the type filter.
- type_
included - Whether an item passes the type filter’s included types, in Eagle’s
order and with its early answers: its own extension wins; otherwise
the first included
videooraudiogroup decides by itself (so including both video and audio lets only videos through), aurlentry takes bookmarks without a site, a site name its bookmarks, and the Office groups andfontfollow. - type_
options - The type filter’s options: the extensions present, in code-unit order, then the built-in groups not already listed.
Type Aliases§
- Folder
Index - Folder id to (name, description).