Custom Hugin PTO shortcut

Want to be able to select multiple photos in a panorama, then quickly kick off the Hugin auto-analysis for that grouping

> cat ~/bin/my_pto_gen
#!/usr/bin/env ruby

output = IO.popen(["pto_gen", *ARGV])
output.readlines.each do |line|
  if(line =~ /Written output to (.*)/)
    system("PTBatcherGUI", "-a", $1, "-b")
  end
end

> cat ~/bin/my_pto_gen.desktop
[Desktop Entry]
Version=1.0
Name=Custom Hugin PTO generator
Comment=Initialise a Hugin panorama project from multiple photos & run the assistant
Exec=my_pto_gen %F
NoDisplay=true
Icon=hugin
Terminal=false
Type=Application
Categories=Graphics;
MimeType=image/tiff;image/jpeg;
GenericName=Panorama project generator & assistant

desktop-file-install --dir=/home/matt/.local/share/applications/ /home/matt/bin/my_pto_gen.desktop
update-desktop-database /home/matt/.local/share/applications/




Comments are closed.