Taquiones / software / Ejemplos de uso del plugin syntax de ikiwiki

Ejemplos de uso del plugin syntax para IkiWiki

Perl program with a predefined first line number:

  124 sub connection {
  125     my $class = shift;
  126     my $dsn = shift;
  127     my $user = shift;
  128     my $passwd = shift;
  129     my $attr = shift;
  130 
  131     if (not $dsn) {
  132         my $conf = Lidia::Config->new();
  133         $dsn = $conf->db->dsn();
  134         $user = $conf->db->user();
  135         $passwd = $conf->db->passwd();
  136     }
  137 
  138     return $class->SUPER::connection$dsn$user$passwd$attr);
  139 }

connection method

Bash script with line numbers too:

    1 # Long term variables, which may be set in the cvsdeb config file or the
    2 # environment:
    3 # rootdir workdir (if all original sources are kept in one dir)
    4 
    5 TEMPDIR=/tmp/$$
    6 mkdir $TEMPDIR || exit 1
    7 TEMPFILE=$TEMPDIR/cl-tmp
    8 trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
    9 
   10 TAGOPT=
   11 
   12 # Command line; will bomb out if unrecognised options
   13 TEMP=$(getopt -a -s bash \
   14        -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
   15        --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
   16        --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
   17        -n "$PROGNAME" -- "$@")
   18 eval set -- $TEMP

cvs-debi fragment

HTML example:

<head>

  <title>VLC media player - Web Interface</title>
  <meta http-equiv="Content-Type" content="text/html; charset=<vlc id="value" param1="charset"/>" />
  <link href="style.css" rel="stylesheet" type="text/css" />
  <!--[if IE ]>
  <link href="iehacks.css" rel="stylesheet" type="text/css" />
  <![endif]-->
  <script type="text/javascript" src="js/functions.js"></script>

  <!-- in case people had scripts that sent commands to the default
       index.html page -->
  <vlc id="control" param1="stop,pause,previous,next,add,sout,play,delete,empty,seek,fullscreen,keep,volume,sort,
move" />
  <vlc id="set" param1="sout" param2="string" />

</head>

<body onload="loop_refresh();">
index.html fragment