Oct 27

I could say -  I always write code that’s valid and “Apply Source Formatting” as Adobe Dreamweaver CS4 does it , but the truth is I’m a hack.
I get things to work with spit and chewing gum, and my code is a sloppy mess. Tidy Service to the rescue!

Tidy Service is a OS X Service that cleans up markup using the powerful HTML Tidy library originally created by  Dave Raggett. The version of HTML Tidy used in this build corresponds to the binary version released on February 11th, 2007.

HOW DO INSTALL IT?

  1. Download Tidy Service
  2. Copy TidyService.service file to /Users/<your home directory>/Library/Services/
    Note: You may need to create the directory “Services” if it does not already exist.
  3. Logout and then login  again (or restart systyem).
    Note: Tidy Sevice will not appear in the Services menu until you logout, then login
  4. Create settings for TidyService.
    create /Users/<your home directory>/TidyService.conf
    and insert following settings to TidyService.conf

    indent: yes
    indent-spaces: 4
    wrap: 72
    markup: yes
    output-xml: no
    input-xml: no
    show-warnings: no
    numeric-entities: no
    quote-marks: yes
    quote-nbsp: yes
    quote-ampersand: no
    break-before-br: no
    uppercase-tags: no
    uppercase-attributes: no
    doctype: omit
    show-body-only: yes
    output-html: yes
    tidy-mark: no
    

    A detailed listing of options can be found at http://tidy.sourceforge.net/docs/quickref.html

  5. Set a shortcut to easy access to Tidy Service. Open Leopard -> System Preferences -> Keyboard -> Keyboard Shortcuts. Select Services in left box and set find “Tidy Markup” in list.
    system.preference.keyboard

HOW TO USE

Tidy Service can be used to clean up HTML markup in any application that supports services by selecting (Coda, SubEthaEdit, Tumult HyperEdit, or TextWrangler) the markup in question and choosing one of the Tidy menu items from the Services menu.
tidy_service
Currently, there are two processing options: Tidy Markup and Tidy to XHTML. Tidy to XHTML instructs the Tidy engine to  generate valid XHTML, while Tidy Markup does not.

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...


Leave a Reply

This is website related to mac 0R windows platform?