toy / blueutil

CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …
https://github.com/toy/blueutil
Other
1.01k stars 53 forks source link

Homebrew and blueutil #2

Closed habibalamin closed 10 years ago

habibalamin commented 10 years ago

Hey,

I don't know if GitHub repo maintainers can give HTML classes to any of their Markdown text, but it's worth a try. I've made a contribution to Homebrew that allows project maintainers to give any HTML element on their page a class of "pkg_mgr_desc" and brew dscr FORMULA would scrape the site for that HTML and display its plain text representation on the Terminal. It's intended for project maintainers to describe their software without Homebrew having to keep its own, potentially outdated, descriptions of all the software it has formulae for.

They're considering adding it to core Homebrew, but it needs widespread adoption. Please consider wrapping your description in tags (or p tags or whatever, any tag works, it just has to have the class).

Here's the pull request for my command if you want: https://github.com/mxcl/homebrew/pull/23926

toy commented 10 years ago

Hey,

I've tried and it seems it is not possible to add class to tag on github. See yourself: https://raw.github.com/toy/blueutil/pkg_mgr_desc/README.md and no class when rendered https://github.com/toy/blueutil/blob/pkg_mgr_desc/README.md

habibalamin commented 10 years ago

http://daringfireball.net/projects/markdown/syntax.text

I just checked the official page, it is possible to use inline HTML, even with id, though it may not be possible with class. See if you can do it with id. If not, GitHub flavoured MarkDown may be deficient.

habibalamin commented 10 years ago

Oh, no you misunderstand. The class is not supposed to be rendered. Your document is fine. Now, brew dscr blueutil should echo;

=>Description: blueutil get/set Bluetooth power and discoverable state

habibalamin commented 10 years ago

Oh wait, you're right, the page source code places the class in a weird place.

toy commented 10 years ago

Rendering README.md using default markdown engine will show class pkg_mgr_desc, but github removes it when rendering for understandable reasons (html of that page has a lot of "pkg_mgr_desc" but this is because I've called branch like this). Will not it be easier to grab description from meta tags description or og:description?

habibalamin commented 10 years ago

Someone at cmus gave me the great idea to pull the description from the description field for GitHub pages. I will do that, so this issue is unnecessary.

Sent from my iPhone

On 3 Nov 2013, at 23:26, Ivan notifications@github.com wrote:

Rendering README.md using default markdown engine will show class pkg_mgr_desc, but github removes it when rendering for understandable reasons (html of that page has a lot of "pkg_mgr_desc" but this is because I've called branch like this). Will not it be easier to grab description from meta tags description or og:description?

— Reply to this email directly or view it on GitHub.