Generic Syntax Highliter Addon

Hinweis: Dieses Addon wird nicht mehr weiterentwickelt!

Geshi Links & Docus

Homepage: http://qbnz.com/highlighter/
Doku: http://qbnz.com/highlighter/geshi-doc.html
Demo: http://qbnz.com/highlighter/demo.php

Features

Das Addon bindet die Funktionalität der GeSHi lib sowie die contrib Funktionen von cssgen.php (Generierung eines externen Stylesheets) und languagecheck.php (Validierung der Sprachpakete) in Redaxo ein. Desweiteren ist ein Beispielmodul enthalten, welches man über das backend installieren und wiederherstellen kann.

Funktion des Generic Syntax Highliter ist – wie der Name sagt – die optische Formatierung von Sourcecode. Aktuell werden 138 Sprachen unterstützt:

ABAP, Actionscript, ADA, Apache Log, AppleScript, APT sources.list, ASM (m68k), ASM (pic16), ASM (x86), ASM (z80), ASP, AutoIT, Backus-Naur form, Bash, Basic4GL, BlitzBasic, Brainfuck, C, C for Macs, C#, C++, C++ (with QT), CAD DCL, CadLisp, CFDG, CIL / MSIL, COBOL, ColdFusion, CSS, D, Delphi, Diff File Format, DIV, DOS, DOT language, Eiffel, Fortran, FourJ’s Genero, FreeBasic, GetText, glSlang, GML, gnuplot, Groovy, Haskell, HQ9+, HTML, INI (Config Files), Inno, INTERCAL, IO, Java, Java 5, Javascript, KiXtart, KLone C & C++, LaTeX, Lisp, LOLcode, LotusScript, LScript, Lua, Make, mIRC, MXML, MySQL, NSIS, Objective C, OCaml, OpenOffice BASIC, Oracle 8 & 11 SQL, Pascal, Perl, PHP, Pixel Bender, PL/SQL, POV-Ray, PowerShell, Progress (OpenEdge ABL), Prolog, ProvideX, Python, Q(uick)BASIC, robots.txt, Ruby, Ruby on Rails, SAS, Scala, Scheme, Scilab, SDLBasic, Smalltalk, Smarty, SQL, T-SQL, TCL, thinBasic, TypoScript, Uno IDL, VB.NET, Verilog, VHDL, VIM Script, Visual BASIC, Visual Fox Pro, Visual Prolog, Whitespace, Winbatch, Windows Registry Files, X++, XML, Xorg.conf

Repo

https://github.com/jdlx/generic_syntax_highlighter

Backend Screenshots

0
1
2
3
45
6
7
8
910
11
12
13
1415
16
17
18
1920
21
22
23
2425
26
27
28
2930
31
32
33
3435
36
37
38
3940
41
42
43
4445
46
47
48
4950
51
52
53
5455
56
57
58
5960
61
<?PHP
/**
* rex_xform_validate_date_diff.inc.php
*
* @author rexdev.de* @version 0.1
*
* $Id: class.xform.validate_date_diff.inc.php 1 2009-03-27 18:33:24Z jeffe $: 
*/
 class rex_xform_validate_date_diff extends rex_xform_validate_abstract 
{
  function enterObject(&$warning, $send, &$warning_messages)
  {
    if($send=="1")    {
      foreach($this->Objects as $o)
      {
        if ($o->elements[1]==$this->xaElements[2])
        {        $id_1 = $o->getId();
        $start_date = $o->getValue();
        $start_date = strtotime($start_date[day].'.'.$start_date[month].'.'.$start_date[year]);
        }
         if ($o->elements[1]==$this->xaElements[3])
        {
        $id_2 = $o->getId();
        $end_date = $o->getValue();
        $end_date = strtotime($end_date[day].'.'.$end_date[month].'.'.$end_date[year]);        }
      }
 
      $date_diff = $end_date - $start_date;
       if ($date_diff < $this->xaElements[4])
      {
        $warning["el_" . $id_1] = $this->params["error_class"];
        $warning["el_" . $id_2] = $this->params["error_class"];
        $warning_messages[] = $this->xaElements[6];      }
 
      if ($this->xaElements[5] !='')
      {
        if ($date_diff > $this->xaElements[5])        {
          $warning["el_" . $id_1] = $this->params["error_class"];
          $warning["el_" . $id_2] = $this->params["error_class"];
          $warning_messages[] = $this->xaElements[7];
        }      }
 
    }
  }
   function getDescription()
  {
    return "date_diff -> prüft Abstand zwischen zwei Datumseingaben: validate|date_diff|start_date|end_date|min_diff|max_diff|min_warn_message|max_warn_message ";
  }
} 
?>

XML

0
1
2
3
45
6
7
8
910
11
12
13
1415
16
17
18
1920
21
22
23
2425
26
27
28
2930
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>        <false/>
        <key>Label</key>
        <string>de.kaiser-edv.socket</string>
        <key>ProgramArguments</key>
        <array>                <string>/usr/bin/lp</string>
                <string>-d</string>
                <string>IPC1-Nr1-EG_Drucken</string>
                <string>-o</string>
                <string>raw</string>                <string>-o</string>
                <string>job-sheets=none,none</string>
        </array>
        <key>Sockets</key>
        <dict>                <key>Listeners</key>
                <dict>
                        <key>SockServiceName</key>
                        <string>pdl-datastream</string>
                        <key>SockType</key>                        <string>stream</string>
                </dict>
        </dict>
        <key>inetdCompatibility</key>
        <dict>                <key>Wait</key>
                <false/>
        </dict>
</dict>
</plist>

Bash

0
1
2
3
45
6
7
8
910
11
12
13
1415
16
17
18
1920
21
22
23
2425
26
27
28
2930
31
32
33
3435
36
37
38
3940
41
42
43
4445
46
47
#!/bin/bash
#
# Usage:     fixidcs3jobtitle job user title copies options [filename]
#
# Main use:  CUPS filter to fix InDesign 5.0.0 (ID CS3) job titles in #            PostScript print jobs containing special characters, eg. umlauts.
#            Tested with CUPS 1.1.23
#
#############################################################################
## author:    Thomas Kaiser <mailto:Thomas.Kaiser@phg-online.de>
# url:       http://kaiser-edv.de/en/CUPS/fixidcs3jobtitle-filter
# license:   http://www.opensource.org/licenses/bsd-license.php
# date:      1 May 2007 (v0.1.1)
# kudos to:  Axel Rose for the Perl code below (hacked together in his limited #            spare time)
#
#############################################################################
#
# Changes#
# 0.1.1: - fixed version which transparently handles the PS code passed through
#
# 0.1.0: - first official release (30 Apr 2007)
##############################################################################
#
# Non-Warranty: 
# This script comes with absolutely no warranty.
## Use at your own risk!
#
############################################################################# 
case $# in
        5)                # print job is on stdin
                echo "DEBUG: filter postscript stream originating from stdin" >&2
                cat | perl -CO -ne 'if(/^%%Title: ]+)>?$/){$m=$1;if($m!~/^FEFF/){print}else{while($m=~/(.{4})/g){$s=$1;next if$s eq"FEFF";last if$s eq"0000";$t.=pack("U*",hex($s));}print"%%Title: $t\n";}}else{print}' | /usr/libexec/cups/filter/pstops "$1" "$2" "$3" "$4" "$5"
                ;;
        6)                # print job is $6
                echo "DEBUG: filter postscript stream originating from \"$6\"" >&2
                cat "$6" | perl -CO -ne 'if(/^%%Title: ]+)>?$/){$m=$1;if(!~/^FEFF/){print}else{while($m=~/(.{4})/g){$s=$1;next if$s eq"FEFF";last if$s eq"0000";$t.=pack("U*",hex($s));}print"%%Title: $t\n";}}else{print}' | /usr/libexec/cups/filter/pstops "$1" "$2" "$3" "$4" "$5"
                ;;
        *)                echo "ERROR: $(basename "$0") job user title copies options [filename]" >&2
                ;;
esac

Applescript

0
1
2
3
45
6
7
8
910
11
12
13
1415
16
17
18
1920
21
22
23
2425
26
27
28
2930
31
32
33
3435
36
37
38
3940
41
42
43
4445
46
47
48
4950
51
52
53
5455
56
57
58
5960
61
62
63
6465
66
67
68
6970
71
72
73
7475
76
77
78
7980
81
82
83
8485
(*
This is an AppleScript that tries to display the Address of the selected contact 
graphically by using the http://www.stadtplandienst.de service (limited to 
germany as far as I know) within Safari
 © Thomas Kaiser, 2005 
ver. 0.1.1
 
Based on both the "Stadtplandienst.scpt" script provided by Armin Briegel 
 and "Dial Phone" by David Cortright  (including 
minor modifications by Matt Ridley  and Paul 
Berkowitz )
*)
 -- Define dialog strings
set errString to "This script only works with one contact selected in a list view."
set NoAddrString to "No address available for the selected contact"
set WhichAddrString to "Choose the address to display"
set HomeAddrString to "Home Address"set BusinessAddrString to "Business Address"
 
-- Language differentiation
set LANG to (do shell script ". /var/log/CDIS.custom ; echo ")
if LANG is "German" then        set errString to "Dieses Skript funktioniert nur mit einem ausgewählten Kontakt in Listenansicht"
        set NoAddrString to "Keine Adresse verfügbar für den ausgewählten Kontakt"
        set WhichAddrString to "Wählen Sie die Adresse"
        set HomeAddrString to "Privatadresse"
        set BusinessAddrString to "Geschäftsadresse"end if
 
tell application "Microsoft Entourage"
        try
                set s to the selection                set t to item 1 of s
                if the class of t is contact then set theContact to t
        on error theErr
                display dialog theErr & return & return & errString with icon 1 buttons {"OK"} default button "OK"
                return        end try
 
        try
                set BusinessAddress to business address of theContact
                set HomeAddress to home address of theContact 
                set z to zip of BusinessAddress
                set c to city of BusinessAddress
                set s to street address of BusinessAddress
                 set hz to zip of HomeAddress
                set hc to city of HomeAddress
                set hs to street address of HomeAddress
 
        on error theErr                display dialog theErr with icon 1 buttons {"OK"} default button "OK"
                return
        end try
end tell
 if s is "" and hs is "" then
        display dialog NoAddrString with icon 1 buttons {"OK"} default button "OK"
else if s is not "" and hs is not "" then
        display dialog WhichAddrString buttons {HomeAddrString, BusinessAddrString}
else if s is "" then        set PLZ to (do shell script "echo " & hz & " | tr -d -C [:digit:]")
        set street to hs
        set city to hc
else
        set PLZ to (do shell script "echo " & z & " | tr -d -C [:digit:]")        set street to s
        set city to c
end if
 
tell application "Safari"        set browser to make new document
        tell browser
                set URL to "http://www.stadtplandienst.de/"
        end tell
        delay 2 -- give Safari a little time to load the page        do JavaScript "document.forms[0].elements[\"plz\"].value = \"" & PLZ & "\";" in document 1
        do JavaScript "document.forms[0].elements[\"city\"].value = \"" & city & "\";" in document 1
        do JavaScript "document.forms[0].elements[\"str\"].value = \"" & street & "\";" in document 1
        do JavaScript "document.forms[0].submit()" in document 1
        activateend tell