Changes

Jump to: navigation, search

Meaningful filenames

1,649 bytes added, 22:19, 21 July 2008
m
no edit summary
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.
 
Before launching too deep into this lets look at what we want to achieve.
* Understandable filenames
* Computer readable filenames
* A system simple enough to remember
 
To be understandable we need to be able to use full words where appropriate.
 
To be computer readable we need to seperate the parts in a way which a script can easily recognise and, more importantly, in a way which would never occur in real language. So it would be no good to mark a ''name'' section with the word ''name'' if we also can use the word name somewhere in the file where it is not meant to be a marker.
 
To be simple enough to remember the system should not be too complicated, after all GRAMPS is meant to store the real information, this is just a supplement.
 
== What name-parts do we need? ==
It would be nice if we could have files called
Marriage of Mary Angus Jones and Matthew Williams, 2nd Dec 1923 (William Angus is to Mary's right).jpg
 
But this meets only one of the criteria above, that of ''understandable filenames''. How can a computer know who got married? what their surnames are? and so on. And anyway because of the limitations of [[Portable_Filenames]] we can't have file names like that. We have to drop the reliance on capitalisation, drop the spaces, drop the comma and drop the brackets. To be computer readable we need to separate the sections with a system of markers to indicate where the surname, event name etc are.
 
So what sections do we want to be able to identify? Here's a basic list that should be enough for most situation, remember that GRAMPS stores the more complex information, we're just trying to give a useful structure to our files.
* Surname
* Firstname
* Date
* Event type
* Place
* Source
* Note
= GEDCOM based =
Here is a proposed system contributed by [[User:Duncan|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 (--). Two because we can't rely on the marker being recognised as capitalised, so a surname like ''Besour-Jean'' could be mistaken for ''beSOUR-Jean'' and the system thinks that ''SOUR-'' marks a ''source'' section.
{| border="1"
! GEDCOM equivalent
|-
| _PLACPLAC--
| place marker
| london__england
| ?
|-
| _INDVINDV--
| individual marker
| mary_jones
| ?
|-
| _EVNTEVNT--
| event marker
| marriage
| ?
|-
| _DATEDATE--
| date marker
| 2008-12-31
| ?
|-
| _SOURSOUR--
| source marker
| lds_church_website
| ?
|-
| _SURNSURN--
| family name marker
| jones
| ?
|-
| _FIRSFIRS--
| first name marker
| mary
| ?
|-
| _NOTENOTE--
| note marker
| is_that_marys_father_beside_her
Filename
_EVNTEVNT--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:
File name
_SOURSOUR--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:
or it could make the text:
Uk census at , Place: London, england, on 21st March 1840. Source for This is a source connected to Mary Jones
= GRAMPS ID based =
239
edits

Navigation menu