Extend QuickLook to other standard files

  • Hi everyone,

    as the new QuickLook feature in Leopard handles many standard file
    types I ask myself if I can simply extend this behaviour to other
    standard file types without actually building a new generator. For
    example, I'd like QuickLook not only to handle common source code
    (like .c, .cpp and .m files) like plain text files but also another
    file type, let's say .asm. Of course, in this case .asm files are as
    plain text as are other source code files.

    Regards,
    Thomas S.
  • On 11/1/07 11:58 AM, Thomas Schlömer said:

    > as the new QuickLook feature in Leopard handles many standard file
    > types I ask myself if I can simply extend this behaviour to other
    > standard file types without actually building a new generator. For
    > example, I'd like QuickLook not only to handle common source code
    > (like .c, .cpp and .m files) like plain text files but also another
    > file type, let's say .asm. Of course, in this case .asm files are as
    > plain text as are other source code files.

    Well, if your .asm files also have the 'TEXT' file type, then QuickLook
    will treat them as text!  Yay for file system metadata!

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • To have proper Quick Look support (as well as Spotlight support and likely
    any good OS-wide support in the future), you need to first properly declare
    your file UTI (see corresponding documentation in Xcode). Additionally, if
    your UTI is declared to conform to "public.plain-text", Quick Look and
    Spotlight will automatically supports them. Even better, make your UTI
    conforms to public.source-code (which already conforms to public.plain-text
    ).

    --
    Julien

    On 11/1/07, Sean McBride <sean...> wrote:
    >
    > On 11/1/07 11:58 AM, Thomas Schlömer said:
    >
    >> as the new QuickLook feature in Leopard handles many standard file
    >> types I ask myself if I can simply extend this behaviour to other
    >> standard file types without actually building a new generator. For
    >> example, I'd like QuickLook not only to handle common source code
    >> (like .c, .cpp and .m files) like plain text files but also another
    >> file type, let's say .asm. Of course, in this case .asm files are as
    >> plain text as are other source code files.
    >
    > Well, if your .asm files also have the 'TEXT' file type, then QuickLook
    > will treat them as text!  Yay for file system metadata!
    >
    > --
    >
  • Hi,

    > Well, if your .asm files also have the 'TEXT' file type, then
    > QuickLook
    > will treat them as text!  Yay for file system metadata!

    Well, how do I change the file type?

    Thanks,
    Thomas S.

    --
    Oldenburg University - Department of Computer Science
    Media Informatics and Multimedia-Systems
    Phone: +49 441 9722-175  -  Fax: +49 441 9722-102
    Escherweg 2  -  D-26121 Oldenburg
  • <
    http://developer.apple.com/documentation/Carbon/Conceptual/understanding_ut
    is/understand_utis_intro/chapter_1_section_1.html#//apple_ref/doc/uid/TP400
    01319-CH201-DontLinkElementID_17

    >
    --
    Julien

    On 11/6/07, Thomas Schlömer <thomas.schloemer...> wrote:
    >
    > Hi,
    >
    >> Well, if your .asm files also have the 'TEXT' file type, then
    >> QuickLook
    >> will treat them as text!  Yay for file system metadata!
    >
    >
    > Well, how do I change the file type?
    >
    > Thanks,
    > Thomas S.
    >
    > --
    > Oldenburg University - Department of Computer Science
    > Media Informatics and Multimedia-Systems
    > Phone: +49 441 9722-175  -  Fax: +49 441 9722-102
    > Escherweg 2  -  D-26121 Oldenburg
    >
  • Hi,

    > >

    Thanks. But the question is: can I edit the system UTI's in a way
    that .asm are simply treated as other source code files? The thing is
    that I'm not developing an application with its own Info.plist where I
    could freely specify my wishes.

    Thanks again.

    Thomas S.

    >> Well, if your .asm files also have the 'TEXT' file type, then
    >> QuickLook
    >> will treat them as text!  Yay for file system metadata!
    >
    > Well, how do I change the file type?
  • There is currently no way to declare UTIs outside of an application or
    a Spotlight or Quick Look plug-in. Please file a bug to Apple so they
    add asm UTI to the list of core types (this seems like a sensible
    request).

    --
    Julien

    Sent from my iPod Shuffle

    On 6 nov. 07, at 17:22, Thomas Schlömer <thomas.schloemer...>
    e> wrote:

    >> >
    >
    > Thanks. But the question is: can I edit the system UTI's in a way
    > that .asm are simply treated as other source code files? The thing
    > is that I'm not developing an application with its own Info.plist
    > where I could freely specify my wishes.
    >
    > Thanks again.
    >
    > Thomas S.
    >
    >
    >>> Well, if your .asm files also have the 'TEXT' file type, then
    >>> QuickLook
    >>> will treat them as text!  Yay for file system metadata!
    >>
    >> Well, how do I change the file type?
    >
  • On 11/6/07, Thomas Schlömer <thomas.schloemer...> wrote:
    > > >
    >
    > Thanks. But the question is: can I edit the system UTI's in a way
    > that .asm are simply treated as other source code files? The thing is
    > that I'm not developing an application with its own Info.plist where I
    > could freely specify my wishes.

    I see the following entry in the launch services database...

            --------------------------------------------------------
            type    id:            2886270976
                    uti:          public.assembly-source
                    description:  assembly source code
                    flags:        exported  active  core  apple-internal
                    icon:
                    conforms to:  public.source-code
                    tags:          .s
            --------------------------------------------------------

    ...which was "submitted" by...

    --------------------------------------------------------------------------------
    bundle    id:            411042048
    path:          /Volumes/OS1/System/Library/CoreServices/CoreTypes.bundle
    name:          CoreTypes
    identifier:    com.apple.coretypes
    version:      121
    mod date:      3/24/2007 23:06:23
    type code:    'BNDL'
    creator code:  'macs'
    sys version:  0
    flags:        apple-internal
    item flags:    container  package  can-set-extension-hidden  native-app
    icon:
    executable:
    inode:        4670
    exec inode:    0
    container id:  3288399872
    library:
    library items:
    --------------------------------------------------------

    It looks like that entry should be extended to list at least .asm files.

    However it looks like Xcode "submits" the following...

    --------------------------------------------------------
    type id:            3291480064
      uti:          public.assembler-source
      description:  Assembler Source File
      flags:        exported  active  apple-internal
      icon:
      conforms to:  public.plain-text
      tags:          .s, .asm
    --------------------------------------------------------

    ...which in theory should result in what you want.

    Oh I just noticed this was on the Cocoa-Dev list which I believe is
    off topic for this discussion. I wont post further on this topic to
    this list.

    (note the above is from a 10.4 system using Xcode 2.5, not looked at
    my Leopard system)

    -Shawn
  • Hi,

    in case anybody is interested. macosxhints.com posted a hint on this
    subject:

    http://www.macosxhints.com/article.php?story=20071028184428583

    Regards,
    Thomas

    --
    Oldenburg University - Department of Computer Science
    Media Informatics and Multimedia-Systems
    Phone: +49 441 9722-175  -  Fax: +49 441 9722-102
    Escherweg 2  -  D-26121 Oldenburg
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today