Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: ANSI color support on preformatted text #74

Open
jchaves opened this issue Dec 14, 2024 · 0 comments
Open

feature request: ANSI color support on preformatted text #74

jchaves opened this issue Dec 14, 2024 · 0 comments

Comments

@jchaves
Copy link

jchaves commented Dec 14, 2024

Hi there,

After fiddling around with Gemini for a couple of weeks, i realized some clients have implemented this neat "out-of standard" feature where they support displaying colors formatted with "terminal" color codes.

Deedum seems to be the only gemini client that is able to run in an old tablet I have (It's stuck in android 4.4, no support, no way to update, and also probably not powerful enough).

So, anyway, I'm not sure if you still look at this project at all, but I went ahead and implemented this feature, along with a couple more little things:

  • the content now spans the whole width (so I could scroll gemini://bbs.geminispace.org/s/ with my right thumb on the right side of the screen :D)
  • The input field now accepts multi-line text (after I tried to create an entry on bbs.geminispace.org and could not add newlines)

The "ANSI support" has an entry in the settings page, and I followed a bit what Lagrange does with this: there are options for "don't interpret anything", "foreground colors", "FG and BG", and "full" (which currently checks for bold or underlined)

I suggest using the "fg colors" as default, the others can be a bit overwhelming...

I'll open a pull request soon, in case you wanna check it. I'm using a couple libs I've found (one on an old version to mantain compatibilitiy, other forked and modified because Wordo was making it crash :D)

I haven't been able to build the apk (I suspect that might take more fiddling than what I have time for), but I've managed to get a debug-apk and try it on my phone. Sadly, haven't been able to test it on the old tablet, which was originaly the goal :D

I was really improvising all the time as I went along, as I had zero Dart/Flutter knowledge, so feel free to correct anything I might have effed up :D

If you manage to integrate this and build, I would ask you to ... keep compatibility with old android versions like you had on your last release? and I would also thank you in advance :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant