Collection of themes/skins for the Fossil SCM

⌈⌋ ⎇ branch:  Fossil Skins Extra


Check-in [c1f715d164]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added skin.txt unpacking script.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c1f715d164f1299006de884efccfd883d3227200
User & Date: mario 2015-02-12 08:02:30
Context
2015-02-12
08:02
./. check-in: cc4238f53c user: mario tags: trunk
08:02
Added skin.txt unpacking script. check-in: c1f715d164 user: mario tags: trunk
07:33
Fix .submenu a:hover border wobbling. check-in: fd1ca021d9 user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Name change from parts/export-th1 to parts/join-th1.

Changes to parts/mkskin.

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    else {
       $output .= config_sql_replace_line($config, $value);
    }
}

#-- header, and wrapping
if (!$o_sql) {
  $output = "# Fossil skin configuration \"$skin_name\" for simple import\n"
          . "# $date\n#\n"
          . $output;
}
elseif (!$o_reg) {
  $output = "-- Fossil skin \"$skin_name\" as raw SQL statements ($date)\n\n"
          . $output;
}







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    else {
       $output .= config_sql_replace_line($config, $value);
    }
}

#-- header, and wrapping
if (!$o_sql) {
  $output = "# Fossil skin configuration \"$skin_name\" for simple `fossil import skin.txt`\n"
          . "# $date\n#\n"
          . $output;
}
elseif (!$o_reg) {
  $output = "-- Fossil skin \"$skin_name\" as raw SQL statements ($date)\n\n"
          . $output;
}

Added parts/unpackskin.











































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/php -qC
<?php
#
# Extract fossil configuration card .txt file to subdirectory.
#
# Split up into individual config sections:
#      unpackskin skin.txt dir/
#
# Would create:
#      * dir/name.header
#      * dir/name.footer
#      * dir/name.css
#      * dir/name.th1-setup
#      etc.
#
# Doesn't work on raw -sql or -sql-reg config card files
# (which `mkskin` can create alternatively).
#


# cmd args
$from = $_SERVER["argv"][1];
$skin_name = basename($from, "txt");
$tdir = $_SERVER["argv"][2] or $tdir = ".";
file_exists($tdir) or mkdir($tdir);

# read
$src = file_get_contents($from);

# extract meta name?
if (preg_match("/^#\V+\"([\w.\h-]+)\"/m", $src, $uu)) {
   $skin_name = $uu[1];
}

# find matching config header lines
$rx = "/^config \/config (\d+)\n"
    . "\d+ '([\w-]+)' value '/m";
preg_match_all($rx, $src, $uu, PREG_SET_ORDER|PREG_OFFSET_CAPTURE);
foreach ($uu as $row) {

    // rx fields
    list($header, $pos) = $row[0];
    $length = $row[1][0];
    $name = $row[2][0];

    // extract value
    $value = substr($src, $pos + strlen($header) - 1, $length - 2);
    $value = stripcslashes($value);

    // save to file
    file_put_contents("$tdir/$skin_name.$name", $value);
}