Meaningful filenames
After thinking about the limits to how we can structure our files and folder (see Portable_Filenames) the next step is developing a semantic controlled vocabulary.
GEDCOM based
Here is a proposed system contributed by Duncan Lithgow.
First I want to be able to split the file name up into pieces which each have markers. This makes it easy for me to manipulate them with utilities for searching and renaming file. Especially it makes it easy for me recover broken file paths with the GRAMPS media manager.
Each marker starts with an underscore (_) and ends with two hyphens (--).
Marker | Meaning | Example value | GRAMPS XML equivalent | GEDCOM equivalent |
---|---|---|---|---|
_PLAC-- | place marker | london__england | ? | ? |
_INDV-- | individual marker | mary_jones | ? | ? |
_EVNT-- | event marker | marriage | ? | ? |
_DATE-- | date marker | 2008-12-31 | ? | ? |
_SOUR-- | source marker | lds_church_website | ? | ? |
_SURN-- | family name marker | jones | ? | ? |
_FIRS-- | first name marker | mary | ? | ? |
_NOTE-- | note marker | is_that_marys_father_beside_her | ? | ? |
In order for the file name to be parsed as meaningful text I think some we also would need
Marker | Description | Example | Rendering |
---|---|---|---|
_ | space indicator | mary_jones | mary jones |
__ | comma followed by space indicator | jones__mary | jones, mary |
Examples
Image file
Filename
_EVNT--marriage_SURN--jones_FIRS--mary_angus__SURN--williams_FIRS--matthew_DATE--1923-12-02_NOTE--william_angus_to_right_of_mary.jpg
This could be parsed (by GRAMPS?) as the description:
Event: Marriage Surname: Jones Firstname: Mary Angus Surname: Williams Firstname: Matthew Date: 2nd Jan, 1923 Note: William angus to the right of mary
or it could make the text:
Mary Angus Jones and Matthew Williams, marriage 2nd Jan 1923. (William angus to the right of mary)
Source text
File name
_SOUR--uk_census_EVNT--census_PLAC--london__england_DATE--1840-03-21_SURN--jones_FIRS--mary.pdf
This could be parsed (by GRAMPS?) as the description:
Source: Uk census Place: London, england Date: 21st March, 1840 Surname: Jones Firstname: Mary
or it could make the text:
Uk census at London, england, 21st March 1840. Source for Mary Jones
GRAMPS ID based
This is another attempt by Duncan Lithgow to find a good system.
GRAMPS ID's use the first character to denote the type of item the ID refers to. This could be converted to work in filenames.
Marker | Description | GRAMPS ID equivalent |
---|---|---|
P-- | place | P |
I-- | individual | I |
F-- | family | F |
E-- | event | E |
S-- | source | S |
O-- | media object | O |
R-- | repository | R |
N-- | note | N |
Extending this idea a bit with some more markers we could get a filename like:
E--marriage_SN--jones_FN--mary_angus_SN--williams_FN--matthew_DT--1923-12-02_N--william_angus_to_right_of_mary.jpg
This can store the same information as in the GEDCOM based schema.