Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

MIME types plugin #39

Closed
wants to merge 6 commits into from
Closed

MIME types plugin #39

wants to merge 6 commits into from

Conversation

vaishaks
Copy link

Hi :)
I'm working on the MIME types plugin as suggested here.
This is my first code submission, please tell me what you guys think, how I can improve, any other ideas etc.
When a DuckDuckGoer searches for "mime type .jpeg", the zero click info box should display "The MIME type for .jpeg extension is image/jpeg". That's what the plugin is supposed to do.
I'm a total beginner so please have mercy. I'd appreciate any help.
Thank You!

@rpicard
Copy link
Contributor

rpicard commented Oct 22, 2012

Thanks for the submission! I have a couple of initial thoughts: 💭

  • You can remove "MIME type" from the titles. I'll add that as a trigger internally.
  • Are there any licensing issues with using that source code?

@vaishaks
Copy link
Author

@rpicard Thank you for looking into my code!
I have removed "MIME type" from the titles
The source code is a standard python library "mimetypes". It should be GPL compatible. :)
What more can I do? :)

@rpicard
Copy link
Contributor

rpicard commented Oct 22, 2012

Thanks. I think we can reformat the abstract like this:

"The MIME type for this .ots is application/vnd.oasis.opendocument.spreadsheet-template"
"The MIME type for <code>.ots</code> is <code>application/vnd.oasis.opendocument.spreadsheet-template</code>"

What do you think?

@vaishaks
Copy link
Author

I have reformatted the abstract like this:

"The MIME type for the extension .ots is application/vnd.oasis.opendocument.spreadsheet-template"

"The MIME type for the extension <code>.ots</code> is <code>application/vnd.oasis.opendocument.spreadsheet-template</code>"

Is that good? :)

@vaishaks
Copy link
Author

@rpicard Is the plugin working? Do you have any more tips? :)

@rpicard
Copy link
Contributor

rpicard commented Oct 26, 2012

It wasn't working, so I had to do a little debugging. It turns out that you just had one too many tabs in the output.txt lines. I fixed that and made one or two other changes and pushed them here: https://github.com/duckduckgo/zeroclickinfo-fathead/commits/mime_types

Here's the current state : https://robert.duckduckgo.com/?q=.jpg+mime

I think it looks pretty good. Do you have any thoughts? I'll pass it along internally to get some more opinions.

@vaishaks
Copy link
Author

Oh jeez! Sorry about the tabs. Should have rechecked that. 😬
I think the external link should point to the Wikipedia page rather than the python code. I think that would make more sense.
I think I'll add this link and commit everything. Is that ok?

@vaishaks
Copy link
Author

@rpicard I've committed the changes you made and changed the external link to Wikipedia. How is it now?
Thanks a lot for your help! I really appreciate it!

@rpicard
Copy link
Contributor

rpicard commented Oct 26, 2012

@vaishaks That kind of messed things up for me. I already had those commits in my repository. All you needed to do was pull them into yours (with git am or something). Your commit (which includes the changes I've already made) won't apply to my repo.

In any case, I think that linking to the python file where the information is coming from (leaving it as is) is probably best. I'll pass the idea along though.

@vaishaks
Copy link
Author

@rpicard I managed to remove my changes and merge your commits to my branch. 😓 Is this ok?
Left the external link as it is.
I'm new to this. Thanks for being patient with me.

@rpicard
Copy link
Contributor

rpicard commented Oct 30, 2012

@vaishaks Hey, we're actually liking the idea of linking to Wikipedia. Good idea. 👍

@rpicard
Copy link
Contributor

rpicard commented Oct 30, 2012

We're also thinking that we should take out the <code> tags after all.

@vaishaks
Copy link
Author

@rpicard Thanks. I've changed the external link to Wikipedia and took out the code tags too. How does it look now?

@rpicard
Copy link
Contributor

rpicard commented Nov 1, 2012

Since Wikipedia's page isn't exhaustive, I think we should link here instead. I can make the actual change, but I want to see if you have any objections first.

@vaishaks
Copy link
Author

vaishaks commented Nov 1, 2012

@rpicard Yeah. I thought of that. Wikipedia seems to be giving only the most commonly used ones. I never really got any usable information out of IANA though. Since Wikipedia has an external link that points to IANA and since it gives easily understandable information, I think we should stick with Wikipedia. But IANA is what we should actually be linking to, since it is the official authority that manages MIME types. I'm confused, what do you think? 😕

@rpicard
Copy link
Contributor

rpicard commented Nov 1, 2012

@vaishaks I think you're right. I actually wasn't able to find .mcm on IANA either. We can just stick with Wikipedia.

@vaishaks
Copy link
Author

vaishaks commented Nov 2, 2012

@rpicard Alright 👍 Any other issues?

@rpicard
Copy link
Contributor

rpicard commented Nov 6, 2012

🚀 ...and we have liftoff!

Thanks for submitting the plugin! What Twitter account can we use for attribution?

@vaishaks
Copy link
Author

vaishaks commented Nov 6, 2012

Wow! Looks good! Thanks @rpicard for helping me with this. 🍻
This is my twitter -> https://twitter.com/vaishaks

@rpicard
Copy link
Contributor

rpicard commented Nov 6, 2012

@vaishaks Thanks, and no problem! This pull request has been merged into the master branch.

@rpicard rpicard closed this Nov 6, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants