Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Minimal version / styling #4

Open
symph0nic opened this issue Mar 16, 2021 · 4 comments
Open

Feature Request: Minimal version / styling #4

symph0nic opened this issue Mar 16, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@symph0nic
Copy link

Hey! Thanks for creating such an awesome utility. I was wondering if it would be possible to do 2 things:

1 - Allow aliasing for Stock Names. For example, pulling back 'CB3.PA' works great, but the stock name is stupidly long (at the source) - it would be great if I could have an alias for that.
2 - Allow a minimal version / selection of individual fields - for example, just return the price, or the change, by addition of switches or similar.

Thanks!

@shweshi
Copy link
Owner

shweshi commented Mar 16, 2021

@symph0nic thanks for using terminal-stocks and providing the suggestions to improve it further.

Alias would be a nice addition to terminal-stocks and it will make it much easier to use. I will try to add support for alias soon.

Field selection can also be done will add it soon.

@shweshi shweshi self-assigned this Mar 16, 2021
@shweshi shweshi added the enhancement New feature or request label Mar 16, 2021
@quandangv
Copy link

quandangv commented Mar 31, 2021

Some thought about the field selection feature: if the --csv switch prints the output directly to the terminal, it would be trivial to select any field.
The current --csv switch writes to a file (which is already problematic for automated uses) and don't print out the file name, making it unnecessarily too complicated to retrieve the actual csv output.

@shweshi
Copy link
Owner

shweshi commented Mar 31, 2021

@quandangv --csv switch export all the fields as a json. The file name can be printed in the console that should not be a problem and that will be helpful for the automated use. Probably with next enhancement it can be taken up.

I am still trying to get my head around how to provide a clean, intuitive and user friendly interface for field selection.
I am thinking about something like this:
For field selection without export:
terminal-stocks -t <ticker> --fields name,price,percentageChage,dayChange,weekChage
so the users can pass the fields they want as a comma separated string.

For export
terminal-stocks -t <ticker> --fields name,price,percentageChage,dayChange,weekChage --csv

@quandangv @symph0nic Let me know your thoughts/suggestions.

Happy Coding!

@quandangv
Copy link

I think your idea of the field selection is fine, the important thing is that I want the option to get the unformatted output printed in the console, not exported to a file, so that I can easily parse it and use in my application.

If you want to improve the export even more, I would suggest something like:
terminal-stocks -t <ticker> --format "%name: %price,%percentageChage,%dayChange,%weekChage"
The tokens will be replaced with the right value, and the user can take some freedom in formatting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants