inkview - read SVG from stdin

Bug #1804432 reported by anatoly techtonik
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Wishlist
Unassigned

Bug Description

I want this:

    $ systemd-analyze plot | inkview

Ubuntu 18.10, Inkscape 0.92.3. Still not there.

Tags: cli inkview
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Anatoly,

Can you not just pipe it to a file, and then open that in Inkview?

$ systemd-analyze plot plot.svg && inkview plot.svg

I'm not sure we'd want to read from stdin by default.

Changed in inkscape:
importance: Undecided → Wishlist
Changed in inkscape:
status: New → Opinion
Revision history for this message
Antonio Ospite (ospite) wrote :

I think the aim of the OP is to avoid temporary files.

A quick and dirty workaround is to use:

  $ systemd-analyze plot | inkview /dev/stdin

or

  $ systemd-analyze plot | inkview /dev/fd/0

This seems to work with the stable inkview version but not with the latest one from the master branch

A more portable solution which would probably require minimal changes, and is used by many other programs, is to detect if a file is named '-' and read from stdin in that case.

Ciao,
   Antonio

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Antonio,

Yes, using '-' would be a possible solution that would avoid defaulting to read stdin.

Changed in inkscape:
status: Opinion → Triaged
tags: added: ink
tags: added: cli inkview
removed: ink
Revision history for this message
anatoly techtonik (techtonik) wrote :

Antonio is right. I want to keep my files clean.

Tried to use "systemd-analyze plot > inkview.svg && inkview inkview.svg && rm inkview.svg" but `inkview` shows blank page, so I thought that maybe the file is removed before `inkview` started to show it. I now confirmed that file is still there, but it took this long, so must be another issue with `inkview` to render it. I attached the file.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Reading from stdin if "-" is specified is what I expected, right. But there is not --help and man page doesn't list options, so I couldn't check if it is a bug or a missing feature.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Reading from stdin when '-' is used isn't implemented in Inkview. It wouldn't be too tough to do though.

Revision history for this message
Hachmann (marenhachmann) wrote :

You maybe don't know that there have been made lots of changes and improvements to Inkview for the upcoming version. At least the help and --version part have been worked on, see also:
http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Inkview

and be sure to use the development version of Inkscape for your tests, Anatoly.

Revision history for this message
Hachmann (marenhachmann) wrote :

Sorry, looks like --version doesn't work yet, according to Tav on the mailing list.

Revision history for this message
Patrick Storz (ede123) wrote :

Reading files from a pipe was implemented in inkscape in
  https://gitlab.com/inkscape/inkscape/commit/eaae266840146a0faa3332f253ba7bd63eecbb21
by adding "-" as a special input filename. (Someone should probably check if this still works after the latest rewrite of inkscape's main(), but the functionality is there in principle.)

Ideally an implementation in inkview should work the same (or both implementations should be changed to match).

Revision history for this message
anatoly techtonik (techtonik) wrote : Re: [Bug 1804432] Re: inkview - read SVG from stdin

On Wed, Nov 21, 2018 at 9:20 PM Hachmann <email address hidden> wrote:
>
> You maybe don't know that there have been made lots of changes and improvements to Inkview for the upcoming version. At least the help and --version part have been worked on, see also:
> http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Inkview

No, I am not aware of that. Nice.

> and be sure to use the development version of Inkscape for your tests,
> Anatoly.

Is there an easy way to use it in Ubuntu 18.10? The page at
https://inkscape.org/release/master/platforms/ doesn't mention
upcoming 1.0 at all.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Asked the question about testing development builds in inkscape-devel https://sourceforge.net/p/inkscape/mailman/message/36475173/

Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting this request. I've migrated it to Inkscape's new bug tracker on GitLab (https://gitlab.com/inkscape/inbox/-/issues/6180), and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.