Jump to: navigation, search

Meaningful filenames

5,359 bytes added, 10 February
See also: add reference
After thinking Article about naming files in a meaningful way. Naturally files should have unique names so we don't end up with several files with the limits to same or very similar names. This article takes file naming one step further by looking at how we the file name itself can structure our files and folder (see [[Portable_Filenames]]) carry useful information about the next step is developing a semantic controlled vocabularyfile.
Before launching too deep into = Why meaningful filenames = If all names are kept unique why also try to embed meaning in the file name itself? Here are some approaches to managing information about information which which you might recognise:* File names and directory hierarchies can help describe the contents. By placing a picture called ''second birthday.jpg'' in a directory called ''My son James'' we have stored data (the picture relates to James' second birthday) about the data (the picture of the birthday party).* Data about data (called ''metadata'', ([ Wikipedia's ''Metadata'' entry]) can also be stored inside the file it describes, for example:** HTML, the language of webpages, uses tags like ''<span style="normalText">Example</span>''. Here the meta data describes the style of the text, ie: ''Example'' is ''normalText''** EXIF ([ Wikipedia's ''EXIF'' entry]) is a way of storing meta data in image files, like when the photo was taken and what type of camera was used. * Database systems (Gramps is a database system for genealogy) can store a huge amount of data about data. They are very efficient at this lets look at job and very powerful.** Google Search uses a database to remember what web pages are about, and tells you when you ask. So why not use one of those options?  * EXIF is great, but only for some types of files (not supported in JPEG 2000, PNG, or GIF), there are lots of different systems for different types of files. People are working hard to improve this situation all the time. * HTML is great if you can store all your information as HTML files, but HTML files cannot contain other files, they just point to them. So we want to achieve'd basically end up making a website about our files.* Understandable A database, well we already use this when we use Gramps. The Gramps database stores lots of information about the files and records it records. But Gramps does not store the actual file inside the database. If the connection between Gramps and the data it is describing is broken, then the files are just files. They contain no more information than they did when you first ''imported'' them into Gramps. This system of ''meaningful filenames'' has the following aims:* Computer readable filenamesPreserving enough metadata to give the file's content context without Gramps* Creating file names normal people can understand so they can see what the file is about without Gramps* Creating file names which a computer can process easily so files need to be batch processed and metadata can be read directly from the file name without possible confusion* A Creating a system simple enough to rememberuse all the time for every file
To be understandable we need to be able to use full words where appropriate.
To be computer readable we need to seperate separate 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 Gramps is meant to store the real information, this is just a supplement.
== What's in a name? ==
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]] ''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 Gramps stores the more complex information, we're just trying to give a useful structure to our files.
* Surname
* Firstname
== Source events ==
The GEDCOM 5.5 standard defines so few events as to be useless. The GRAMPS Gramps XML schema defines no events as these can be made by the user. This all seems fair enough since events are highly culture based. The situations where I think a set of events should be defined are those which will be connected with source records. GEDCOM has a reasonable group of those but they are heavily based in western christian culture. The solution must be language and culture dependent. Here's my list:
'''marriage''' is for an actual marriage event and all the associated documentation, including possible divorce and separation documentation.
This could be parsed (by GRAMPSGramps?) as the description:
'''Event:''' Marriage
This could be parsed (by GRAMPSGramps?) as the description:
'''Source:''' Census
Over at Wikipedia there is a good explanation of a [ SWOT analysis].
{| border="1"{{prettytable}}
! Aspect
= GRAMPS Gramps ID based =
{{man note|This is another attempt by [[User:Duncan|Duncan Lithgow]] to find a good system. It is not finshed finished so feel free to add comments and correct any obvious mistakes.}}
Here's the records we'll use as examples. They involve Mary Agnes Williams (daughter of John Williams and Anna Matthews). She married Anders Sørensen (son of Anders Sørensen and Anna ?) and they had a daughter Anna Sorensen, note the spelling change.
== Justification ==
Needs expanding{{stub}}
== Aims ==
== Record types ==
The record types tell us what the record is about. GRAMPS Gramps ID's use the first character to denote the type of item the ID refers to. Sticking to something already thought and taking the most relevant ones to stored records these can be used as the following tags for record types:
* I-- Individual
* family name is their surname before marriage, but including deed pool changes, MacArthur for example
* given name is their official first name
* uid is a unique identity, in this example the (original) GRAMPS Gramps ID of the media file
* source date is the date in ISO 8601 format when the information left the people or organisation responsible for it
* event date is the date in ISO 8601 format when the event occured occurred or started. YYYY-MM-DD, ie. 2008-12-28
* event type is a noun describing the event, chosen from a list of event types, ie: marriage
* title is the name of a document (book, letter, census) or object (gravestone, heirloom), ie. williams__arthur_headstone
# <note>-- (usually not needed)
# <uid> (a Unique ID, possible derived from the gramps ID)
Here's a version of the naming structure for quick reference.
== Examples ==
* Marriage certificate: ''S--marriage_certificate--jensen__williams--anders__mary_agnes--uk__london--1823-12-02--_--00864.pdf''
* Portrait: ''I--portrait--williams--mary_agnes--uk__london--1823-12-03--wedding_portrait--000967.jpg''
= Source based =
One possible shortcoming of using an event and/or individual based naming strategy is that it could "clash" with the relation between a filename and the source. This only applies to filenames that are a representation of a specific part of a source.
An example: having found the baptism record of Anna in page 51v of the 1843-1850 Baptism book of a certain Church we save the image (which displays pages 50v and 51f, i.e. it is an image of the "open book") and name it something like BAP--Anna--1850.png (just an example, any individual and role based mechanism will yield similar results). This works fine and allows one to easily extrapolate information from the file name.
However, we latter find that in the exact same page, but a few paragraphs below, we have the baptism record of another individual, from another part of the family tree. While we can simply use the original file it wouldn't convey the right information. We can duplicate the file, but that doesn't make much sense, especially since when adding the file to the Source gallery we would end up with a duplicate, which makes little sense.
One way to deal with this is to use a purely source-based approach in naming the files. The downside is that event and individual information can't be gleaned by looking at the file name - one would have to use Gramps itself to maintain the appropriate relations, which is after all something that is part of the source referencing work that should be done. On the other hand, and when talking about Sources that are books, it allows for easy grouping of content related to the same source, e.g. all the relevant pages on a certain book. An example filename would be "PBL--BAP3--F51-52.png", where PBL is the short name of the source author and BAP3 the short name of the specific source. Longer, more descriptive filenames could be used by using full names instead of codes.
Obviously this method is limited in scope to some kinds of sources, and doesn't make sense for naming photos or documents that aren't part of a larger source (e.g. an ID card).
A really good article on why and how to implement this kind of naming system is [ Hierarchical Sources] by Tony Proctor.
= See also =
* [[Organise_your_recordsOrganise your records]]* Gramps User maillist thread: [[Portable_Filenames] Organizing media files]
= External links =
* [[ File Naming Conventions for Digitally-stored Images]]
* [ Metadata] at Wikipedia - data about data
* [ Meta tags] at Wikipedia
* [ File naming] at
* [ File Naming / Organization Methods?] from [ What do I know?]

Navigation menu