-1

I am creating a simple terminal rss reader with python.

The following is how the feeds will displayed at terminal. What I trying to to is looking for a solution to trigger a python function,which added a url to Pocket account.

For web dev,it can be done easily with anchor links or buttons.

Is there any solutions to interact from terminal such as keyboard input,mouse clicking?

$ python feedParser.py -w ph

Title: Product Hunt — The best new products, every day
URL: http://www.producthunt.com
-------------------------------------
Golden Goose — Scramble eggs in the shell
http://www.producthunt.com/l/68cf97c80c/339 [pocket]

Lava Mae — Mobile Showers for the Homeless
http://www.producthunt.com/l/275ff76783/339 [pocket]

Androidify — Create & share Android characters that look like anyone
http://www.producthunt.com/l/680168e4e2/339 [pocket]

Empty States — Delight users by designing the empty states
http://www.producthunt.com/l/b02fc043d7/339 [pocket]

Code: https://github.com/aungthurhahein/Simple-Terminal-RSS-reader

Atrh
  • 195
  • 1
  • 3
  • 16
  • Could you clarify what you mean? E.g. like [this](http://stackoverflow.com/q/2338765/3001761)? Or something else? *"How can I achieve that?"* is not a good SO question; how have *you tried* to achieve it so far, and what have you learned in doing so? – jonrsharpe Nov 27 '14 at 09:16
  • @jonrsharpe Thanks for feedback. I edited the question details. The problem is not about redirecting url to browser. I am looking for a way to call a function with user interaction from terminal. – Atrh Nov 28 '14 at 03:58
  • This is better, but it's still not **great**. Please do not link to an external resource for code. It may be that this question is better suited for SuperUser as it involves the useability aspects of your particular terminal software. – OmnipotentEntity Nov 28 '14 at 05:14

1 Answers1

1

I depends a lot on the terminal and the operating system you are using .

For example in my bash session on ubuntu i can type echo http://www.stackoverflow.com and my terminal would allow me to click on the link . But when i try this on my osx terminal , i need to use various key combinations + mouse click to open the url .

I doubt that windows command line has a support for user interaction from its prompt . i'd say that there is no implementation dependent way to add clickable URL's to all available terminals/operating systems .

Alexander
  • 12,424
  • 5
  • 59
  • 76