Feature request: nona take script from stdin

Bug #1039222 reported by Ted Shaneyfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Won't Fix
Wishlist
Unassigned

Bug Description

It should be simple to optionally take script from stdin.

Currently nona requires a pto file to be specified.

Perhaps using a single dash could indicate stdin as is conventional among many programs.

This is not a workaround:

nona` -o TIFF_m /dev/stdin

as demonstrated here:

$ nona -o TIFF_m /dev/stdin <<END
> v
> p n"TIFF_m" v90 h1024 w1024
> i n"~/beach.tif" f4 v360 y0 p0 h6203 w12406
> END

ContractViolation:
Precondition violation!
Unable to open file '/dev/~/beach.tif'.
(/Users/Shared/development/hugin_related/hugin-2011.4.0/mac/../src/foreign/vigra/vigra_impex/codecman:206)

caught exception:
Precondition violation!
Unable to open file '/dev/~/beach.tif'.
(/Users/Shared/development/hugin_related/hugin-2011.4.0/mac/../src/foreign/vigra/vigra_impex/codecman:206)

A good solution may be to use a dash to read from stdin like this:
$ nona -o TIFF_m - <<END
> v
> p n"TIFF_m" v90 h1024 w1024
> i n"~/beach.tif" f4 v360 y0 p0 h6203 w12406
> END

affects: panotools → hugin
Changed in hugin:
importance: Undecided → Wishlist
Revision history for this message
tmodes (tmodes) wrote :

The workaround seems to work. The format of the script is wrong. Hugin does not support environment variables in pto file. The filename is relative to the working dir or absolute.
Check first with a working pto file. When it works here you can go further and experiment.
I'm not sure if the option with the dash works, because after the project filename you can specify further images (using the project file as template).

tmodes (tmodes)
Changed in hugin:
status: New → Triaged
Revision history for this message
tmodes (tmodes) wrote :

I thought on extending this idea on other Hugin tools which read/write pto files. But this will probably not work correctly in all cases: on Linux the pipe buffer size is between 16 and 64 kB (depending on configuration). This is too small for even medium size projects.

Changed in hugin:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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