Expand description
Item commands that work on an item’s files or on per-item keys Eagle writes for them: Duplicate, Replace with File, changing the extension, Pin to Top inside a folder and marking a palette colour as the item’s primary colour.
On disk these follow Eagle: a duplicate is a copy of the whole
<ID>.info folder under a new id whose metadata.json differs only in
id; a pin is pinned: {<folder id>: <ms>} on the item; a primary
colour is marked: true on one palette entry (Eagle writes false
when it is unmarked again). Originals are never left half written: new
bytes go to a temporary file in the .info folder first and the old
original is kept as <file>.bk until the new one is in place.
Enums§
- Extension
Error - Why an extension typed into the Change Extension dialog is refused.
Constants§
- MARKED_
KEY - The palette key marking an item’s primary colour.
- MAX_
EXTENSION - Longest extension the Change Extension dialog accepts.
- PINNED_
KEY - The item key holding the folders it is pinned in.
Functions§
- all_
pinned - Whether every item is pinned in
folder(Eagle then offers Unpin instead of Pin; it looks at the first 100 of the selection). - check_
extension - Checks an extension as Eagle’s dialog does (letters and digits, at
most
MAX_EXTENSION) and returns it in lower case, as stored. - pinned_
at - When the item was pinned to the top of
folder(ms), if it is. As in Eagle, a zero stamp counts as not pinned. - pinned_
first - Moves the items pinned in
folderto the front, the most recently pinned first; the rest keep their order. Eagle does this inside a folder unless the folder is sorted at random.