Page 4 of 11 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 106

Thread: HOWTO: Thumbnails for OpenOffice.org 2 files

  1. #31

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    http://www.flyn.org/projects/nautilu...ers/index.html

    This will create thumbnails for word files but you need Abiword installed

  2. #32
    Join Date
    Mar 2005
    Location
    Netherlands
    Beans
    734
    Distro
    Ubuntu Karmic Koala (testing)

    Cool Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    Quote Originally Posted by Human Prototype
    SCHWEET! Works great - any chance this can be incorporated into dapper with an option to turn it off sumwhere?
    Probably yes: I filed this bug: http://bugzilla.ubuntu.com/show_bug.cgi?id=19715 and almost immediately got a positive respons on it from Sebastien Bacher...

  3. #33
    Join Date
    Nov 2005
    Location
    Little Weighton, Hull, UK
    Beans
    1,057

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    How would you go about extending this to include html and other online documents? Works great at the moment though, don't get me wrong, just that I had a bit of an idea for a different take on bookmarks, which would need this!

  4. #34
    Join Date
    May 2005
    Location
    Belgium
    Beans
    113
    Distro
    Ubuntu

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    Quote Originally Posted by UbuWu
    Probably yes: I filed this bug: http://bugzilla.ubuntu.com/show_bug.cgi?id=19715 and almost immediately got a positive respons on it from Sebastien Bacher...
    Is this still a planned feature?

  5. #35
    Join Date
    Sep 2005
    Location
    Mexico
    Beans
    38
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    yay is working

  6. #36
    Join Date
    Mar 2005
    Location
    Pennsylvania
    Beans
    384
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    Can anyone give me a pointer on how to create a schema for something other than an oasis-document file?

    I want to create thumbnails in nautilus for .cbr / .cbz files based on the first image in the files. (.cbr files are just in RAR format, while .cbz files are in ZIP format) The archives will just be a collection of .jpg image files.

  7. #37
    Join Date
    Nov 2004
    Location
    Prague, Czech Republic
    Beans
    68

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    It's simple first you need mime type for your files. All mime types are stored under /usr/share/mime. For cbz it is "application/x-cbz" for cbr it's "application/x-cbr" (if you don't believe me look in /usr/share/mime/application ) but in schema you will use it as "application@x-cbz" and "application@x-cbr"

    For schema itself look into /usr/share/gconf/totem-video-thumbnail.schemas and evince-thumbnailer.schemas in the same directory. You will get an idea.

    I don't know what for the "%s" is but "%u" is URL of thumbnailed file and "%o" is URL of png image which will be used as thumbnail. So to make thumbnail you basicaly need to crate a png from %u file and copy it to %o . In your case extract the jpg image, convert it to png and save it as %o.

    Notice that "%u" URL you will get in form "file:///pathtofile" so you need to strip first 7 letters of this URL before it's useable.

    I hope this helped you

  8. #38

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    %s is the max image size

  9. #39
    Join Date
    Mar 2005
    Location
    Pennsylvania
    Beans
    384
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    Thanks a lot, guys. Also, thanks go out to the folks at comp.lang.python, who helped me write the python code that follows.

    Here is the code to create thumbnails for .cbz sequential image archives (usually associated with comical or comix in linux or cdisplay on MSWindows).

    Code:
    sudo gedit /usr/bin/comical-thumbnailer
    Code:
    #!/usr/bin/python
    
    import zipfile
    import sys
    import gnomevfs
    import Image
    import StringIO
    
    inURL=gnomevfs.get_local_path_from_uri(sys.argv[1])
    outURL=sys.argv[2]
    
    zip=zipfile.ZipFile(inURL,mode="r")
    jpeglist=[x for x in zip.namelist() if '.jp' in x]
    try:
      picture=zip.read(jpeglist[0])
    except IndexError:
      print 'No jpeg found'
    
    zip.close() #close the file, since we no longer have need of it
    image = Image.open(StringIO.StringIO(picture)) # create image object from file-like object
    image.thumbnail((128,128),Image.ANTIALIAS) #create the thumbnail
    image.save (outURL, "PNG") #output the file in the proper format
    Code:
    sudo chmod a+rx /usr/bin/comical-thumbnailer
    Code:
    sudo gedit /usr/share/gconf/schemas/comical.schemas
    Code:
    <gconfschemafile>
        <schemalist>
            <schema>
                <key>/schemas/desktop/gnome/thumbnailers/application@x-cbz/enable</key>
                <applyto>/desktop/gnome/thumbnailers/application@x-cbz/enable</applyto>
                <owner>comical-thumb</owner>
                <type>bool</type>
                <default>true</default>
                <locale name="C">
                    <short></short>
                    <long></long>
                </locale>
            </schema>
            <schema>
                <key>/schemas/desktop/gnome/thumbnailers/application@x-cbz/command</key>
                <applyto>/desktop/gnome/thumbnailers/application@x-cbz/command</applyto>
                <owner>comical-thumb</owner>
                <type>string</type>
                <default>/usr/bin/comical-thumbnailer %u %o</default>
                <locale name="C">
                    <short></short>
                    <long></long>
                </locale>
            </schema>
        </schemalist>
    </gconfschemafile>
    Code:
    gconftool-2 --install-schema-file /usr/share/gconf/schemas/comical.schemas

  10. #40

    Re: HOWTO: Thumbnails for OpenOffice.org 2 files

    hello,

    i've tried this HOWTO step by step word for word a couple times and no go. for some reason i still get the plain icon? any help would be so appreciated.

    thanks,
    ephman

Page 4 of 11 FirstFirst ... 23456 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •