← Back to team overview

zeitgeist team mailing list archive

[Branch ~zeitgeist/zeitgeist/bluebird] Rev 448: MIME-Types:

 

------------------------------------------------------------
revno: 448
committer: Siegfried-Angel Gevatter Pujals <siegfried@xxxxxxxxxxxx>
branch nick: bluebird
timestamp: Tue 2012-03-20 17:36:59 +0100
message:
  MIME-Types:
   - Remove application/x-object, we don't want it as SOURCE_CODE.
   - Add additional mappings, from en.wikipedia.org/wiki/Internet_media_type
modified:
  NEWS
  python/mimetypes.py
  src/mimetype.vala


--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'NEWS'
--- NEWS	2012-03-20 12:29:29 +0000
+++ NEWS	2012-03-20 16:36:59 +0000
@@ -1,3 +1,12 @@
+2012-XX-XX: Zeitgeist Bluebird Beta 2
+-------------------------------------
+
+Engine:
+ - Updated the list of recognized MIME-types.
+
+Python API:
+ - Updated the list of recognized MIME-types.
+
 2012-03-20: Zeitgeist Bluebird Beta 1
 -------------------------------------
 
@@ -204,37 +213,37 @@
 
 Engine:
 
- - Added some new mimetype mappings
- - Speed up the GetEvents method by caching events (LP: #686732)
- - Allow extension without public method (LP: #691660)
+ - Added some new mimetype mappings.
+ - Speed up the GetEvents method by caching events (LP: #686732).
+ - Allow extension without public method (LP: #691660).
  - Added a read-only DBus property "extensions" to org.gnome.zeitgeist.Log 
-   (LP: #693861)
- - Added helper function to get an extension's name
+   (LP: #693861).
+ - Added helper function to get an extension's name.
  - Fixed bug in RemoteInterface.Quit(): make sure to close connection to the
    used bus if this method gets called, this is needed if RemoteInterface
    does not know anything about the loop it is running in.
- - Fix sending payload from engine to client (LP: #692645)
- - Improve performance of DataSourceRegistry (LP: #695311)
+ - Fix sending payload from engine to client (LP: #692645).
+ - Improve performance of DataSourceRegistry (LP: #695311).
  - Improve performance of find_event queries with timerange other than 
-   TimeRange.always() (LP: #672965)
- - Add an auto-filter for broken database entries (LP: #598666 workaround)
+   TimeRange.always() (LP: #672965).
+ - Add an auto-filter for broken database entries (LP: #598666 workaround).
  - Introduce new DB schema (version 3) that bundles a few performance related 
-   fixes (LP: #673452, #673394)
+   fixes (LP: #673452, #673394).
  - Added a (LRU-type) event cache to speed up similar requests.
 
 Python API:
 
- - Fix find_event_for_template to stop ignoring the template (LP: #690377)
- - Add get_extensions method to ZeitgeistClient
+ - Fix find_event_for_template to stop ignoring the template (LP: #690377).
+ - Add get_extensions method to ZeitgeistClient.
 
 Overall:
 
- - Using logging output for debugging purposes (LP: #660440)
- - Stop building man page for zeitgeist-datahub (LP: #680360)
- - Allow easy building for KDE (LP: #683280)
+ - Using logging output for debugging purposes (LP: #660440).
+ - Stop building man page for zeitgeist-datahub (LP: #680360).
+ - Allow easy building for KDE (LP: #683280).
  - Logging output now displays how many events were actually inserted from 
-   the batch of requested inserts (LP: #660440)
- - Changed License to LGPL 2.1+
+   the batch of requested inserts (LP: #660440).
+ - Changed License to LGPL 2.1+.
 
 2010-11-01: Zeitgeist 0.6 "Buzzer Beater"
 -----------------------------------------

=== modified file 'python/mimetypes.py'
--- python/mimetypes.py	2012-02-12 20:52:37 +0000
+++ python/mimetypes.py	2012-03-20 16:36:59 +0000
@@ -103,6 +103,7 @@
 
     # Plain text
     "text/plain": Interpretation.TEXT_DOCUMENT,
+    "text/csv": Interpretation.TEXT_DOCUMENT,
   
     # HTML files on disk are always HTML_DOCUMENTS while online we should
     # assume them to be WEBSITEs. By default we anticipate local files...
@@ -111,11 +112,13 @@
     # Image types
     "application/vnd.corel-draw": Interpretation.VECTOR_IMAGE,
     "image/jpeg": Interpretation.RASTER_IMAGE,
+    "image/pjpeg": Interpretation.RASTER_IMAGE,
     "image/png": Interpretation.RASTER_IMAGE,
     "image/tiff": Interpretation.RASTER_IMAGE,
     "image/gif": Interpretation.RASTER_IMAGE,
     "image/x-xcf": Interpretation.RASTER_IMAGE,
     "image/svg+xml": Interpretation.VECTOR_IMAGE,
+    "image/vnd.microsoft.icon": Interpretation.ICON,
     
     # Audio
     "application/ogg": Interpretation.AUDIO,
@@ -124,6 +127,9 @@
     # Development files
     "application/ecmascript": Interpretation.SOURCE_CODE,
     "application/javascript": Interpretation.SOURCE_CODE,
+    "application/json": Interpretation.SOURCE_CODE,
+    "application/soap+xml": Interpretation.SOURCE_CODE,
+    "application/xml-dtd": Interpretation.SOURCE_CODE,
     "application/x-csh": Interpretation.SOURCE_CODE,
     "application/x-designer": Interpretation.SOURCE_CODE,
     "application/x-dia-diagram": Interpretation.SOURCE_CODE,
@@ -131,15 +137,17 @@
     "application/x-glade": Interpretation.SOURCE_CODE,
     "application/xhtml+xml": Interpretation.SOURCE_CODE,
     "application/x-java-archive": Interpretation.SOURCE_CODE,
+    "application/x-javascript": Interpretation.SOURCE_CODE,
     "application/x-m4": Interpretation.SOURCE_CODE,
     "application/xml": Interpretation.SOURCE_CODE,
-    "application/x-object": Interpretation.SOURCE_CODE,
     "application/x-perl": Interpretation.SOURCE_CODE,
     "application/x-php": Interpretation.SOURCE_CODE,
     "application/x-ruby": Interpretation.SOURCE_CODE,
     "application/x-shellscript": Interpretation.SOURCE_CODE,
     "application/x-sql": Interpretation.SOURCE_CODE,
     "text/css": Interpretation.SOURCE_CODE,
+    "text/javascript": Interpretation.SOURCE_CODE,
+    "text/xml": Interpretation.SOURCE_CODE,
     "text/x-c": Interpretation.SOURCE_CODE,
     "text/x-c++": Interpretation.SOURCE_CODE,
     "text/x-chdr": Interpretation.SOURCE_CODE,
@@ -169,6 +177,15 @@
     "text/x-vala": Interpretation.SOURCE_CODE,
     "text/x-vhdl": Interpretation.SOURCE_CODE,
     "text/x-m4": Interpretation.SOURCE_CODE,
+    "text/x-jquery-tmpl": Interpretation.SOURCE_CODE,
+    
+    # Email
+    "message/alternative": Interpretation.EMAIL,
+    "message/partial": Interpretation.EMAIL,
+    "message/related": Interpretation.EMAIL,
+    
+    # People
+    "text/vcard": Interpretation.CONTACT,
     
     # Archives
     "application/zip": Interpretation.ARCHIVE,
@@ -180,6 +197,7 @@
     "application/x-bzip-compressed-tar": Interpretation.ARCHIVE,
     "application/x-lzma-compressed-tar": Interpretation.ARCHIVE,
     "application/x-compressed-tar": Interpretation.ARCHIVE,
+    "application/x-stuffit": Interpretation.ARCHIVE,
     
     # Software and packages
     "application/x-deb": Interpretation.SOFTWARE,
@@ -187,6 +205,7 @@
     "application/x-ms-dos-executable": Interpretation.SOFTWARE,
     "application/x-executable": Interpretation.SOFTWARE,
     "application/x-desktop": Interpretation.SOFTWARE,
+    "application/x-shockwave-flash": Interpretation.EXECUTABLE,
     
     # File systems
     "application/x-cd-image": Interpretation.FILESYSTEM_IMAGE,
@@ -206,6 +225,9 @@
     # MS
     ("application/vnd.ms-excel.*", Interpretation.SPREADSHEET),
     ("application/vnd.ms-powerpoint.*", Interpretation.PRESENTATION),
+    ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.*", Interpretation.SPREADSHEET),
+    ("application/vnd.openxmlformats-officedocument.presentationml.presentation.*", Interpretation.PRESENTATION),
+    ("application/vnd.openxmlformats-officedocument.wordprocessingml.document.*", Interpretation.PAGINATED_TEXT_DOCUMENT),
     # TeX stuff
     (".*/x-dvi", Interpretation.PAGINATED_TEXT_DOCUMENT),
     # Image types

=== modified file 'src/mimetype.vala'
--- src/mimetype.vala	2012-02-10 19:28:47 +0000
+++ src/mimetype.vala	2012-03-20 16:36:59 +0000
@@ -202,6 +202,7 @@
         try {
             register_mimetype ("application/ecmascript", NFO.SOURCE_CODE);
             register_mimetype ("application/javascript", NFO.SOURCE_CODE);
+            register_mimetype ("application/json", NFO.SOURCE_CODE);
             register_mimetype ("application/ms-excel", NFO.SPREADSHEET);
             register_mimetype ("application/ms-powerpoint", NFO.PRESENTATION);
             register_mimetype ("application/msexcel", NFO.SPREADSHEET);
@@ -211,6 +212,7 @@
             register_mimetype ("application/postscript", NFO.PAGINATED_TEXT_DOCUMENT);
             register_mimetype ("application/ps", NFO.PAGINATED_TEXT_DOCUMENT);
             register_mimetype ("application/rtf", NFO.PAGINATED_TEXT_DOCUMENT);
+            register_mimetype ("application/soap+xml", NFO.SOURCE_CODE);
             register_mimetype ("application/vnd.corel-draw", NFO.VECTOR_IMAGE);
             register_mimetype ("application/vnd.ms-excel", NFO.SPREADSHEET);
             register_mimetype ("application/vnd.ms-powerpoint", NFO.PRESENTATION);
@@ -236,6 +238,7 @@
             register_mimetype ("application/x-gnumeric", NFO.SPREADSHEET);
             register_mimetype ("application/x-gzip", NFO.ARCHIVE);
             register_mimetype ("application/x-java-archive", NFO.SOURCE_CODE);
+            register_mimetype ("application/x-javascript", NFO.SOURCE_CODE);
             register_mimetype ("application/x-killustrator", NFO.VECTOR_IMAGE);
             register_mimetype ("application/x-kpresenter", NFO.PRESENTATION);
             register_mimetype ("application/x-kspread", NFO.SPREADSHEET);
@@ -244,27 +247,37 @@
             register_mimetype ("application/x-lzma-compressed-tar", NFO.ARCHIVE);
             register_mimetype ("application/x-m4", NFO.SOURCE_CODE);
             register_mimetype ("application/x-ms-dos-executable", NFO.SOFTWARE);
-            register_mimetype ("application/x-object", NFO.SOURCE_CODE);
             register_mimetype ("application/x-perl", NFO.SOURCE_CODE);
             register_mimetype ("application/x-php", NFO.SOURCE_CODE);
             register_mimetype ("application/x-rpm", NFO.SOFTWARE);
             register_mimetype ("application/x-ruby", NFO.SOURCE_CODE);
             register_mimetype ("application/x-shellscript", NFO.SOURCE_CODE);
+            register_mimetype ("application/x-shockwave-flash", NFO.EXECUTABLE);
             register_mimetype ("application/x-sql", NFO.SOURCE_CODE);
+            register_mimetype ("application/x-stuffit", NFO.ARCHIVE);
             register_mimetype ("application/xhtml+xml", NFO.SOURCE_CODE);
             register_mimetype ("application/xml", NFO.SOURCE_CODE);
+            register_mimetype ("application/xml-dtd", NFO.SOURCE_CODE);
             register_mimetype ("application/zip", NFO.ARCHIVE);
             register_mimetype ("audio/x-scpls", NFO.MEDIA_LIST);
             register_mimetype ("image/gif", NFO.RASTER_IMAGE);
             register_mimetype ("image/jpeg", NFO.RASTER_IMAGE);
+            register_mimetype ("image/pjpeg", NFO.RASTER_IMAGE);
             register_mimetype ("image/png", NFO.RASTER_IMAGE);
             register_mimetype ("image/svg+xml", NFO.VECTOR_IMAGE);
             register_mimetype ("image/tiff", NFO.RASTER_IMAGE);
+            register_mimetype ("image/vnd.microsoft.icon", NFO.ICON);
             register_mimetype ("image/x-xcf", NFO.RASTER_IMAGE);
             register_mimetype ("inode/directory", NFO.FOLDER);
+            register_mimetype ("message/alternative", NMO.EMAIL);
+            register_mimetype ("message/partial", NMO.EMAIL);
+            register_mimetype ("message/related", NMO.EMAIL);
             register_mimetype ("text/css", NFO.SOURCE_CODE);
+            register_mimetype ("text/csv", NFO.TEXT_DOCUMENT);
             register_mimetype ("text/html", NFO.HTML_DOCUMENT);
+            register_mimetype ("text/javascript", NFO.SOURCE_CODE);
             register_mimetype ("text/plain", NFO.TEXT_DOCUMENT);
+            register_mimetype ("text/vcard", NCO.CONTACT);
             register_mimetype ("text/x-c", NFO.SOURCE_CODE);
             register_mimetype ("text/x-c++", NFO.SOURCE_CODE);
             register_mimetype ("text/x-c++src", NFO.SOURCE_CODE);
@@ -280,6 +293,7 @@
             register_mimetype ("text/x-haskell", NFO.SOURCE_CODE);
             register_mimetype ("text/x-idl", NFO.SOURCE_CODE);
             register_mimetype ("text/x-java", NFO.SOURCE_CODE);
+            register_mimetype ("text/x-jquery-tmpl", NFO.SOURCE_CODE);
             register_mimetype ("text/x-latex", NFO.SOURCE_CODE);
             register_mimetype ("text/x-lisp", NFO.SOURCE_CODE);
             register_mimetype ("text/x-lua", NFO.SOURCE_CODE);
@@ -296,26 +310,20 @@
             register_mimetype ("text/x-troff", NFO.SOURCE_CODE);
             register_mimetype ("text/x-vala", NFO.SOURCE_CODE);
             register_mimetype ("text/x-vhdl", NFO.SOURCE_CODE);
+            register_mimetype ("text/xml", NFO.SOURCE_CODE);
 
             register_mimetype_regex (".*/x-dvi", NFO.PAGINATED_TEXT_DOCUMENT);
-            register_mimetype_regex (
-                "application/vnd.oasis.opendocument.text.*",
-                NFO.PAGINATED_TEXT_DOCUMENT);
-            register_mimetype_regex (
-                "application/vnd.oasis.opendocument.presentation.*",
-                NFO.PRESENTATION);
-            register_mimetype_regex (
-                "application/vnd.oasis.opendocument.spreadsheet.*",
-                NFO.SPREADSHEET);
-            register_mimetype_regex (
-                "application/vnd.oasis.opendocument.graphics.*",
-                NFO.VECTOR_IMAGE);
+            register_mimetype_regex ("application/vnd.ms-excel.*", NFO.SPREADSHEET);
+            register_mimetype_regex ("application/vnd.ms-powerpoint.*", NFO.PRESENTATION);
+            register_mimetype_regex ("application/vnd.oasis.opendocument.graphics.*", NFO.VECTOR_IMAGE);
+            register_mimetype_regex ("application/vnd.oasis.opendocument.presentation.*", NFO.PRESENTATION);
+            register_mimetype_regex ("application/vnd.oasis.opendocument.spreadsheet.*", NFO.SPREADSHEET);
+            register_mimetype_regex ("application/vnd.oasis.opendocument.text.*", NFO.PAGINATED_TEXT_DOCUMENT);
+            register_mimetype_regex ("application/vnd.openxmlformats-officedocument.presentationml.presentation.*", NFO.PRESENTATION);
+            register_mimetype_regex ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.*", NFO.SPREADSHEET);
+            register_mimetype_regex ("application/vnd.openxmlformats-officedocument.wordprocessingml.document.*", NFO.PAGINATED_TEXT_DOCUMENT);
             register_mimetype_regex ("application/vnd\\..*", NFO.DOCUMENT);
             register_mimetype_regex ("application/x-applix-.*", NFO.DOCUMENT);
-            register_mimetype_regex ("application/vnd.ms-excel.*",
-                NFO.SPREADSHEET);
-            register_mimetype_regex ("application/vnd.ms-powerpoint.*",
-                NFO.PRESENTATION);
             register_mimetype_regex ("audio/.*", NFO.AUDIO);
             register_mimetype_regex ("image/.*", NFO.IMAGE);
             register_mimetype_regex ("video/.*", NFO.VIDEO);