Merge lp:~kamstrup/zeitgeist/extra-mimes into lp:zeitgeist/0.1

Proposed by Mikkel Kamstrup Erlandsen
Status: Merged
Merged at revision: 1627
Proposed branch: lp:~kamstrup/zeitgeist/extra-mimes
Merge into: lp:zeitgeist/0.1
Diff against target: 54 lines (+24/-1)
1 file modified
zeitgeist/mimetypes.py (+24/-1)
To merge this branch: bzr merge lp:~kamstrup/zeitgeist/extra-mimes
Reviewer Review Type Date Requested Status
Markus Korn Approve
Review via email: mp+40421@code.launchpad.net

Description of the change

Adds a bunch of extra mimetype mappings and an URI scheme for ftp://. Please see commit log for details.

To post a comment you must log in.
Revision history for this message
Markus Korn (thekorn) wrote :

Looks good so far, but there is a minor typo: "# Arhcives"

review: Needs Fixing
lp:~kamstrup/zeitgeist/extra-mimes updated
1629. By Mikkel Kamstrup Erlandsen

Fix typo in comment

Revision history for this message
Markus Korn (thekorn) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'zeitgeist/mimetypes.py'
2--- zeitgeist/mimetypes.py 2010-09-04 08:10:11 +0000
3+++ zeitgeist/mimetypes.py 2010-11-09 12:57:49 +0000
4@@ -3,6 +3,7 @@
5 # Zeitgeist
6 #
7 # Copyright © 2010 Markus Korn <thekorn@gmx.de>
8+# 2010 Canonical Ltd
9 #
10 # This program is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU Lesser General Public License as published by
12@@ -123,7 +124,6 @@
13 "application/javascript": Interpretation.SOURCE_CODE,
14 "application/x-csh": Interpretation.SOURCE_CODE,
15 "application/x-designer": Interpretation.SOURCE_CODE,
16- "application/x-desktop": Interpretation.SOURCE_CODE,
17 "application/x-dia-diagram": Interpretation.SOURCE_CODE,
18 "application/x-fluid": Interpretation.SOURCE_CODE,
19 "application/x-glade": Interpretation.SOURCE_CODE,
20@@ -167,6 +167,28 @@
21 "text/x-vala": Interpretation.SOURCE_CODE,
22 "text/x-vhdl": Interpretation.SOURCE_CODE,
23 "text/x-m4": Interpretation.SOURCE_CODE,
24+
25+ # Archives
26+ "application/zip": Interpretation.ARCHIVE,
27+ "application/x-gzip": Interpretation.ARCHIVE,
28+ "application/x-bzip": Interpretation.ARCHIVE,
29+ "application/x-lzma": Interpretation.ARCHIVE,
30+ "application/x-archive": Interpretation.ARCHIVE,
31+ "application/x-7z-compressed": Interpretation.ARCHIVE,
32+ "application/x-bzip-compressed-tar": Interpretation.ARCHIVE,
33+ "application/x-lzma-compressed-tar": Interpretation.ARCHIVE,
34+ "application/x-compressed-tar": Interpretation.ARCHIVE,
35+
36+ # Software and packages
37+ "application/x-deb": Interpretation.SOFTWARE,
38+ "application/x-rpm": Interpretation.SOFTWARE,
39+ "application/x-ms-dos-executable": Interpretation.SOFTWARE,
40+ "application/x-executable": Interpretation.SOFTWARE,
41+ "application/x-desktop": Interpretation.SOFTWARE,
42+
43+ # File systems
44+ "application/x-cd-image": Interpretation.FILESYSTEM_IMAGE,
45+
46 }
47
48 MIMES_REGEX = make_regex_tuple(
49@@ -197,4 +219,5 @@
50 ("https://", Manifestation.FILE_DATA_OBJECT.REMOTE_DATA_OBJECT),
51 ("ssh://", Manifestation.FILE_DATA_OBJECT.REMOTE_DATA_OBJECT),
52 ("sftp://", Manifestation.FILE_DATA_OBJECT.REMOTE_DATA_OBJECT),
53+ ("ftp://", Manifestation.FILE_DATA_OBJECT.REMOTE_DATA_OBJECT),
54 ))