This shows you the differences between two versions of the page.
filenameconventions [2014/07/15 21:47] |
filenameconventions [2014/07/15 21:47] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This file was 00_dancing_standards.txt on the "dancing music" laptop computer. | ||
+ | |||
+ | John C. Nash 2007-3-3 | ||
+ | |||
+ | This file is intended to describe the "rules" that I have | ||
+ | used in trying to build a coherent and useful collection of | ||
+ | English and American dance music and instructional notes. | ||
+ | |||
+ | ===== General ===== | ||
+ | |||
+ | Where possible, I have used plain text files for instructions | ||
+ | and notes. However, "plain text" does differ across operating | ||
+ | systems, though most text editors are smart enough to recognize | ||
+ | the differences. Linux ends lines with a line-feed (LF, ASCII 10) | ||
+ | character. Macintosh uses a carriage-return (CR, ASCII 13), while | ||
+ | Microsoft DOS/Windows uses a two-character pair CR LF (ASCII 13, 10). | ||
+ | |||
+ | The instructional and notes files are not fully commented. I | ||
+ | propose to use tags much as SGML or HTML or XML such as | ||
+ | <notes> | ||
+ | <caller suggestion> | ||
+ | <todo!> | ||
+ | |||
+ | with corresponding ending tags </notes>, </caller suggestion>, | ||
+ | </todo!>. | ||
+ | |||
+ | |||
+ | ===== File names ===== | ||
+ | |||
+ | Because different operating systems have different requirements | ||
+ | for filenames, I have opted to simplify filenames so that the | ||
+ | collection is portable. | ||
+ | |||
+ | - All spaces have been replaced with underscore (_) | ||
+ | - All quotes, commas, semicolons, colons, exclamation, question | ||
+ | brackets, equals, plus, tilda, ampersand etc. have been | ||
+ | removed | ||
+ | ,'";:{}[[]]()=+?!~& | ||
+ | |||
+ | & is replaced with _and_ for safety, since & is used | ||
+ | in a number of web-type applications. | ||
+ | - <todo>I have not scanned for filename length, but there is a | ||
+ | limit in many operating systems. I would like to suggest | ||
+ | a 100 character limit to filenames.<!todo> | ||
+ | |||
+ | In giving files names, I have suppressed "A" and "The" at the | ||
+ | beginning, in fact not included them at all. In the names I | ||
+ | have not capitalized 'a' or 'the'. | ||
+ | |||
+ | |||
+ | ===== Special files ===== | ||
+ | |||
+ | Many dances use lots of different possible music. Linux allows a | ||
+ | "symbolic link" and this allows us to include filenames for the | ||
+ | music easily. The Linux command | ||
+ | |||
+ | ln -s Our_Special_Music.mp3 Our_Funny_Name.music.mp3 | ||
+ | |||
+ | will set up a very small file Our_Funny_Name.music.mp3 that simply | ||
+ | points to Our_Special_Music.mp3. There may be many pointers to | ||
+ | this file, so we don't need multiple copies. Note that it is | ||
+ | important to have the .mp3 name at the end of the link to cause | ||
+ | file browsers (I use Gnome browser in Ubuntu) to recognize that | ||
+ | it is supposed to launch the mp3 player of choice. | ||
+ | |||
+ | The .music. part of the name is my convention to tell me I am | ||
+ | dealing with a pointer (symbolic link) rather than an actual file. | ||
+ | |||
+ | I propose to use "Another_Name.link.txt" in the same way for | ||
+ | dances with multiple names e.g., Chestnut is also called | ||
+ | Dove's Figary. The command to do this was | ||
+ | ln -s Chestnut.txt Doves_Figary.link.txt | ||
+ | |||
+ | Note that the ' has been omitted. | ||
+ | |||
+ | In Windows I believe "Shortcuts" will work, but this is still to | ||
+ | be tried out. Similarly, I don't know how Macintosh OS-X deals with | ||
+ | symbolic links. | ||
+ | |||
+ | ===== Operating system considerations ===== | ||
+ | |||
+ | Linux works with "Permissions" that control who may do what with | ||
+ | files. I have found it important to set the permissions on text | ||
+ | files of dance instructions to 644 mode to ensure double clicking | ||
+ | text files will open a display of the file rather than offering a | ||
+ | dialogue over whether the file is to be "executed". I use 755 | ||
+ | permissions for .mp3 files. I also set file ownership to the special | ||
+ | user "dancing" whose password is "music". | ||
+ | |||
+ | <todo!> More documentation of the setup </todo!> | ||