'\" t .\" Title: pytagsfs .\" Author: Forest Bond .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 2009-12-14 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "PYTAGSFS" "1" "2009\-12\-14" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pytagsfs \- filesystem mapping media files to an arbitrary directory structure .SH "SYNOPSIS" .HP \w'\fBpytagsfs\fR\ 'u \fBpytagsfs\fR [OPTIONS] {\fIsourcedir\fR} {\fImountpoint\fR} .SH "DESCRIPTION" .PP pytagsfs is a FUSE filesystem that was designed to present multiple views of tagged media files\&. For instance, a directory tree containing audio files could be mapped to a new directory structure organizing those same files by album, genre, release date, etc\&. .PP To get a feel for what\*(Aqs possible, see the section called \(lqEXAMPLES\(rq\&. .PP Log messages are kept in a limited\-size ring buffer in memory, and can be read from the virtual file named "\&.log", under the mount point root\&. .SH "OPTIONS" .PP \fB\-\-version\fR .RS 4 show version of program and exit .RE .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 show summary of options and exit .RE .PP \fB\-f\fR .RS 4 foreground operation .RE .PP \fB\-d\fR .RS 4 enable debug output (implies \-f) .RE .PP \fB\-s\fR .RS 4 disable multi\-threaded operation .RE .PP \fB\-r\fR .RS 4 mount read\-only .RE .PP \fB\-o\fR opt[,opt\&.\&.\&.] .RS 4 mount options .RE .PP \fB\-o\fR format=FORMAT .RS 4 format string for destination paths (see the section called \(lqFORMAT STRINGS\(rq) .RE .PP \fB\-o\fR srcfilter=EXPR .RS 4 adds a source path filter; may be specified more than once (see the section called \(lqPATH FILTERS\(rq) .RE .PP \fB\-o\fR dstfilter=EXPR .RS 4 adds a destination path filter; may be specified more than once (see the section called \(lqPATH FILTERS\(rq) .RE .PP \fB\-o\fR iocharset=ENCODING .RS 4 mounted tree character encoding (default utf\-8) .RE .PP \fB\-o\fR source_iocharset=ENCODING .RS 4 source directory character encoding (default utf\-8) .RE .PP \fB\-o\fR ro .RS 4 synonym for \-r (Linux) .RE .PP \fB\-o\fR rdonly .RS 4 synonym for \-r (Darwin, FreeBSD, NetBSD, OpenBSD) .RE .PP \fB\-o\fR allow_other .RS 4 allow access to other users .RE .PP \fB\-o\fR allow_root .RS 4 allow access to root .RE .PP \fB\-o\fR nonempty .RS 4 allow mounts over non\-empty file/dir .RE .PP \fB\-o\fR uid=UID .RS 4 set file owner .RE .PP \fB\-o\fR gid=GID .RS 4 set file group .RE .PP \fB\-o\fR verbosity=VERBOSITY .RS 4 log level; must be one of "debug", "info", "warning", "error", "critical"; defaults to "warning" .RE .PP \fB\-o\fR logsize=LOGSIZE .RS 4 length of log file ring buffer .RE .PP \fB\-o\fR debug .RS 4 synonym for \-d .RE .PP \fB\-o\fR force_write_support .RS 4 Force write support on systems that are not known to have correct mmap semantics\&. This option is dangerous and can lead to file corruption with some applications on some systems! .RE .SH "FORMAT STRINGS" .PP A format string must be specified for each pytagsfs mount\&. The format string specifies the structure of the virtual filesystem mount by defining a template for virtual paths\&. For instance, the following format string defines a virtual filesystem layout that organizes media files by artist, then by album, and, finally, by track name: .sp .if n \{\ .RS 4 .\} .nf /%{artist}/%{album}/%{track}\&.%{extension} .fi .if n \{\ .RE .\} .SS "Substitutions" .PP The format string should contain zero or more substitution sequences\&. Each such sequence begins with a percent sign (%)\&. .PP Substitution sequences may be specified in either long or short forms\&. Long\-form substitution sequences are written as "%{KEY}", where KEY corresponds with a meta\-data key\&. The set of available keys varies from file to file, however, many media files feature some or all of the following long keys: .RS 4 \fBfilename\fR name of the original file .RE .RS 4 \fBparent\fR name of the original file\*(Aqs parent directory .RE .RS 4 \fBextension\fR extension of the original file .RE .RS 4 \fBtracknumber\fR track number; concise (like 7) .RE .RS 4 \fBTRACKNUMBER\fR track number; two digits with leading zeros (like 07) .RE .RS 4 \fBartist\fR artist .RE .RS 4 \fBcomposer\fR composer .RE .RS 4 \fBtitle\fR track title .RE .RS 4 \fBalbum\fR album title .RE .RS 4 \fByear\fR year of release .RE .RS 4 \fBgenre\fR genre .RE .PP Short\-form substitution sequences are written as "%X"\&. Each such sequence is an abbreviation for a long\-form sequence, as indicated below: .RS 4 \fBf\fR filename .RE .RS 4 \fBp\fR parent .RE .RS 4 \fBe\fR extension .RE .RS 4 \fBn\fR number .RE .RS 4 \fBN\fR NUMBER .RE .RS 4 \fBa\fR artist .RE .RS 4 \fBc\fR composer .RE .RS 4 \fBt\fR title .RE .RS 4 \fBl\fR album .RE .RS 4 \fBy\fR year .RE .RS 4 \fBg\fR genre .RE .SS "Modifiers" .PP Format strings can be further extended to perform string translations on parameters prior to substitution\&. Such translations are indicated by the inclusion of a modifier character after the percent sign\&. For instance, "%^a" indicates an all\-caps version of the artist name, as does "%^{artist}"\&. .PP The full list of modifier characters follows: .RS 4 \fB^\fR UPPERCASE .RE .RS 4 \fB_\fR lowercase .RE .RS 4 \fB!\fR Title Case .RE .SS "Conditional Expressions" .PP Normally, any file for which a parameter required by the format string cannot be determined is implicitly excluded from the resulting filesystem\&. Conditionals can be used to express that these files should be included, but that those portions of the format string that cannot be rendered should be omitted or replaced\&. .PP Two types of conditional expressions may be used: "if" expressions and "if\-else" expressions\&. The contents of an "if" expression are omitted unless all parameters within that expressions can be successfully evaluated\&. An "if\-else" expression is similar, except that, if the expression does not evaluate, an alternative will be used instead\&. Use the following syntax: .RS 4 %?\fIexpr\fR%? .RE .RS 4 %?\fIexpr\fR%:\fIalt\fR%? .RE .SH "PATH FILTERS" .PP Path filters can be used to limit the set of files presented by the filesystem using regular expressions\&. Files are filtered by source path or by destination path, inclusively (limiting the set of paths to those that match the regular expression) or exclusively (limiting the set of paths to those that do \fInot\fR match the regular expression)\&. .PP Use the mount options \fBsrcfilter\fR and \fBdstfilter\fR to filter by source path and destination path, respectively\&. Filters are inclusive unless the filter parameter starts with an exclamation point, in which case the regular expression is assumed to be the part of the parameter following the exclamation point\&. .PP Multiple filters of any kind may be used, and are applied in the order that they are specified on the command line\&. See the section called \(lqEXAMPLES\(rq for some sample filters\&. .SH "EXAMPLES" .PP View media files in src, with original filenames in a flat directory structure: .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o format=\*(Aq/%f\*(Aq src mnt .fi .if n \{\ .RE .\} .PP View media files in src by album on mnt: .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o format=\*(Aq/%a/%f\*(Aq src mnt .fi .if n \{\ .RE .\} .PP A more complex album\-based view: .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o format=\*(Aq/%a \- %l/%N %a \- %t [%l]\&.%e\*(Aq .fi .if n \{\ .RE .\} .PP This is like above, but filters the result\&. I use this to display my files by album, but exclude compilations (which I\*(Aqve tagged to include a hyphen in the album name, like "various \- album"): .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o \e format=\*(Aq/%a \- %l/%N %a \- %t [%l]\&.%e\*(Aq,\e dstfilter=\*(Aq!^/[^/]* \- [^/]* \- [^/]*/\*(Aq \e src albums .fi .if n \{\ .RE .\} .PP I use this to display the compilations: .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o \e format=\*(Aq/%l/%N %a \- %t [%l]\&.%e\*(Aq,\e dstfilter=\*(Aq^/[^/]* \- [^/]*/\*(Aq \e src compilations .fi .if n \{\ .RE .\} .PP Maybe you only want to see files that start with "a" and end in "\&.mp3"? .sp .if n \{\ .RS 4 .\} .nf $ pytagsfs \-o \e format=\*(Aq/%f\*(Aq,dstfilter=\*(Aq^/a\*(Aq,dstfilter=\*(Aq\e\&.mp3$\*(Aq \e src mnt .fi .if n \{\ .RE .\} .SH "UNMOUNTING" .PP To unmount the filesystem on Linux use \fBfusermount\fR(1): .sp .if n \{\ .RS 4 .\} .nf $ fusermount \-u mnt .fi .if n \{\ .RE .\} .PP To unmount the filesystem on OS X or *BSD use \fBumount\fR(1): .sp .if n \{\ .RS 4 .\} .nf $ umount mnt .fi .if n \{\ .RE .\} .SH "BUGS" .PP Please report bugs on launchpad at http://launchpad\&.net/products/pytagsfs/+bugs\&. .SH "SEE ALSO" .PP \fBfusermount\fR(1), \fBmount\fR(8), \fBumount\fR(8), \fBpytags\fR(1) .SH "AUTHOR" .PP \fBForest Bond\fR .RS 4 Author. .RE .SH "COPYRIGHT" .br Copyright \(co 2007, 2008, 2009 .br