Giter Site home page Giter Site logo

Comments (22)

wader avatar wader commented on May 24, 2024 1

Merged #9 and #7 so you can test master now with both fixes

from ansisvg.

wader avatar wader commented on May 24, 2024 1

I work at a research institute that does a lot of publishing (code, papers, presentations...) so it's actually quite likely that I'll publish stuff generated by your tool, sooner or later! Will keep you posted

Oh elementary physics? i'm a sucker for reading about particle accelerators so happy to see it's being useful at such places!

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Note that in both cases, also the rear hoof is missing (compared to the terminal output):
image

from ansisvg.

wader avatar wader commented on May 24, 2024

Hey try #9. But not sure i follow about the missing rear hoof? :) is there some difference between the | | rear hoofs in the screenshots above?

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Thank you. The hoof problem appears to be limited to Firefox. Chromium and Safari render it correctly.
image

from ansisvg.

wader avatar wader commented on May 24, 2024

Strange, can you try https://raw.githubusercontent.com/wader/ansisvg/master/ansitosvg/testdata/cowsay-osc-colon-color.ansi.svg

Looks like this with firefox 120.0.1 on macos for me

Screenshot 2023-12-05 at 10 09 26

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Looks basically the same here
image

from ansisvg.

wader avatar wader commented on May 24, 2024

Huh ok so maybe the OSC skipping fixed it? the one that was broken above was that ansi-copied.txt or ansi-piped.txt?

from ansisvg.

wader avatar wader commented on May 24, 2024

Screenshot 2023-12-05 at 10 17 06

from ansisvg.

wader avatar wader commented on May 24, 2024

(ffcat will end up using inkscape png export)

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Huh ok so maybe the OSC skipping fixed it? the one that was broken above was that ansi-copied.txt or ansi-piped.txt?

Both were broken on Firefox ;) not sure why the OSC skipping fixed the latter, since it shouldn't contain OSC sequences.

from ansisvg.

wader avatar wader commented on May 24, 2024

Yeap weird, should be unrelated. But what verison of ansisvg was that? some version of #7? feels more likely a newer version of that one fixed it

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

It was the better-select branch that produced this error. The current master branch doesn't anymore. So we can probably consider it fixed (even though we don't understand it 😇)?

from ansisvg.

wader avatar wader commented on May 24, 2024

Mm guess so. That was not with also the old consolidate text patch? that one i could probably have messed so that the last character was missing :)

Anyways so now your kitty keybinding workflow work as intended? also a bit curious what you use ansisvg for? i've mostly used to produce demo screenshots for markdown and for presentations

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Mm guess so. That was not with also the old consolidate text patch? that one i could probably have messed so that the last character was missing :)

No it was created with the version that just uses tspan instead of text, so no actual consolidation there. And note it was not just "last character missing", but "last character missing but only on Firefox" :-)

Anyways so now your kitty keybinding workflow work as intended?

Will test later and let u know, thanks.

also a bit curious what you use ansisvg for? i've mostly used to produce demo screenshots for markdown and for presentations

I also intend to use it for markdown documentation. I used HTML copies of console text (earlier, with GNOME terminal, the "copy as HTML" feature - now, with kitty, the ansi-clipboard feature coupled to ansi2html).
HTML works great when writing emails, but it is less than optimal for markdown since 1) it clutters the actual markdown document and 2) markdown viewers can just ignore it at their whim (Gitlab for instance shows the monospace but ignores colors etc.)
I'd hope that both these issues are fixed with SVG since it's not inline but included as a separate file, and it's supposed to be a standard graphic format that looks the same regardless of viewer (in theory 😄)
As added bonus, I can load the file in inkscape and add captions, markings etc.

from ansisvg.

wader avatar wader commented on May 24, 2024

No it was created with the version that just uses tspan instead of text, so no actual consolidation there. And note it was not just "last character missing", but "last character missing but only on Firefox" :-)

Ok! sorry for being confused, i blame it's early here!

Will test later and let u know, thanks.

👍

I also intend to use it for markdown documentation. I used HTML copies of console text (earlier, with GNOME terminal, the "copy as HTML" feature - now, with kitty, the ansi-clipboard feature coupled to ansi2html). HTML works great when writing emails, but it is less than optimal for markdown since 1) it clutters the actual markdown document and 2) markdown viewers can just ignore it at their whim (Gitlab for instance shows the monospace but ignores colors etc.) I'd hope that both these issues are fixed with SVG since it's not inline but included as a separate file, and it's supposed to be a standard graphic format that looks the same regardless of viewer (in theory 😄) As added bonus, I can load the file in inkscape and add captions, markings etc.

I see. One annoying thing with SVG is that when used as an image in a HTML and markdown you usually can't select text in the SVG :( but i hope it works out for your use case. Let me know if you use it for something that is public! fun to see

Yes after working on ansisvg my illusion of SVG being a graphics format that should look the same everywhere have sadly been a bit shattered a bit :) but now knowing how it actually works it's kind of inevitable that font will be difficult. I guess converting fonts to some simpler svg primitives is probably needed to be even more portable.

BTW will think about and have a look at #4 later this week

from ansisvg.

wader avatar wader commented on May 24, 2024

@patrislav1 had time to test kitty keybinding?

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Yes, this works much better now, thank you.

There are still some weird edge cases where colors are not translated properly, but this only affects my zsh powerline prompt and doesn't appear to be related to this issue. So I think this issue can be closed

Screenshot from 2023-12-13 18-02-08
Screenshot from 2023-12-13 18-03-34

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

Let me know if you use it for something that is public! fun to see

I work at a research institute that does a lot of publishing (code, papers, presentations...) so it's actually quite likely that I'll publish stuff generated by your tool, sooner or later! Will keep you posted

from ansisvg.

wader avatar wader commented on May 24, 2024

Yes, this works much better now, thank you.

👍

There are still some weird edge cases where colors are not translated properly, but this only affects my zsh powerline prompt and doesn't appear to be related to this issue. So I think this issue can be closed

You mean some of the "arrows" looks wrong? strange that some of them are correct but not others. I can try reproduce it, or can you post the ansi input? have a feeling it's something not too tricky to fix.

from ansisvg.

patrislav1 avatar patrislav1 commented on May 24, 2024

I can try reproduce it, or can you post the ansi input?

I’ll gather some data and open a separate issue. I also noted that the filled background position is off, making the arrows look misaligned. Will try to fix the positions when time permits.

from ansisvg.

wader avatar wader commented on May 24, 2024

Managed to produce some ansi output from a powerline shell and fixed some things #16 #17. Try it out and open an issue if there is still something that looks strange.

from ansisvg.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.