Fossil

Check-in [58e64130]
Login

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

Overview
Comment:Started outline of makeskins utility.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ttmrichter-skins
Files: files | file ages | folders
SHA1:58e641306bf804b0ffe0dfdf76effb90eb482819
User & Date: michael 2010-07-26 07:43:46
Context
2010-07-31
16:20
Merge with trunk. check-in: d084f952 user: michael tags: ttmrichter-skins
2010-07-26
07:43
Started outline of makeskins utility. check-in: 58e64130 user: michael tags: ttmrichter-skins
06:54
Extracted built-in skins from skins.c and put into skins subdirectory. check-in: 3530b29f user: michael tags: ttmrichter-skins
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added src/makeskins.c.











































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
** Copyright (c) 2010 Michael T. Richter, assigned to the Fossil SCM project.
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the Simplified BSD License (also
** known as the "2-Clause License" or "FreeBSD License".)
**
** This program is distributed in the hope that it will be useful,
** but without any warranty; without even the implied warranty of
** merchantability or fitness for a particular purpose.
**
** Author contact information:
**   ttmrichter@gmail.com
**
*******************************************************************************
**
** This utility is a preprocessor that takes raw CSS and HTML files, along with
** plain text descriptions, and generates the skins.c file that is used to embed
** the distributed default skins into Fossil.
**
** The intent of the utility is to make adding new skins to a Fossil build
** easier without involving error-prone C programming.
**
** This utility must be run BEFORE the translate program is executed on the C
** source files.  (This is in retrospect obvious since it generates one of the
** said C files.)
*/
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv){
  if( argc==3 ){
    /*
    ** 1. Validate the arguments: <skins> and <src> directory.
    ** 2. Open the <src>/skins.c file.
    ** 3. Write the initial boilerplate.
    ** 4. Walk the directory structure of <skins>.
    ** 5. For each one:
    **    a) Store the title and author information. (info.txt)
    **    b) Write out the description as a comment. (info.txt)
    **    c) Write out the CSS information.          (style.css)
    **    d) Write out the header information.       (header.html)
    **    e) Write out the footer information.       (footer.html)
    ** 6. Write out the built-in skins table.
    ** 7. Write the trailing boilerplate.
    */
  }else{
    /* error -- need a pair of directories */
  }
  return 0;
}