Let’s, hypothetically, say I have a mariadb of structured information that keeps itself current and there’s no need for GUI. The view would be a CLI.
What I want to do is run commands on my shell that returns data from the db to the console in a structured way depending on the command. For example, command whothehellis [argument]
would be a ruby script that would return from the database to the console their fName, lName, officeNumber, hobbies, and University they went to.
So it might work like this:
whothehellis Nye
Bill Nye | Mailroom 212 | Ping Pong, Writing Short Stories | Rutgers
Would I use Sinatra for this? Just use get requests with the arguments and write controllers to handle the data gathering? Would this be possible in Rails? I’d like to deploy this so I can hit it from anywhere with an internet connection. But the idea is to never have to leave my terminal - not even to log into mariadb to get this information.
Suggestions? Frameworks? Advice? Resources or concepts to google?
Anything is appreciated.