Category in mimetypes.

Stef Bon stefbon at gmail.com
Wed Jan 7 12:42:32 PST 2015


Hi Thomas,

thanks for your answer.

Now a few days later, I go for the hardcoded lists. Not really
hardcoded lists, the user can modify them.

When making a backup of a directory (not recursive), in my idea I go
for a "backup profile".
Directories you want to backup to my experience are for example:

- a directory with code files: c- and h-files, and the README,
Changes, NEWS, documentation and some others.
- a directory with documents for resume's and lettres to aplly to a job.
- a directory with documents for work: presentations, pdf's,
spreadsheets and text documents

It looks like the best sollution is a profile:
a set of mimetypes to include (a group of mimetypes)
filenames to include
and as extra: a maximum of filesizes

My idea is to create a gui to construct:
-groups of mimetypes (like the group "programming")
-rules that apply to a directory like "backup all these files with the
mimetype which is part of group programming".

Stef








2015-01-07 19:04 GMT+01:00 Thomas Kluyver <thomas at kluyver.me.uk>:
> On 6 January 2015 at 16:58, Rex Dieter <rdieter at math.unl.edu> wrote:
>>
>>
>> > categories of programs
>>
>> ^^ that. :)
>
>
> To expand a bit: such categories do not really exist for mimetypes (someone
> correct me if I'm wrong). You may be able to make use of:
>
> - The media types, the part of the mimetype before the slash, e.g. 'image',
> 'audio', 'text'. However, a lot of disparate kinds of file will end up under
> the 'application' media type, and it may not be what you want - e.g. 'image'
> does not distinguish between photos and icons.
> - Building a mapping of mime types to programs used to open them, and then
> saying that e.g. anything that can be opened by an office application is an
> office document. Your example shows one possible issue with this: I wouldn't
> expect a database file to be treated as an office document. In fact, the
> whole concept of 'office documents' seems like a bizarre categorisation that
> only came about because a set of proprietary applications was sold as a
> bundle.
> - Hardcoded lists and heuristics - e.g. image/jpeg > 100 KB is probably a
> photo. Be wary of making this too complex, because for backups you want it
> to be clear to the user what is included in each category.
>
> Thomas
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>


More information about the xdg mailing list