Sometimes when I'm hacking away on my terminal, I like to take a break and read the articles on this awesome community. The dev.to cli is pretty neat, and I highly recommend it. It works great! Try it out if you haven't.
Article No Longer Available
What I felt would be better for me though, was a scenario where I'd just type in one command and a new Dev.to tab would open on my browser. So I wrote a simple python script to do this. This was extremely simple to do using python's webbrowser
package.
Then I thought: "Why not make this a package and share it with everyone?", and that's exactly what I did.
Installation
Install open-dev.to from PyPi
pip install open-dev.to
How to use
$ dev.to --help
Usage: dev.to [OPTIONS]
Open a new dev.to browser tab on the browser
Options:
-t, --tag TEXT add a tag
--help Show this message and exit.
Open home page
$ dev.to
Open a tag page
e.g javascript, career, productivity
$ dev.to -t javascript
Enjoy!
Top comments (9)
I think
open https://dev.to
would also work. Orfirefox https://dev.to
for example. Or if you want a shorter name for it, add the following to your.bashrc
(or similar shell file):alias dev.to=βopen https://dev.toβ
Nice! An even easier way π. I guess I just wanted to play around with python π
βScratching your own itchβ is one of the best ways to learn, so good choice!
pip install --user
;)dev.to/elabftw/stop-using-sudo-pip...
Kitten using computer!!! β€οΈβ€οΈβ€οΈ
Also, this is great :)
This was fun =) You should add a bit about the process, what you needed to make this happen and how to make a package to share.
I'll do that on the next post. Thanks! π
That's Great. All the very best. π
Thanks Sarthak.