13 votes

Question: can Tildes ever have something like the reddit terminal viewer?

Tags: ask

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.

20 comments

  1. [4]
    lionirdeadman
    Link
    If we have an API, which is something we want in the future, yes. It's totally possible.

    If we have an API, which is something we want in the future, yes. It's totally possible.

    11 votes
    1. [2]
      unknown user
      Link Parent
      It could also be done just parsing the HTML (given it is public now), tho it's way more fragile than an API.

      It could also be done just parsing the HTML (given it is public now), tho it's way more fragile than an API.

      4 votes
      1. lionirdeadman
        Link Parent
        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...

        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.

        3 votes
  2. [16]
    teaearlgraycold
    Link
    You could always use lynx in the mean time

    You could always use lynx in the mean time

    1 vote
    1. [8]
      mftrhu
      Link Parent
      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...

      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.

      4 votes
      1. [7]
        Deimos
        Link Parent
        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...

        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.

        4 votes
        1. [6]
          mftrhu
          Link Parent
          I can't think of any - CSS is supported only by elinks, and even then neither display: none nor visibility: hidden seem to do anything. The HTML spec does include an hidden attribute, but it's not...

          I can't think of any - CSS is supported only by elinks, and even then neither display: none nor visibility: hidden seem to do anything. The HTML spec does include an hidden 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.

          I could probably move the excerpts more into Javascript as well, but it would complicate some of the collapsing.

          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

          <div class="comment-excerpt">If we have an API, which is something we want in the future, yes. It&#39;s totally possible.</div>
              </header>
                <div class="comment-text">
                  <p>If we have an API, which <em>is</em> something we want in the future, yes. It's totally possible.</p>
                </div>
          

          But it could be

          <div class="comment-excerpt"></div>
              </header>
                <div class="comment-text">
                  <div class="comment-excerpt"><p>If we have an API, which <em>is</em> something we want in the future, yes. It's totally possible.</p></div><!-- rest of the comment -->
                </div>
          

          And you could just copy the text over with Javascript? Or possibly, somehow, hide everything but the excerpt?

          1 vote
          1. [5]
            Deimos
            (edited )
            Link Parent
            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...

            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.

            3 votes
            1. [2]
              mftrhu
              Link Parent
              Hmmm, not necessarily. You could move the excerpt into an attribute and then display it via CSS. .comment-excerpt::after { content: attr(data-excerpt); } <div class="comment-excerpt"...

              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

              Hmmm, not necessarily. You could move the excerpt into an attribute and then display it via CSS.

              .comment-excerpt::after { content: attr(data-excerpt); }
              
              <div class="comment-excerpt" data-excerpt="Text of the excerpt"></div>
              
              4 votes
              1. Deimos
                Link Parent
                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 for content:. I'll add an issue to try moving to that...

                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 for content:. I'll add an issue to try moving to that method, since that should be much better if it's possible. Thanks!

                4 votes
            2. [2]
              Amarok
              Link Parent
              Could you do this with the user theme option? Create a special theme that changes the page?

              Could you do this with the user theme option? Create a special theme that changes the page?

              1. Deimos
                Link Parent
                Not with the current theme system, no. It only uses CSS, and the problem is that the text browsers ignore CSS.

                Not with the current theme system, no. It only uses CSS, and the problem is that the text browsers ignore CSS.

                1 vote
    2. [7]
      mrbig
      Link Parent
      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?

      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?

      1. [5]
        Deimos
        Link Parent
        It depends on exactly what usage you want this for, but there's a new text-based browser named Browsh that seems pretty impressive.

        It depends on exactly what usage you want this for, but there's a new text-based browser named Browsh that seems pretty impressive.

        2 votes
        1. [3]
          mrbig
          Link Parent
          Can I use it without ssh? Just run it and on my machine?

          Can I use it without ssh? Just run it and on my machine?

          1. [2]
            Deimos
            Link Parent
            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...

            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.

            1. mrbig
              Link Parent
              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...

              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!

              1 vote