I'd like to help out with this packaging effort if possible;
specifically toward integration with the XDG desktop for ease of use.
When it's finished, a blorb file should have a thumbnail of the included
cover art, and double clicking it should open it in gargoyle. This would
require integrating the Babel <http://babel.ifarchive.org/> program,
either included or as another package; and writing a small wrapper
script that GNOME can call when it needs to make a thumbnail.

Here are some preliminary files to this effect (obviously the other
formats that gargoyle can open will need to be added):


## Mime info

cat ~/.local/share/mime/packages/gargoyle.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info";>
 <mime-type type="application/x-blorb">
  <comment>Blorb Interactive Fiction</comment>
  <glob pattern="*.blorb"/>
  <glob pattern="*.blb"/>
  <glob pattern="*.gblorb"/>
  <glob pattern="*.glb"/>
  <glob pattern="*.zblorb"/>
  <glob pattern="*.zlb"/>
 </mime-type>
 <mime-type type="application/x-zmachine">
  <comment>Z-machine game data</comment>
  <glob pattern="*.z1"/>
  <glob pattern="*.z2"/>
  <glob pattern="*.z3"/>
  <glob pattern="*.z4"/>
  <glob pattern="*.z5"/>
  <glob pattern="*.z6"/>
  <glob pattern="*.z7"/>
  <glob pattern="*.z8"/>
 </mime-type>
</mime-info>


## Launcher

cat ~/.local/share/applications/gargoyle.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Gargoyle
Comment=An interactive fiction player
Exec=gargoyle %f
Icon=accessories-dictionary
NoDisplay=true
MimeType=application/x-blorb;application/x-zmachine;


...and a really dumb script (to install in 
gconf:/desktop/gnome/thumbnailers/applicat...@x-blorb/command):

## Thumbnailer

#!/usr/bin/ruby
size,file,target = ARGV
output = `babel -cover #{file} -to /tmp`
case output
when /^Extracted/
  cover = "/tmp/" + output.split[1]
  `convert -resize #{size}x#{size} #{cover} #{target}`
  `rm -f #{cover}`
else
  exit! 1
end

-- 
[needs-packaging] please package gargoyle interactive fiction reader
https://bugs.launchpad.net/bugs/301455
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to