
Use Emacs Org Mode and REST APIs for an up-to-date stock portfolio - zeveb
http://www.sastibe.de/2018/05/2018-05-11-emacs-org-mode-rest-apis-stocks/
======
kovek
Slightly related. I think it would be cool to be able to browse the web using
org-mode. It could be very efficient.

`* google How do I walk my cat outside`

then moving cursor to that headline and pressing C-c C-c, for example, would
make turn it into:

    
    
        * google How do I walk my cat outside
    
        ** How To Walk Your Cat On A Leash, And Why You Should | HuffPost
    
        ** Should You Walk Your Cat Outdoors on a Leash?
    
        ** Is Walking Your Cat Really a Good Idea? - Vetstreet.com
    
        ** How to Walk Your Cat on a Leash... Safely - Preventive Vet
    
        ** How to Walk a Cat (and Live to Tell About It) | petMD
    
        ** Can Indoor Cats Enjoy Safe Fun Outside Too? How to Keep Your Cat ...
    
        ** People Try Walking Their Cats - YouTube
    
        ** How to Walk Your Cat | Pet Training Tips
    
        ** How To Walk Your Cat: It's Easier Than You Think | PetSafe® Articles
    
        ** Train your cat to walk on a leash – Adventure Cats
    
    

Then, moving the cursor to the third result "Is Walking Your Cat Really a Good
Idea? - Vetstreet.com", and pressing C-c C-c would expand it again with the
main text content of the page and some important links:

    
    
        [...edited out...]
    
        ** Should You Walk Your Cat Outdoors on a Leash?
    
        ** Is Walking Your Cat Really a Good Idea? - Vetstreet.com
    
        *** Main content
    
        Q. Do you think it’s a good idea to take my cat for walks? I saw harnesses and leashes for cats at the pet supply store.
    
        A. That would depend very much [...edited out...]
    
        trying to accomplish is getting your indoor cat some access to the outside, that's probably better accomplished with a roomy cat patio.
    
        *** [page link][http://www.vetstreet.com/our-pet-experts/does-my-cat-need-to-go-for-walks]
    
        *** Read more
    
        *** [Cats][http://www.vetstreet.com/category/species/cats]
    
        *** [Veterinarian Written][http://www.vetstreet.com/category/sitecontent/veterinarian-written]
    
        *** [Cat Training][http://www.vetstreet.com/category/sitecontent/cat-training]
    
        *** [Cat Behavior][http://www.vetstreet.com/category/sitecontent/cat-behavior]
    
        ** How to Walk Your Cat on a Leash... Safely - Preventive Vet
    
        [...edited out...]

~~~
JoshMnem
That sounds like it would be fun to write. You could even load the search
results in Helm (see the end of the video below). Then selecting a result
could render the page in headless Firefox (or something like elinks) and send
the text output to a buffer.

[https://www.youtube.com/watch?v=XjKtkEMUYGc](https://www.youtube.com/watch?v=XjKtkEMUYGc)

~~~
gkya
Emacs has shr which renders HTML natively.

------
onyva
Loved his enthusiasm. I feel very much the same about emacs. It’s endless and
you can easily spend most of your day in it, experimenting.

I got back to emacs few years back, than contributed to spacemacs (which is
great, but also makes you forget how awesome real emacs is), now giving “emacs
doom” a second look. Fascinating in a completely different way.

~~~
rashkov
If you don't mind expanding a bit, what would you say to a Spacemacs user to
encourage that user to explore vanilla emacs?

~~~
onyva
Spacemacs feels very abstracted. It’s great to have so much work done for you,
but the knowledge is not transferable. Unless you develop layers yourself and
can understand the internals, be difficult to use your knowledge outside of
spacemacs.

I’ve looked at the module abstracts in doom and they don’t look foreign. They
do look way above my level of emacs lisp tough.

There’s also the evil stuff in spacemacs which is great and I grew fond of,
but if you’re not familiar with emacs’ native bindings, it makes it impossible
to use vanilla emacs when you have too.

~~~
pritambaral
> There’s also the evil stuff in spacemacs which is great and I grew fond of,
> but if you’re not familiar with emacs’ native bindings, it makes it
> impossible to use vanilla emacs when you have too.

In such situations, if one cannot install spacemacs, at least they can use
vim.

There's also the fact that some evil users use it _because_ they want to edit
text the vim way and not the emacs way. Such people wouldn't want to use
vanilla emacs anyway.

~~~
rashkov
I think that onyva might be referring to those situations where various
plugins and emacs major modes require you to operate with emacs bindings, and
are otherwise incompatible with vim bindings. It’s a bit rare but I’ve had to
switch to emacs when trying to do some things in erc (irc client), eww (web
browser), and eshell (terminal).

------
bitwize
> Emacs is like a classical steel frame road bike, reliant, robust, nothing
> fancy but easy to repair.

I usually find myself comparing Emacs to the A-10 Warthog: It's big, slow, and
ugly, but when you have a big ugly job it's absolutely your best friend. Also
it's spent decades surviving the most determined attempts to get rid of it.

(In this analogy, Atom plays the role of the F-35 JSF: intended to replace
what already exists in a variety of missions, but absolutely not mission-
capable at any of them.)

------
twblalock
I've been using the GOOGLEFINANCE function in Google Sheets for this. It works
pretty well, but there are some institutional funds in my 401k without
tickers, e.g. "Vanguard Institutional 500 Index Trust". Has anyone seen an API
that can deal with funds like that?

~~~
anonuser123456
For funds that track a well known index (like VFFSX), use a well known fund
that tracks the same index (SPDR) and normalize the results. There will be
some tracking error, but it should be small enough to not bother correcting.

------
Jtsummers
Huh, neat. I threw something similar together using org-mode but calling the
API via curl (because I already had that working from somewhere else). Throw
the results into a table. The table contents are then used in another script
to create entries for ledger-cli.

I need to fix it up because it's clunky and still requires more manual
intervention than should be necessary.

I typically run it once a month (I don't care about _daily_ prices, just end
of month) using the last trading day of the month.

I may update it to use this process instead, keep it all in emacs.

------
zitterbewegung
Couldn't you also use this to test REST API's that you are interfacing with?
Wonder if you could expand this to do stuff that postman does.

~~~
b3n
Emacs already has restclient.el[1]. Wonderful little tool. :-)

[1]
[https://github.com/pashky/restclient.el](https://github.com/pashky/restclient.el)

------
Vekz
I need this for crypto

~~~
l8nite
There's a CRYPTOFINANCE() google sheets plugin that does a pretty good job.
I've been using it the last few months.

[https://chrome.google.com/webstore/detail/cryptofinance/bhjn...](https://chrome.google.com/webstore/detail/cryptofinance/bhjnahcnhemcnnenhgbmmdapapblnlcn?hl=en)

