fabiolecca / colorxml-quicklook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ColorXml QuickLook! v1.1
Freeware by CED Lecca 2007-2009
cedlecca@kagi.com

Home page: http://www.araneum.it/games/

This is a simple QuickLook plugin which enables to display XML files with indentation and XML syntax coloring. Requires MacOS 10.5 (Leopard) or later.

Version 1.1 is now compatible with MacOS X 10.6 Snow Leopard, thanks to Stijn Jonker.


Usage: 

1) drag the colorxml.qlgenerator file to /Library/QuickLook
2) reboot or logout or execute the command "qlmanage -r" from the Terminal
3) enjoy quicklook on XML Files!

Source code is available! Just ask for it via e-mail (I appreciate knowing the geographic location from where you are writing!!). 

Note: includes the following xsl stylesheet to generate an HTML version of the XML file:

xmlverbatim by Oliver Becker:

http://www2.informatik.hu-berlin.de/~obecker/XSLT/#xmlverbatim

Advanced users note: it works by transforming the XML in an HTML file, it is possible to change the styles used in the display by modifying the file "colorxml.qlgenerator/Contents/Resources/xmlverbatimwrapper.xsl" in the package ...

The program now handles the following XML-based file types:

- XML
- XSL thanks to Simone
- XSD thanks to Alan Pagliere
- RSS
- GXL thanks to Nicolas Sidere
- plist thanks to Stephan Ruggiero
- MXML thanks to Pedro Jimenez


It is also possible to extend it to handle new XML based file types using this procedure (Tested on MacOS X Snow Leopard):

- Open the Terminal
- execute the command 

qlmanage -d 4 -t  <file name>

- the output will include a line like this:

[DEBUG] Thumbnailing /usr/share/texinfo/texinfo.xsl - type: dyn.xxxxxx -

- write down the Content UTI Type (dyn.xxxxxx)

- backup the file /Library/QuickLook/colorxml.qlgenerator/Contents/Info.plist  in a safe place

- edit the file /Library/QuickLook/colorxml.qlgenerator/Contents/Info.plist 

- add the new Content Type UTI in the XML file in the list:

<array>
                                <string>public.xml</string>
                                <string>public.xsd</string>
                                <string>dyn.ah62d4rv4ge81u65q</string>
					…………..
                        </array>

- execute the command qlmanage -r to reset quicklook

- go to the Finder and check if the preview works.. if it doesn't work, restore the Info.plist from the backup and execute qlmanage -r again….

if it DOES work, please write an email to me so that I can add that file type in a future version!


-----------------------------------------------------------------------------------------------------

Si tratta di un semplice plugin per QuickLook per mostrare velocemente file xml con indentazione e colorazione dei tag. Richiede MacOS X 10.5 (Leopard) o successivi.

La versione 1.1 è compatibile con MacOS X 10.6 grazie a Stijn Jonker.

Istruzioni: 

1) trascinare il file colorxml.qlgenerator nella cartella /Library/QuickLook 
2) riavviare o eseguire il logout o eseguire il comando  "qlmanage -r" dal Terminale
3) enjoy quicklook on XML Files!

Il sorgente è disponibile: chiedetelo inviandomi una mail.

Nota: include il seguente foglio di stile xsl per generare un file HTML:

xmlverbatim di Oliver Becker:

http://www2.informatik.hu-berlin.de/~obecker/XSLT/#xmlverbatim

Nota per utenti esperti: e' possibile cambiare gli stili utilizzati per la visualizzazione modificando il file "colorxml.qlgenerator/Contents/Resources/xmlverbatimwrapper.xsl" nel package ...

Il programma ora gestisce anche i seguenti tipi di file XML:

- XML
- XSL grazie a Simone
- XSD grazie a Alan Pagliere
- RSS
- GXL grazie a Nicolas Sidere
- plist grazie a Stephan Ruggiero
- MXML grazie a Pedro Jimenez

E' anche possibile estenderlo per aggiungere nuovi tipi di file usando la seguente procedura:

- Aprire il Terminale
- eseguire il comando 

qlmanage -d 4 -t  <file name>

- l' output include una linea come la seguente:

[DEBUG] Thumbnailing /usr/share/texinfo/texinfo.xsl - type: dyn.xxxxxx -

- scrivere il  Content UTI Type (dyn.xxxxxx) che viene indicato

- fare un backup del file /Library/QuickLook/colorxml.qlgenerator/Contents/Info.plist  e metterlo in un posto sicuro

- modificare il file  /Library/QuickLook/colorxml.qlgenerator/Contents/Info.plist 

- aggiungere ill nuovo  Content Type UTI nel file XML nella lista:

<array>
                                <string>public.xml</string>
                                <string>public.xsd</string>
                                <string>dyn.ah62d4rv4ge81u65q</string>
					…………..
                        </array>

- eseguire il comando qlmanage -r per reimpostare quicklook

- provare a vedere l'anteprima del file con il Finder. Se non funziona, ripristinare la vecchia copia di backup… se funziona, vi invito a scrivermi una email così posso aggiungere il tipo di file in una nuova versione!!


-----------------------------------------------------------------------------------------------------


About


Languages

Language:XSLT 70.2%Language:C 29.8%