6 ms·
Show HN: Plain Text Cryptocurrency Prices
- weird-eye-issue 4y agoIs this white page some sort of satire or is it down?
- memorable 4y agoIt's down ATM. I found a Wayback Machine snapshot for proof. https://web.archive.org/web/20220614131126/https://plaintextco.in/ https://web.archive.org/web/20220614131126/https://plaintext...
- jokestir 4y agoThat's awesome. Some things that can be improved: - The UI is left justified on my mobile browser. It will look better if it is centered. - The font is too small. Perhaps you could increase font size so users don't have to zoom in. Also, did you a framework to generate plaintext front-end or is it hand crafted?
- guillaumec 4y agoThanks for the comment! I wanted to keep the html and css as simple as possible so I didn't put much layout. If it gets traction I will improve that. Same thing for the font. It's all hand crafted. My first time using golang so the code is probably not as efficient as it could be.
- 1337shadow 4y agoReally? It even renders ascii and colors properly in a terminal with curl !!! \xe2\x94\x82\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x98\n
- _eht 4y agoPlaintext and ascii art are in this year and that’s cool to me. Nice work.
- sodality2 4y agoGetting a 504 :(
- guillaumec 4y agoYeah the server is not handling the load at the moment... I am trying to restart it.
- KyleBerezin 4y agoThe curse of Hacker News attention
- guillaumec 4y agoWell, I should have tested a bit more before posting.
- nominusllc 4y agoIs the source posted somewhere? Maybe we can help
- guillaumec 4y agoNot at the moment, this was a week end project, and the code is quite horrible. But yes I should probably put it online and get advise.
- nominusllc 4y agopas grave, post it :)
- Retr0id 4y agoAn intriguing failure mode (response body seems truncated) $ curl -i https://plaintextco.in/ HTTP/2 504 date: Tue, 14 Jun 2022 14:13:44 GMT [more headers] cf-ray: 71b3ab17fc7254d5-MAN <!DOCTYPE htm
- rabuse 4y agoAll I see is a white page.
- memorable 4y agoSame here. Hug of death.
- bluetidepro 4y agoHN hug of death, I assume.
- matthewcford 4y agoI assumed the prices were 0, hence the empty webpage.
- olalonde 4y agoPretty cool, I noticed it works both in the browser and command line. I suppose you are using the User-Agent header to detect which version to serve? Which library did you use for the interface?
- guillaumec 4y agoIt's all done by hand in go. Yes it uses the user agent to guess if the request comes from a terminal.
- KyleBerezin 4y agoFirefox 101.0.1 on Windows didn't seem to render it correctly. I was going to compare it to chrome but then the server died. Very cool page though. Update: the server is back up and it looks fine on Firefox now. false alarm
- danuker 4y agoThis is awesome! I will be able to check the prices without spinning up my old laptop's fan. My preference for time is much longer-term. Trading too often can lead to ruin due to transaction fees (and/or emotion). I'd use the 1 day, 30 day, and 365 day price changes instead of 1h, 24h, 7d. Another small issue: I can't use autoscroll in Firefox because the whole page width is a link.
- giantrobot 4y agoI got a blank page...did crypto prices drop that much today?
- j_leboulanger 4y agoHere is an extract of what happens in terminal : curl https://plaintextco.in/coins/bitcoin https://plaintextco.in/coins/bitcoin <!DOCTYPE html> <title></title> <meta name="description" content="Plain text cryptocurrency prices"> <style> @font-face { font-family: 'dejavu-sans-mono'; src: url('/static/DejaVuSansMono.ttf') format('truetype'); } * { font-family: 'dejavu-sans-mono'; font-size: small; line-height: 120%; } </style> <h1>plaintextco.in</h1> <h1></h1> <pre> Bitcoin (BTC) <span style="color: #f7931a;"></span><span style="color: #f7931a;"></span><span style="color: #fe971a;background-color: #f7931a;"></span><span style="color: #fe971a;background-color: #f7931a;"></span><span style="color: #fc961a;background-color: #f7931a;"></span><span style="color: #fc961a;background-color: #f7931a;"></span><span style="color: #fd971a;background-color: #f7931a;"></span><span style="color: #ff971a;background-color: #f7931a;"></span><span style="color: #f7931a;"></span><span style="color: #f7931a;"></span> Price $22,183 <span style="color: #f7931a;"></span><span style="color: #f7931a;background-color: #f7931a;"></span><span style="color: #fd971a;background-color: #f7931a;"></span><span style="color: #f7931a;background-color: #ff9a1b;"></span><span style="color: #f79319;background-color: #fa941a;"></span><span style="color: #f79217;background-color: #f7931a;"></span><span style="color: #f79116;background-color: #f7931a;"></span><span style="color: #f9a239;background-color: #f79116;"></span><span style="color: #f9a53f;ba It's impossible to read :(
- guillaumec 4y agoActually it also supports a black and white mode using only utf8 characters. I haven't exposed it yet though.
- paulnpace 4y agoLynx looks great.
- jasonjayr 4y agoElinks in a terminal with 256 color + utf-8 renders it pretty decently. https://imgur.com/a/NPsN5N5 https://imgur.com/a/NPsN5N5
- deleted 4y ago
- paulnpace 4y agoInteresting. I wasn't aware that you could use a Cloudflare IP address along with a different name server.
- julianeon 4y agoThis is really nice. Great work.
- lazyvar 4y agoSome small feedback if I may: Could you separate the link and the text on the main page? My first thought was: "This isn't text. I can't highlight or copy anything. It's actually the opposite of what the title says." But everything was as advertised when viewing an actual coin. Cool site! Cheers!
- guillaumec 4y agoYou are probably right. I should also probably add a link to a 'true' plain text version that returns a pure txt.
- memorable 4y agohttps://web.archive.org/web/20220614131126/https://plaintextco.in/ https://web.archive.org/web/20220614131126/https://plaintext...
- deleted 4y ago[deleted]
- tiborsaas 4y agoI get randomly HTML and ASCII in the terminal, otherwise cool product. It would be nice to configure a list of coins to be displayed. Something like: https://plaintextco.in/collection/btc+tezos+near Also, you could reduce the HTML size significantly by using <i> instead of <span> and create a classnames for the colors.
- alainchabat 4y agolooks like OP implemented it ( https://plaintextco.in/about https://plaintextco.in/about ) : https://plaintextco.in/?ids=bitcoin,ethereum,mina-protocol,avalanche-2
- tiborsaas 4y agooh cool, it's now ready for bookmarking :)
- guillaumec 4y agoYes, since I got too many requests from HN, I had to enable the CDN. I didn't realize it would cache both html and terminal request together. I tried setting "Vary: User-Agent" but it didn't work. You can add: "?term=true" to make it work in terminal for now.
- weird-eye-issue 4y agoI think Vary: Accept-Encoding or similar is the solution for this but not sure
- GabrielStarks 4y ago[dead]
- rkagerer 4y agoOh. From the headline I was hoping for something easily parseable.