407

I just started working on a little project to browse devrant from terminal. It converts images to ascii art!

Comments
  • 49
    Wow that is awesome!
  • 67
    Does it convert GIF to moving ASCII art?
  • 44
    @paradonym my head just exploded
  • 27
    @dfox go ahead hire this guy
  • 5
    Amazing. I love it. I want it.
  • 1
    This is such a good idea!
  • 13
    I'd love to help if you open source it!
  • 2
    Thats really cool. Throw it on git bud, we'll give ya a hand. Post the link in here.
  • 13
    Here you go guys!! https://github.com/CanNuhlar/...

    Code is not pretty though :(
  • 0
    @lukegv nope. Thought that it's not worth it. it's a quite basic piece of code.
  • 2
  • 4
    Looks really interesting but the ASCII art thing doesn't work great for complex photos like the one in your screenshot, alters the context of the post haha
  • 2
    @MaccaMc haha yeah. It needs some tweaking I guess. Will dive into that when I got some free time.
  • 1
    @CanNuhlar Yeah, don't get me wrong though, really interesting project. Keep us updated :)
  • 0
    That is awesome !
  • 1
  • 1
    @CanNuhlar are you French ? A "canular" (same phonetic) here is a kind of joke so your nickname made me laught
  • 1
    It makes me feel like I am logging into the devRant BBS!
  • 6
    Does it come with complimentary dialup modem sounds?
  • 1
    hahaha this is my post, awesome :)
  • 7
    Shut up and take my ++.
  • 4
    Posting this update from terminal :P Added login option, up/down vote, add comments, search, browsing individual rants. Didn't realize that devRant had a beautiful API, I'll probably gonna dump bs4 and parse API only in the future. Pushing changes to git now!
  • 0
    @Kami haha it's my name and surname combined
  • 2
    @CanNuhlar look haha
  • 2
    Boy oh boy this is awesome. Will contribute to this repo as soon as my holidays gets over in few days ✌️
  • 2
    great idea :)
  • 4
    Wait have people not seen libcaca? It converts any image to colored ascii art (terminal escape colors). There's even a cacaview tool that lets you zoom to get more detail and change the dithering and gamma at runtime. It can be used as a native rendering mode for mpv - so you can just run mpv --vo=caca http://YouTube.com/hAsHN4m3 to watch a YouTube vid in the terminal. Posting gif soon.
  • 3
  • 1
    @thejohnhoffer For the lynx browser, there are no inline images, but you can view them as links like this:
  • 1
    @varundey @CanNuhlar @provector @reduxtris @dfox @paradonym hey collaborators: this problem has been solved in one way by lynx+libcaca and mpv+libcaca as shown above. I think we should use cacaview to render color images in a full screen interactive viewer. We should also use mpv+libcaca to display the gifs in the same kind of viewer. IMHO, we should value interactive over inline viewing, but it's possible to allow interactive inline images. I've just looked at a lot of images this way over ssh into my work machine, and with the low resolution it's so helpful to be able to zoom in and change brightness and contrast levels.
  • 1
    @thejohnhoffer here's a good example where the part of the image we care about is too white, so we need to darken it, zoom in and set the dithering to be less colorful.
  • 1
    Just for fun, on the left is the "ascii" art library libcaca run on an edge-filtered image. On the right might be more of what you'd expect from "ascii art", but I just made it by hand really quickly, and I think you can see how it's likely a viewer that does that sort of thing automatically would be less useful than the more photorealistic rendering. But it may be interesting to see such a viewer in action.
  • 1
    @thejohnhoffer ALSO... total moonshot would be optical character recognition that shows actual ASCII text for the words in devrant's screengrabs, memes or comics OVERLAYED atop an ASCII rendering of the source images or gifs.
  • 4
    Or, we develop a magical program to capture the essence of an image or video in extremely artistic plaintext:

    EMERGENCY TELEPHONE
    Only 911 can be dialed
    . ,==.-------.
    . |( ) =====\
    . \ | | [1][ ][ ] |
    ..8|| | [ ][ ][ ] |
    .8 || | [ ][ ][9] |
    .8 ( ) O O O /
    .88=='-----~
  • 2
    I just realized I can already run "lynx https://DevRant.io/feed/algo" and this is what happens:
  • 0
    @thejohnhoffer but there's none of the API functionality @CanNuhlar made use of for DevRant's "native python app". I.e., with lynx you can't reply, ++, --, or report rants.
  • 2
    Hey guys, I was a little busy with my life this week but managed spend some time on it. Added some more features and will probably update tomorrow. I will look into ascii art thing in more depth too.
  • 1
    @dfox hey! https://devrant.io/api/users/... seems to return Bad Request sometimes. Any idea why? Parameters I'm using token_id, token_key, user_id, last_time=0, app=3, plat=3. And do you have a API link for the feed itself? I couldn't find it.
  • 0
    as much as i feel like this would be better with ncurses as a native binary xD I'm too lazy to do it, kodus for you
  • 0
    @CanNuhlar sorry for the slow response - I missed your question the first time around.

    That looks correct - how often was it returning bad request? It definitely shouldn't during normal use and I don't think that endpoint has failed a lot in the past.

    Any additional details would be appreciated.
  • 0
    Whattttttt so fucking cool dude
    Big like
  • 0
    @CanNuhlar I'm getting syntax error invalid syntax error.
  • 0
    Bmp drawer on c#
Add Comment