Textualize / frogmouth

A Markdown browser for your terminal
https://www.textualize.io/
MIT License
2.35k stars 42 forks source link

Add support for short URLs #77

Closed oleksis closed 10 months ago

oleksis commented 10 months ago

Ex: Twitter short URL py -m frogmouth https://t.co/5AU9qe7pQ1

image

davep commented 10 months ago

Could you please modify not to change the version number, and provide details of the problem being solved and how it's solving it.

oleksis commented 10 months ago

The current version of 'frogmouth' v0.9.0 if you pass a short URL like those generated on Twitter, 'frogmouth' opens the default browser with the final URL

This PR adds the behavior that if a short URL is passed follows the redirect and continues with the validation that the "path" is a file with extension Markdown, resulting the Markdown content being rendered in the Viewer widget