summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-19 09:01:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-19 17:31:32 +0100
commit6066637320d38700f0ac05f090494d424942932c (patch)
treeaf07d1e306802f2d29652d840a69e1d37bf0e53d /bin
parent28a2175847b70b8e47929d6b04978420e7f0953e (diff)
we're more interested in getting emf/wmf samples than pdf
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-bugzilla-attachments-by-mimetype24
1 files changed, 14 insertions, 10 deletions
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index bad7a5424976..c92a611bfbbf 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -287,7 +287,6 @@ mimetypes = {
'application/docbook+xml': 'docbook',
# misc
'text/spreadsheet': 'slk',
- 'application/pdf': 'pdf',
'application/vnd.corel-draw': 'cdr',
'application/vnd.lotus-wordpro': 'lwp',
'application/vnd.lotus-1-2-3': 'wks',
@@ -312,19 +311,23 @@ mimetypes = {
'application/x-starwriter': 'sdw',
'application/vnd.stardivision.writer': 'sdw5',
'application/vnd.stardivision.writer-global': 'sgl5',
-# unusual image mimetypes
+# relatively uncommon image mimetypes
'image/cgm': 'cgm',
+ 'image/tiff': 'tiff',
+ 'image/vnd.dxf': 'dxf',
+ 'image/x-emf': 'emf',
'image/x-targa': 'tga',
+ 'image/x-sgf': 'sgf',
+ 'image/x-svm': 'svm',
+ 'image/x-wmf': 'wmf',
}
# disabled for now, this would download gigs of pngs/jpegs...
-common_image_mimetypes = [
+common_noncore_mimetypes = [
# graphics
('image/svg+xml', 'svg'),
('image/x-MS-bmp', 'bmp'),
('image/x-wpg', 'wpg'),
- ('image/vnd.dxf', 'dxf'),
- ('image/x-emf', 'emf'),
('image/x-eps', 'eps'),
('image/x-met', 'met'),
('image/x-portable-bitmap', 'pbm'),
@@ -335,15 +338,13 @@ common_image_mimetypes = [
('image/x-portable-pixmap', 'ppm'),
('image/vnd.adobe.photoshop', 'psd'),
('image/x-cmu-raster', 'ras'),
- ('image/x-sgf', 'sgf'),
- ('image/x-svm', 'svm'),
- ('image/tiff', 'tiff'),
- ('image/x-wmf', 'wmf'),
('image/x-xbitmap', 'xbm'),
('image/x-xpixmap', 'xpm'),
('image/gif', 'gif'),
('image/jpeg', 'jpeg'),
('image/png', 'png'),
+# pdf, etc.
+ ('application/pdf', 'pdf'),
]
for (mimetype,extension) in mimetypes.items():
@@ -367,6 +368,9 @@ for (mimetype,extension) in mimetypes.items():
for (mimetype,extension) in mimetypes.items():
get_through_rss_query(openoffice, mimetype, "ooo", extension)
-get_launchpad_bugs("lp")
+try:
+ get_launchpad_bugs("lp")
+except ImportError:
+ print "launchpadlib unavailable, skipping Ubuntu tracker"
# vim:set shiftwidth=4 softtabstop=4 expandtab: