13
votes
Question: can Tildes ever have something like the reddit terminal viewer?
The Reddit Terminal Viewer allows viewing Reddit on the terminal with Vim-like command. It's awesome. I wonder if Tildes is built in a way that would allow something like that.
If we have an API, which is something we want in the future, yes. It's totally possible.
It could also be done just parsing the HTML (given it is public now), tho it's way more fragile than an API.
Well, you wouldn't get commenting with that. You'd need to recreate cookies for authentication, interact with the website's JavaScript and do a bunch of things, It's not really something you'd want to do.
I can't wait!
You could always use lynx in the mean time
Using Tildes with text browsers is... a bit iffy. The text of each comment - well, most of the text, but it doesn't make a iota of difference for short comments - gets repeated twice (because of
.comment-excerpt
), which makes threads very noisy, and you can't actually use the site beyond that.Hmm, that's too bad. I wonder if there's a way to hide the excerpts from text-based browsers. I could probably move the excerpts more into Javascript as well, but it would complicate some of the collapsing.
I can't think of any - CSS is supported only by elinks, and even then neither
display: none
norvisibility: hidden
seem to do anything. The HTML spec does include anhidden
attribute, but it's not understood by any of the text browsers I tried (lynx
2.8.7;w3m
0.5.3;links
2.14;elinks
0.12pre6).Sniffing the user agent to serve an excerpt-less page would probably work, but it would also be ugly.
What about marking up the text of the comment itself, instead of duplicating it server-side? e.g., this page currently contains the following snippet
But it could be
And you could just copy the text over with Javascript? Or possibly, somehow, hide everything but the excerpt?
It's more complicated than that, because the excerpts are (and need to be) just plain text. For example, we don't want links to be clickable in the excerpts, or for a comment with a table in it to generate a huge excerpt, etc. They also have some extra logic, like removing any blockquotes so that the excerpt doesn't make it look like the user wrote something that they're just quoting from someone else.
I could move the excerpts into an attribute in the HTML, but then that would make collapsing completely dependent on javascript, instead of it being done in CSS like it is now. Right now, someone with javascript disabled can still have comments collapsed due to the auto-collapsing of noise comments and old comments (if they have visit-tracking enabled), and changing it to be javascript-based would stop that from working. It's probably not a big deal overall, just a trade-off.
Hmmm, not necessarily. You could move the excerpt into an attribute and then display it via CSS.
Huh, for some reason I was under the impression that the browser support for
attr()
was bad, but it looks like everything should support it forcontent:
. I'll add an issue to try moving to that method, since that should be much better if it's possible. Thanks!Could you do this with the user theme option? Create a special theme that changes the page?
Not with the current theme system, no. It only uses CSS, and the problem is that the text browsers ignore CSS.
I have tried text browsers before, but it seems to me that the web simply wasn't meant for them. But they could work for something like Tildes. Why do you suggest lynx specifically?
It depends on exactly what usage you want this for, but there's a new text-based browser named Browsh that seems pretty impressive.
Cool, thanks!
Can I use it without ssh? Just run it and on my machine?
Yes, but like the Downloads page says, doing that won't save you any bandwidth or anything, because it loads the full web pages in Firefox in the background and then converts them to text. So it should work as long as you just want a text-based browser for its own sake but aren't trying to reduce bandwidth usage.
Huh. The guy is just installing my new ISP modem here. I don’t think I’ll need to save bandwidth for much longer. I also don’t really know how to use ssh, nor have access to another server. I don’t think browsh is for me!
Lynx is the only one I'm aware of