blis-cvs Mailing List for Awk powered CMS, with wiki-style syntax
Status: Beta
Brought to you by:
cstroie
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(19) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Costin S. <cs...@us...> - 2007-03-27 14:35:59
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18536 Modified Files: blis.cgi Log Message: Doc update. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- blis.cgi 23 Mar 2007 16:09:20 -0000 1.68 +++ blis.cgi 27 Mar 2007 14:35:31 -0000 1.69 @@ -375,7 +375,8 @@ ############################################################################ # -# Section: File handling +# Section: File handling +# This section deals with files identification and loading. # # Find the file by the page name @@ -459,6 +460,7 @@ ############################################################################ # # Section: Modes +# This section is responsable with output mode selection. # # Select the working mode @@ -644,6 +646,7 @@ ############################################################################ # # Section: Output +# This section deals with sending the results to the output. # # Function: HTTPHeader_Init @@ -744,6 +747,7 @@ ############################################################################ # # Section: Get page data +# Get extra data about a page. # # Return the html head, based on metadata and computed defaults |
From: Costin S. <cs...@us...> - 2007-03-23 16:09:25
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4707 Modified Files: blis.cgi Log Message: New functions for dealing with the http headers. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- blis.cgi 22 Mar 2007 18:37:29 -0000 1.67 +++ blis.cgi 23 Mar 2007 16:09:20 -0000 1.68 @@ -1,6 +1,6 @@ #!/bin/gawk -f # -######################################################################### +############################################################################ # Title: Blis # Awk powered CMS, with wiki-style syntax # @@ -24,7 +24,7 @@ # Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -######################################################################### +############################################################################ # # About: Revision # $Id$ @@ -256,7 +256,18 @@ } # Function: decode_query -# Decode the cgi query +# Decode the CGI query string +# +# Parameters: +# query - This is the hash array where the results will be returned +# +# Globals: +# The function relies on *ENVIRON* array to extract the *QUERY_STRING*. +# +# Results: +# The function returns nothing. Instead, the *query* hash array will be +# loaded with the processing results. Any previuosly defined key, found in +# QUERY_STRING, will be reassigned. function decode_query(query, q, f, i, n) { # Make sure the cgi query string really exists @@ -274,7 +285,18 @@ } # Function: decode_cookie -# Decode the cookies +# Decode the HTTP cookies +# +# Parameters: +# cookie - This is the hash array where the results will be returned +# +# Globals: +# The function relies on *ENVIRON* array to extract the *HTTP_COOKIE*. +# +# Results: +# The function returns nothing. Instead, the *cookie* hash array will be +# loaded with the processing results. Any previuosly defined key, found in +# HTTP_COOKIE, will be reassigned. function decode_cookie(cookie, q, f, i, n) { # Make sure the cgi cookies string really exists @@ -456,39 +478,46 @@ } # The default mode: view the parsed page -function mode_view(filename, metadata, theme, parsed_content, result) +function mode_view(filename, metadata, theme, http_headers, parsed_content, result) { # Get the theme to use theme = get_theme() if (theme) { - # The mime type is text/html and cookie has to be set - result = http_header("text/html", theme) + # The mime type is text/html and the cookie has to be set + HTTPHeaders_Init(http_headers, "text/html", theme) # Parse the file parsed_content = parse_file(filename, metadata) - # Apply the template + # Add a last-modified header + if ("mtime" in metadata) + http_headers["Last-Modified"] = metadata["mtime"] + + # Output the headers and apply the template + result = HTTPHeaders_Out(http_headers) result = result apply_template(theme, parsed_content, metadata) } else { # Set the mime type to text/plain - result = "Status: 500 Server error\n" - result = result http_header("text/plain") + HTTPHeaders_Init(http_headers, "text/plain") + http_headers["Status"] = "500 Server error" + result = HTTPHeaders_Out(http_headers) result = result "No theme file found, check your settings." } # Send out the result - printf("%s\n", result) + print(result) } # Send the raw file as text/plain mime -function mode_raw(filename, numbered, line, i) +function mode_raw(filename, numbered, http_headers, line, i) { # Send the http header - printf("%s", http_header("text/plain")) + HTTPHeaders_Init(http_headers, "text/plain") + print(HTTPHeaders_Out(http_headers)) # Output the file, line by line while(getline line < filename > 0) @@ -502,7 +531,7 @@ } # Open the editor with the current page -function mode_edit(filename, l, content, content_lines, metadata, html_head, html_body) +function mode_edit(filename, http_headers, l, content, content_lines, metadata, html_head, html_body) { # TODO The function is kept for compatibility, it is not implemeted # Use mode_raw function as fall-back @@ -510,7 +539,7 @@ return content_lines = read_file(filename, content, metadata) - http_header("text/html") + HTTPHeaders_Init(http_headers, "text/html") html_head = get_html_head() for (l = 1; l <= content_lines; l++) #TODO Remove the extra new line at the end @@ -520,10 +549,11 @@ } # Server debug -function mode_debug(filename, metadata, j, content, lines, fmt_content, fmt_lines) +function mode_debug(filename, http_headers, metadata, j, content, lines, fmt_content, fmt_lines) { # Send the http header - printf("%s", http_header("text/plain")) + HTTPHeaders_Init(http_headers, "text/plain") + print(HTTPHeaders_Out(http_headers)) # Show some cgi environment variables printf("CGI Environment\n\n") @@ -564,44 +594,51 @@ } # Mode 404 -function mode_404(req_page, filename, parsed_content, metadata, theme) +function mode_404(req_page, http_headers, filename, parsed_content, metadata, theme) { # Get the theme to use theme = get_theme() if (theme) { - # We should return the 404 status code - # The mime type is text/html - result = "Status: 404 Page not found\n" http_header("text/html") - # Set the new filename filename = get_filename("_404_") if (filename) { + # The mime type is text/html. Do not set the cookie. + HTTPHeaders_Init(http_headers, "text/html") + # We should return the 404 status code + http_headers["Status"] = "404 Page not found" + # Parse the file parsed_content = parse_file(filename, metadata) # Apply the template - result = result apply_template(theme, parsed_content, metadata) + result = HTTPHeaders_Out(http_headers) apply_template(theme, parsed_content, metadata) } else { # Set the mime type to text/plain - result = "Status: 500 Server error\n" http_header("text/plain") - result = result "No pages found, check your settings." + HTTPHeaders_Init(http_headers, "text/plain") + # We should return the 500 status code + http_headers["Status"] = "500 Server error" + + result = HTTPHeaders_Out(http_headers) "No pages found, check your settings." } } else { # Set the mime type to text/plain - result = "Status: 500 Server error\n" http_header("text/plain") - result = result "No theme file found, check your settings." + HTTPHeaders_Init(http_headers, "text/plain") + # We should return the 500 status code + http_headers["Status"] = "500 Server error" + + result = HTTPHeaders_Out(http_headers) "No theme file found, check your settings." } # Send out the result - printf("%s\n", result) + print(result) } ############################################################################ @@ -609,19 +646,45 @@ # Section: Output # -# Send the http header -function http_header(content_type, theme, result) +# Function: HTTPHeader_Init +# Initialize the HTTP headers array +function HTTPHeaders_Init(array, content_type, theme) { - result = sprintf("Content-Type: %s\n", content_type) - #result = result sprintf("Pragma: no-cache\n") + delete array + + # Set content type + array["Content-Type"] = content_type + + # Set content language + array["Content-Language"] = "en" + + # Set content location + #array["Content-Location"] = page ".html" # Set some cookies if necessary if (theme && theme != cookie["blis_theme"]) - result = result sprintf("Set-Cookie: blis_theme=%s; path=/; domain=%s\n", theme, config["server_name"]) + array["Set-Cookie"] = sprintf("blis_theme=%s; path=/; domain=%s\n", theme, config["server_name"]) +} + +# Function: HTTPHeader_Out +# Output the HTTP headers +# +# Parameters: +# array - The array containing the HTTP headers definitions +# +# Results: +# The function returns one string containing the HTTP headers, formatted +# adequately. +function HTTPHeaders_Out(array, key, result) +{ + # Iterate all keys in array + for (key in array) + result = result sprintf("%s: %s\n", key, array[key]) # One last empty line result = result sprintf("\n") + # Return the result return result } |
From: Costin S. <cs...@us...> - 2007-03-22 19:03:57
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12477 Modified Files: blis.cgi Log Message: Documented more. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- blis.cgi 22 Mar 2007 16:45:57 -0000 1.66 +++ blis.cgi 22 Mar 2007 18:37:29 -0000 1.67 @@ -30,6 +30,16 @@ # $Id$ # +############################################################################ +# +# Section: BEGIN +# The BEGIN block contains code that will be executed at each program +# start. Basically, it defines some cofiguration parameters, intializes +# the runtime environment, then launches the major steps of execution: +# * query decoding +# * output mode selection +# * page identification +# * page processing BEGIN { site["server_name"] = "blis.sourceforge.net" site["base_dir"] = "/var/www/blis" @@ -75,11 +85,16 @@ ############################################################################ # -# Initialization +# Section: Initialization +# The initialization block performs some parameter initializing, based on +# hardcoded definitions and on external configuration files. # # Function: init -# Perform some initializing routines and configuration +# Perform some general initializing routines and configuration +# +# Results: +# The function returns nothing. function init( i) { # Create the dec2hex[] array @@ -111,7 +126,12 @@ config["themes_url"] = config["base_url"] "/" config["themes"] config["images_url"] = config["base_url"] "/" config["images"] - # Some safe defaults + # Hashes: Some safe defaults + # + # config["theme"] - The default theme + # config["charset"] - The default charset + # config["default_page"] - The default start page + # config["mode"] - The defaut output mode config["theme"] = "relaxation" config["charset"] = "UTF-8" config["default_page"] = "Home" @@ -134,9 +154,31 @@ load_config(config) } -# Load the configuration file -# Credits to AwkiAwki http://awkiawki.bogosoft.com/cgi-bin/awki.cgi -# and http://c2.com/cgi/wiki?AwkiAwkiSourceCode +# Function: load_config +# Load the configuration file +# +# Parameters: +# config_array - Pointer to the configuration array, where the +# configuration data will be loaded. +# file - The configuration file. If not specified, the default is used. The +# default configuration file is _PROGNAME.conf_, where _PROGNAME_ is +# the CGI program name, usually *blis*. The file is located in the +# same directory as the CGI program. +# +# Results: +# The config_array will be loaded with the additional configuration options. +# +# File format: +# The file has the following format: +# > key = value +# This will become +# > config[key] = value +# +# Credits: +# This function was inspired by the *Awiki* awk project. You can find it at +# the following locations: +# * http://awkiawki.bogosoft.com/cgi-bin/awki.cgi and +# * http://c2.com/cgi/wiki?AwkiAwkiSourceCode function load_config(config_array, file, configfile, line, mch) { # If the file name is provided, use it, if not, use the default @@ -173,10 +215,22 @@ ############################################################################ # -# General conversion functions +# Section: General conversion functions +# This section contains convenient functions for various conversion +# actions. # -# Configure from environment or fallback to default +# Function: config_env +# Configure from environment or fallback to default +# +# Parameters: +# var - The ENVIRONMENT variable to be searched +# def - The dafault value to be returned if the specified variable has not +# been found in environment. +# +# Returns: +# The value of the environment variable or the default, if the variable has +# not been found in environment. function config_env(var, def, result) { if (var in ENVIRON) @@ -192,7 +246,8 @@ return result } -# Trim leading and trailing whitespace +# Function: trim +# Trim leading and trailing whitespace function trim(str) { sub(/^[ \t]*/, "", str) @@ -200,7 +255,8 @@ return str } -# Decode the cgi query +# Function: decode_query +# Decode the cgi query function decode_query(query, q, f, i, n) { # Make sure the cgi query string really exists @@ -217,7 +273,8 @@ } } -# Decode the cookies +# Function: decode_cookie +# Decode the cookies function decode_cookie(cookie, q, f, i, n) { # Make sure the cgi cookies string really exists @@ -234,7 +291,8 @@ } } -# Decode URL encoded string +# Function: decode_url +# Decode URL encoded string function decode_url(text, i, decoded, len, c, c1, c2, code) { # Credits to: @@ -295,7 +353,7 @@ ############################################################################ # -# File handling +# Section: File handling # # Find the file by the page name @@ -378,7 +436,7 @@ ############################################################################ # -# Modes +# Section: Modes # # Select the working mode @@ -548,7 +606,7 @@ ############################################################################ # -# Output +# Section: Output # # Send the http header @@ -622,7 +680,7 @@ ############################################################################ # -# Get page data +# Section: Get page data # # Return the html head, based on metadata and computed defaults @@ -699,10 +757,9 @@ ############################################################################ # -# The Parser -# -# The parser is a multi-layered structure with multiple enter points and a -# single exit point: the parsed object. +# Section: Parser +# The parser is a multi-layered structure with multiple enter points and +# a single exit point: the parsed object. # # Get a page and return the parsed content @@ -1080,7 +1137,8 @@ return result } -# The Image macro +# Function: macro_image +# The Image macro function macro_image(parameters, result, field, file, title, a) { # The parameters, as string with fields separated by "|" @@ -1335,5 +1393,4 @@ return s } - # vim: set ft=awk syn=awk nowrap nu : |
From: Costin S. <cs...@us...> - 2007-03-22 16:46:02
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30165 Modified Files: blis.cgi Log Message: Initial use of NaturaDoc documentation system. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- blis.cgi 21 Mar 2007 23:20:48 -0000 1.65 +++ blis.cgi 22 Mar 2007 16:45:57 -0000 1.66 @@ -1,30 +1,36 @@ #!/bin/gawk -f # -############################################################################ -# Copyright (C) 2006-2007 by Costin Stroie # -# cs...@us... # -# # -# This program is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# 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. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the # -# Free Software Foundation, Inc., # -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -############################################################################ +######################################################################### +# Title: Blis +# Awk powered CMS, with wiki-style syntax # -# $Id$ +# About: Copyright +# Copyright (C) 2006-2007 by Costin Stroie +# cs...@us... +# +# About: License +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# 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. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +######################################################################### +# +# About: Revision +# $Id$ # BEGIN { - # Parameters site["server_name"] = "blis.sourceforge.net" site["base_dir"] = "/var/www/blis" site["base_url"] = "/blis" @@ -72,7 +78,8 @@ # Initialization # -# Perform some initializing routines and configuration +# Function: init +# Perform some initializing routines and configuration function init( i) { # Create the dec2hex[] array @@ -89,7 +96,11 @@ config["base_url"] = config_env("BLIS_BASE_URL", site["base_url"]) delete site - # Pages, images and themes + # Hashes: Pages, images and themes + # + # config["pages"] - The subdirectory where pages reside + # config["themes"] - The subdirectory containing the themes + # config["images"] - The images directory config["pages"] = "pages" config["themes"] = "themes" config["images"] = "images" @@ -108,7 +119,12 @@ config["camelcase"] = "n" scriptname = config_env("SCRIPT_NAME", "/cgi-bin/blis.cgi") - # Software related parameters + # Hashes: Software related parameters + # + # software["name"] - The program name + # software["version"] - The program version + # software["author"] - Author name + # software["email"] - Author email software["name"] = "Blis" software["version"] = "0.1" software["author"] = "Costin Stroie" @@ -650,7 +666,17 @@ return html_head } -# Get the page title +# Function: get_page_title +# Use the page metadata or the file name to get the page title +# +# Parameters: +# metadata - The page metadata +# +# Returns: +# The page title +# +# See also: +# <file_to_page> function get_page_title(metadata, title) { if ("title" in metadata) @@ -1021,7 +1047,14 @@ return result } -# Parse the inline macros +# Function: parse_inline_macros +# Parse the inline macros +# +# Parameters: +# line - The input line +# +# Returns: +# The input line with all macros executed function parse_inline_macros(line, result, mch) { # Find all matching elements @@ -1096,7 +1129,14 @@ return result } -# Parse the inline markups representing anchors +# Function: parse_inline_anchors +# Parse the inline markups representing anchors +# +# Parameters: +# line - The input line +# +# Returns: +# The input line with all links converted to anchors. function parse_inline_anchors(line, result, mch, field, title, attrs, extra_query, url, content) { # Find all matching internal anchors @@ -1216,9 +1256,19 @@ return line } - -# Create a page URL based on the page name, query[] and -# extra_query[] (if provided) +# Function: page_to_url +# Create a page URL based on the page name, query[] and +# extra_query[] (if provided) +# +# Parameters: +# pagename - The page name +# extra_query - Extra query parameters +# +# Returns: +# Full page URL. +# +# See also: +# <file_to_page> <page_to_file> function page_to_url(pagename, extra_query, q, f, pq) { # Create a query array starting from query[] plus and overrided by extra_query[] @@ -1247,7 +1297,17 @@ return scriptname pq } -# Returns the correct file name from a wiki page name +# Function: page_to_file +# Returns the correct file name from the wiki page name +# +# Parameters: +# s - The page name +# +# Returns: +# The correct file name. +# +# See also: +# <file_to_page> <page_to_url> function page_to_file(s) { s = trim(s) @@ -1256,7 +1316,17 @@ return s } -# Returns the correct wiki page name from a file name +# Function: file_to_page +# Returns the correct wiki page name from the file name +# +# Parameters: +# s - The file name +# +# Returns: +# The correct wiki page name. +# +# See also: +# <page_to_file> <page_to_url> function file_to_page(s) { s = trim(s) |
From: Costin S. <cs...@us...> - 2007-03-21 23:20:51
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26176/cgi-bin Modified Files: blis.cgi Log Message: Initial support for macros. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- blis.cgi 21 Mar 2007 22:50:46 -0000 1.64 +++ blis.cgi 21 Mar 2007 23:20:48 -0000 1.65 @@ -997,11 +997,11 @@ # Parse the inline markups function parse_inline(line, result, mch) { - # Images - line = parse_inline_images(line) + # Macros + result = parse_inline_macros(line) # Anchors - result = parse_inline_anchors(line) + result = parse_inline_anchors(result) # TODO The next line should not capture the [[ | ]] addresses #line = gensub(/((http|ftp):\/\/[a-zA-Z0-9.\-_/?=&+]+\.[a-zA-Z0-9.\-_/?=&+]+)/, "<a href=\"\\1\">\\1</a>", "g", line) @@ -1021,54 +1021,23 @@ return result } -# Parse the inline markups representing images -function parse_inline_images(line, result, mch, field, title) +# Parse the inline macros +function parse_inline_macros(line, result, mch) { # Find all matching elements - while (match(line, /\[\[ *[Ii]mage *: *([^\]\|]+) *([^\]]*)\]\]/, mch)) + while (match(line, /\[\[ *([A-Za-z]+) *: *([^\]]*)\]\]/, mch)) { # The first segment: the string before the match result = result substr(line, 1, mch[0, "start"] - 1) - # The extra data, as string with fields separated by "|" - if (split(mch[2], field, "|")) + # Select the macro + if (mch[1] ~ /[Ii]mage/) { - # Check all fields if they exist and contains some keywords - for (f in field) - { - # Check if the fields match some keywords - if (field[f] ~ /thumb/) - { - # Show a thumbnail - # TODO Do something with it - a = 1 - } - else if (field[f] ~ /left/) - { - # Float left - # TODO Do something with it - a = 1 - } - else if (field[f] ~ /right/) - { - # Float right - # TODO Do something with it - a = 1 - } - else if ((!title) && (field[f])) - { - # Set the image title - title = trim(field[f]) - } - } + # The Image macro + result = result macro_image(trim(mch[2])) } - - # If there is no title, use the image filename instead - if (!title) - title = mch[1] - - # The matched segment replaced by the image tag - result = result sprintf("<img src=\"%s\" alt=\"%s\"/>", config["images_url"] "/" mch[1], title) + else + result = result mch[0] # The last segment: the string after the match line = substr(line, mch[0, "start"] + mch[0, "length"]) @@ -1078,6 +1047,55 @@ return result } +# The Image macro +function macro_image(parameters, result, field, file, title, a) +{ + # The parameters, as string with fields separated by "|" + if (split(parameters, field, "|")) + { + # Check all fields if they exist and contains some keywords + for (f in field) + { + # Check if this is the first field (the filename) or + # the fields match some keywords + if (f == 1) + { + file = trim(field[f]) + } + else if (field[f] ~ /thumb/) + { + # Show a thumbnail + # TODO Do something with it + a = 1 + } + else if (field[f] ~ /left/) + { + # Float left + # TODO Do something with it + a = 1 + } + else if (field[f] ~ /right/) + { + # Float right + # TODO Do something with it + a = 1 + } + else if ((!title) && (field[f])) + { + # Set the image title (alt) + title = trim(field[f]) + } + } + + # If there is no title, use the image filename instead + title = title ? title : "Image: " file + + # The result as image tag + result = sprintf("<img src=\"%s\" alt=\"%s\"/>", config["images_url"] "/" file, title) + } + return result +} + # Parse the inline markups representing anchors function parse_inline_anchors(line, result, mch, field, title, attrs, extra_query, url, content) { |
From: Costin S. <cs...@us...> - 2007-03-21 22:50:50
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13795/cgi-bin Modified Files: blis.cgi Log Message: Improved the support for inline anchors. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- blis.cgi 26 Feb 2007 15:29:48 -0000 1.63 +++ blis.cgi 21 Mar 2007 22:50:46 -0000 1.64 @@ -675,7 +675,7 @@ # # The Parser # -# The parser is a multi-layered structure with multiple enter points and a +# The parser is a multi-layered structure with multiple enter points and a # single exit point: the parsed object. # @@ -1079,10 +1079,10 @@ } # Parse the inline markups representing anchors -function parse_inline_anchors(line, result, mch, field, title, attrs, extra_query) +function parse_inline_anchors(line, result, mch, field, title, attrs, extra_query, url, content) { # Find all matching internal anchors - while (match(line, /\[\[ *([^\]\|]+) *([^\]]*)\]\]/, mch)) + while (match(line, /\[ *([^\]\|]+) *([^\]]*)\]/, mch)) { # The first segment: the string before the match result = result substr(line, 1, mch[0, "start"] - 1) @@ -1090,12 +1090,8 @@ # Clear the extra query array delete extra_query - # Reset the title - title = "" - - # Check whether the anchor points to the current page - if (page_to_file(page) == page_to_file(mch[1])) - attrs = "class=\"current\" " + # Reset the title and attributes + title = content = attrs = "" # The extra data, as string with fields separated by "|" if (split(mch[2], field, "|")) @@ -1109,23 +1105,50 @@ # Show the raw page extra_query["mode"] = "raw" } - else if ((!title) && (field[f])) + else if (field[f] ~ /blank/) + { + # Open in new window + attrs = attrs "target=\"_blank\" " + } + else if ((!content) && (field[f])) { # Set the anchor title - title = trim(field[f]) + content = trim(field[f]) } } } - # If there is no title, use the anchor instead - if (!title) - title = file_to_page(mch[1]) + # The main part of the link, check if we recognize something + if (mch[1] ~ /^http:\/\/.+|^ftp:\/\/.+/) + { + # The HTTP and FTP methods + url = trim(mch[1]) + title = "External link: " url + content = content ? content : url + } + else if (mch[1] ~ /^mailto:.+/) + { + # Email + url = trim(mch[1]) + title = "Email to " substr(url, 8) + content = content ? content : substr(url, 8) + } + else + { + # Usual Blis page + url = page_to_url(mch[1], extra_query) + title = "Blis page: " page_to_file(mch[1]) + content = content ? content : file_to_page(mch[1]) + # Check whether the anchor points to the current page + if (page_to_file(page) == page_to_file(mch[1])) + attrs = "class=\"current\" " + } # Add the 'title' attribute attrs = attrs "title=\"" title "\" " # The matched segment replaced by the anchor tag - result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), page_to_url(mch[1], extra_query), title) + result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), url, content) # The last segment: the string after the match line = substr(line, mch[0, "start"] + mch[0, "length"]) @@ -1169,55 +1192,10 @@ # Re-create the line to start searching for external anchors line = result line - result = "" - } - - # Find all matching external anchors - while (match(line, /\[ *([^\[\]\|]+) *([^\]]*)\]/, mch)) - { - # The first segment: the string before the match - result = result substr(line, 1, mch[0, "start"] - 1) - - # Reset the title and atttributes - title = attrs = "" - - # The extra data, as string with fields separated by "|" - if (split(mch[2], field, "|")) - { - # Check all fields if they exist and contains some keywords - for (f in field) - { - # Check if the fields match some keywords - if (field[f] ~ /blank/) - { - # Open in new window - attrs = attrs "target=\"_blank\" " - } - else if ((!title) && (field[f])) - { - # Set the anchor title - title = trim(field[f]) - } - } - } - - # If there is no title, use the anchor instead - if (!title) - title = file_to_page(mch[1]) - - # Add the 'title' attribute - attrs = attrs "title=\"" title "\" " - - # The matched segment replaced by the anchor tag - result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), trim(mch[1]), title) - - # The last segment: the string after the match - line = substr(line, mch[0, "start"] + mch[0, "length"]) } # The final result - result = result line - return result + return line } |
From: Costin S. <cs...@us...> - 2007-03-21 22:50:50
|
Update of /cvsroot/blis/blis/pages In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13795/pages Modified Files: Demo Home Log Message: Improved the support for inline anchors. Index: Home =================================================================== RCS file: /cvsroot/blis/blis/pages/Home,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Home 11 Aug 2006 16:21:53 -0000 1.9 +++ Home 21 Mar 2007 22:50:46 -0000 1.10 @@ -4,64 +4,64 @@ (:DESCRIPTION:) Blis introduction (:REVISION:) $Id$ -Blis is a Content Management System, a simple one. You might even think -it is far from a modern CMS and you could be right. But, supposing it -is, why another one? Aren't out there tens of them already? The answer -is quite simple: there is no one like this. Well, I couldn't find any to +Blis is a Content Management System, a simple one. You might even think +it is far from a modern CMS and you could be right. But, supposing it +is, why another one? Aren't out there tens of them already? The answer +is quite simple: there is no one like this. Well, I couldn't find any to match my conditions. ==Why another one?== -Maybe you are a software developer, just like me in my spare time. And, -supposing you have a project to share, you choose -[ http://sourceforge.net/|Sourceforge ] as host. The problem is you -don't like to create a full website for your project, maybe you don't -have the abilities or the time for such a job. The obvious solution -would be to have Mambo, Drupal, WordPress, MediaWiki, DokuWiki or -something else doing this job for you. Moreover, you only need a single -user on your website, yourself, so the wikis are excluded, you would -like to write some technical stuff, so the blogs are excluded, and you +Maybe you are a software developer, just like me in my spare time. And, +supposing you have a project to share, you choose +[ http://sourceforge.net/|Sourceforge ] as host. The problem is you +don't like to create a full website for your project, maybe you don't +have the abilities or the time for such a job. The obvious solution +would be to have Mambo, Drupal, WordPress, MediaWiki, DokuWiki or +something else doing this job for you. Moreover, you only need a single +user on your website, yourself, so the wikis are excluded, you would +like to write some technical stuff, so the blogs are excluded, and you don't need a complex portal for this. -I think a simple project, based on simple rules, can give the answer to -the questions the big ones can not. These are some features that make +I think a simple project, based on simple rules, can give the answer to +the questions the big ones can not. These are some features that make Blis unique. -:Dynamic content: The html pages are created on-the-fly from simple text +:Dynamic content: The html pages are created on-the-fly from simple text sources. -:Simple markup language: The source-pages are text files, using -a wiki-style syntax for markup. Do not expect all the wiki features to -be implemented, we should keep it reasonably simple, but you can have -headings, lists, verbatim environments, anchors, images. Take a look at -this [[Home|raw|page source]], for example. +:Simple markup language: The source-pages are text files, using +a wiki-style syntax for markup. Do not expect all the wiki features to +be implemented, we should keep it reasonably simple, but you can have +headings, lists, verbatim environments, anchors, images. Take a look at +this [Home|raw|page source], for example. -:Theme-based presentation: The html output is inserted in a html -skeleton and css styled. There are no plain html pages, but esthetically +:Theme-based presentation: The html output is inserted in a html +skeleton and css styled. There are no plain html pages, but esthetically improved ones. -:Minimal system requirements: The disk space is dictated by the number -of the available themes and the number of the source pages, ''blis.cgi'' -itself is very small. One more advantage is the script language: -'''awk'''. In fact, the interpreter should be GNU Awk (gawk). Compared -to Perl, PHP or Python, the interpreter is only one file, an incredibly -small file (for its abilities). It should be present on every Linux or -BSD system and can be chroot'd easily for an improved security. Combined -with a small and fast http server (such as thttpd or lighttpd), the +:Minimal system requirements: The disk space is dictated by the number +of the available themes and the number of the source pages, ''blis.cgi'' +itself is very small. One more advantage is the script language: +'''awk'''. In fact, the interpreter should be GNU Awk (gawk). Compared +to Perl, PHP or Python, the interpreter is only one file, an incredibly +small file (for its abilities). It should be present on every Linux or +BSD system and can be chroot'd easily for an improved security. Combined +with a small and fast http server (such as thttpd or lighttpd), the entire project should be able to run on yesterday computers. -:No database requirements: Yes, this is a feature. You don't need any +:No database requirements: Yes, this is a feature. You don't need any database to run the website. -:Very simple to install: You only have to copy some files, set some +:Very simple to install: You only have to copy some files, set some parameters and you are ready. Ready to write your pages, of course. ==Why this name, Blis?== -The name was inspired by an Isaac Asimov's Foundation character, Bliss. -This name was taken by another OpenSource project, but Blis was not. It -is very hard to find a good project name these days... The fact is +The name was inspired by an Isaac Asimov's Foundation character, Bliss. +This name was taken by another OpenSource project, but Blis was not. It +is very hard to find a good project name these days... The fact is I like the actual name more than the original one. Index: Demo =================================================================== RCS file: /cvsroot/blis/blis/pages/Demo,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Demo 11 Aug 2006 15:58:53 -0000 1.1 +++ Demo 21 Mar 2007 22:50:46 -0000 1.2 @@ -8,52 +8,52 @@ == Level 2 heading == -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim -veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea -commodo consequat. Duis aute irure dolor in reprehenderit in voluptate -velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim +veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim -veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea -commodo consequat. Duis aute irure dolor in reprehenderit in voluptate -velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim +veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. === Level 3 heading === -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim -veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea -commodo consequat. Duis aute irure dolor in reprehenderit in voluptate -velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim +veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ==== Level 4 heading ==== -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim -veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea -commodo consequat. Duis aute irure dolor in reprehenderit in voluptate -velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim +veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. == Block level formatting == === Paragraph === -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim -veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea -commodo consequat. Duis aute irure dolor in reprehenderit in voluptate -velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim +veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. === Itemized (unordered) list === @@ -117,12 +117,21 @@ === Anchors === -Link to an internal page: [[Home]] +Link to an internal page: [Home] -Link to an internal page, renamed: [[Home| The homepage]] +Link to an internal page, renamed: [Home| The homepage] -External link: [http://blis.sourceforge.net] +External http link: [http://blis.sourceforge.net] -External link, renamed: [http://blis.sourceforge.net| The Blis +External http link, renamed: [http://blis.sourceforge.net| The Blis homepage] +External ftp link: [ftp://blis.sourceforge.net] + +External ftp link, renamed: [ftp://blis.sourceforge.net| The Blis ftp +homepage] + +Email link: [mailto:no...@no...] + +Email link, renamed: [mailto:no...@no...|Nobody] + |
From: Costin S. <cs...@us...> - 2007-02-26 15:29:52
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26190 Modified Files: blis.cgi Log Message: Added support for configuration files. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- blis.cgi 23 Feb 2007 17:20:49 -0000 1.62 +++ blis.cgi 26 Feb 2007 15:29:48 -0000 1.63 @@ -44,7 +44,7 @@ # Go to the default page if null if (!page) - page = page_to_file(config["page"]) + page = page_to_file(config["default_page"]) # If the mode has not been specified, the config default is used if ("mode" in query) @@ -64,7 +64,7 @@ mode_404(page) else # The file is valid, go process it - select_mode(filename) + select_mode(filename, mode) } ############################################################################ @@ -103,7 +103,7 @@ # Some safe defaults config["theme"] = "relaxation" config["charset"] = "UTF-8" - config["page"] = "Home" + config["default_page"] = "Home" config["mode"] = "view" config["camelcase"] = "n" scriptname = config_env("SCRIPT_NAME", "/cgi-bin/blis.cgi") @@ -113,8 +113,48 @@ software["version"] = "0.1" software["author"] = "Costin Stroie" software["email"] = "cs...@us..." + + # Now, load the user configuration + load_config(config) } +# Load the configuration file +# Credits to AwkiAwki http://awkiawki.bogosoft.com/cgi-bin/awki.cgi +# and http://c2.com/cgi/wiki?AwkiAwkiSourceCode +function load_config(config_array, file, configfile, line, mch) +{ + # If the file name is provided, use it, if not, use the default + # The default config file is 'blis.conf' and resides in the same + # directory as the cgi + if (file) + configfile = file + else + { + configfile = scriptname + # Remove trailing / ('/bin-cgi/blis.cgi/' -> '/bin-cgi/blis.cgi') + sub(/\/$/, "", configfile) + # Remove path ('/bin-cgi/blis.cgi' -> 'blis.cgi') + sub(/^.*\//, "", configfile) + # Remove suffix ('blis.cgi' -> 'blis') + sub(/\.[^.]*$/,"", configfile) + # Append .conf suffix + configfile = configfile ".conf" + } + + # Read the configfile + while(getline line < configfile > 0) + { + # Ignore comments + if (line ~ /^[ \t]*#/) + continue + # Match 'key = value' pairs + if (match(line, /([a-zA-Z0-9_-]+)[ \t]*=[ \t]*(.+)/, mch)) + # If this is a config line, add it to config[] + config_array[tolower(trim(mch[1]))] = trim(mch[2]) + } +} + + ############################################################################ # # General conversion functions @@ -265,6 +305,9 @@ delete content delete metadata + # First, load the site specific configuration + load_config(metadata, config["pages_dir"] "/config") + # Read the lines from the file and keep their number while(getline line < filename > 0) { @@ -323,7 +366,7 @@ # # Select the working mode -function select_mode(filename) +function select_mode(filename, mode) { # The mode could be: view, raw, edit, print, upload, diff if (mode == "raw") |
From: Costin S. <cs...@us...> - 2007-02-26 14:41:52
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5978 Added Files: blis.conf Log Message: Added main blis config file. --- NEW FILE: blis.conf --- # Main blis configuration file. # It has the 'key = value' form and will be imported as config[key]=value server_name = cstroie.dsd.ro base_dir = /home/www/blis base_url = /blis |
From: Costin S. <cs...@us...> - 2007-02-23 17:20:50
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10635 Modified Files: blis.cgi Log Message: Some safety array checks. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- blis.cgi 23 Feb 2007 17:02:51 -0000 1.61 +++ blis.cgi 23 Feb 2007 17:20:49 -0000 1.62 @@ -35,24 +35,23 @@ # Start processing by decoding the cgi query string decode_query(query) - # If the page and mode have not been specified, the config defaults are used + # If the page has not been specified and PATH_INFO is not used, + # the config default is used instead if ("page" in query) page = page_to_file(query["page"]) else + page = page_to_file(decode_url(config_env("PATH_INFO", ""))) + + # Go to the default page if null + if (!page) page = page_to_file(config["page"]) + # If the mode has not been specified, the config default is used if ("mode" in query) mode = query["mode"] else mode = config["mode"] - # If using the PATH_INFO, the page is specified as path - if (ENVIRON["PATH_INFO"]) - page = page_to_file(decode_url(ENVIRON["PATH_INFO"])) - # Go to the default page if null - if (!page) - page = page_to_file(config["page"]) - # Decode the cookies, if any decode_cookie(cookie) @@ -166,7 +165,7 @@ function decode_cookie(cookie, q, f, i, n) { # Make sure the cgi cookies string really exists - if (ENVIRON["HTTP_COOKIE"]) + if ("HTTP_COOKIE" in ENVIRON) { # Split the string using the ';' character as delimiter n = split(ENVIRON["HTTP_COOKIE"], q, ";") |
From: Costin S. <cs...@us...> - 2007-02-23 17:02:56
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3308 Modified Files: blis.cgi Log Message: Simplified the user's parameter configuration. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- blis.cgi 23 Feb 2007 12:32:21 -0000 1.60 +++ blis.cgi 23 Feb 2007 17:02:51 -0000 1.61 @@ -1,7 +1,7 @@ #!/bin/gawk -f # ############################################################################ -# Copyright (C) 2006 by Costin Stroie # +# Copyright (C) 2006-2007 by Costin Stroie # # cs...@us... # # # # This program is free software; you can redistribute it and/or modify # @@ -25,29 +25,11 @@ BEGIN { # Parameters - config["server_name"] = ENVIRON["HTTP_HOST"] != "" ? ENVIRON["HTTP_HOST"] : "blis.sourceforge.net" - config["root"] = "/home/www/blis" - config["url"] = "/blis" - config["pages_dir"] = "pages" - config["themes_dir"] = "themes" - config["images_dir"] = "images" - - config["theme"] = "relaxation" - config["charset"] = "UTF-8" - - # Default globals - config["page"] = "Home" - config["mode"] = "view" - config["camelcase"] = "y" - scriptname = ENVIRON["SCRIPT_NAME"] != "" ? ENVIRON["SCRIPT_NAME"] : "/cgi-bin/blis.cgi" - - # Software related parameters - software["name"] = "Blis" - software["version"] = "0.1" - software["author"] = "Costin Stroie" - software["email"] = "cs...@us..." + site["server_name"] = "blis.sourceforge.net" + site["base_dir"] = "/var/www/blis" + site["base_url"] = "/blis" - # Basic initialization + # Initialization init() # Start processing by decoding the cgi query string @@ -67,6 +49,9 @@ # If using the PATH_INFO, the page is specified as path if (ENVIRON["PATH_INFO"]) page = page_to_file(decode_url(ENVIRON["PATH_INFO"])) + # Go to the default page if null + if (!page) + page = page_to_file(config["page"]) # Decode the cookies, if any decode_cookie(cookie) @@ -88,8 +73,8 @@ # Initialization # -# Perform some initializing routines -function init() +# Perform some initializing routines and configuration +function init( i) { # Create the dec2hex[] array split("0 1 2 3 4 5 6 7 8 9 a b c d e f", dec2hex, " ") @@ -97,6 +82,38 @@ # Create the hex2dec[] array for (i=0; i<16; i++) hex2dec[dec2hex[i+1]] = i + + # Parameters + config["server_name"] = config_env("HTTP_HOST", site["server_name"]) + config["site"] = config_env("BLIS_SITE", "blis") + config["base_dir"] = config_env("BLIS_BASE_DIR", site["base_dir"]) + config["base_url"] = config_env("BLIS_BASE_URL", site["base_url"]) + delete site + + # Pages, images and themes + config["pages"] = "pages" + config["themes"] = "themes" + config["images"] = "images" + config["pages_dir"] = config["base_dir"] "/" config["pages"] + config["themes_dir"] = config["base_dir"] "/" config["themes"] + config["images_dir"] = config["base_dir"] "/" config["images"] + config["pages_url"] = config["base_url"] "/" config["pages"] + config["themes_url"] = config["base_url"] "/" config["themes"] + config["images_url"] = config["base_url"] "/" config["images"] + + # Some safe defaults + config["theme"] = "relaxation" + config["charset"] = "UTF-8" + config["page"] = "Home" + config["mode"] = "view" + config["camelcase"] = "n" + scriptname = config_env("SCRIPT_NAME", "/cgi-bin/blis.cgi") + + # Software related parameters + software["name"] = "Blis" + software["version"] = "0.1" + software["author"] = "Costin Stroie" + software["email"] = "cs...@us..." } ############################################################################ @@ -104,6 +121,22 @@ # General conversion functions # +# Configure from environment or fallback to default +function config_env(var, def, result) +{ + if (var in ENVIRON) + { + if (ENVIRON[var]) + result = ENVIRON[var] + else + result = def + } + else + result = def + + return result +} + # Trim leading and trailing whitespace function trim(str) { @@ -116,7 +149,7 @@ function decode_query(query, q, f, i, n) { # Make sure the cgi query string really exists - if (ENVIRON["QUERY_STRING"]) + if ("QUERY_STRING" in ENVIRON) { # Split the string using the '&' character as delimiter n = split(ENVIRON["QUERY_STRING"], q, "&") @@ -214,7 +247,7 @@ function get_filename(page, filename, line, ok) { # Construct the path to the file - filename = config["root"] "/" config["pages_dir"] "/" page + filename = config["pages_dir"] "/" page # Just a basic protection against the '..' attacks gsub(/\.\.+/, "_", filename) # Test the file is readable @@ -257,7 +290,7 @@ # First check the query parameters if ("theme" in query) { - thfile = config["root"] "/" config["themes_dir"] "/" query["theme"] "/" query["theme"] ".html" + thfile = config["themes_dir"] "/" query["theme"] "/" query["theme"] ".html" if (getline line < thfile > 0) theme = query["theme"] close (thfile) @@ -266,7 +299,7 @@ # If the theme has not been specified in query, check the cookie if (!theme && ("blis_theme" in cookie)) { - thfile = config["root"] "/" config["themes_dir"] "/" cookie["blis_theme"] "/" cookie["blis_theme"] ".html" + thfile = config["themes_dir"] "/" cookie["blis_theme"] "/" cookie["blis_theme"] ".html" if (getline line < thfile > 0) theme = cookie["blis_theme"] close (thfile) @@ -275,7 +308,7 @@ # If neither the query or the cookie have provided the theme, use the default config if (!theme && ("theme" in config)) { - thfile = config["root"] "/" config["themes_dir"] "/" config["theme"] "/" config["theme"] ".html" + thfile = config["themes_dir"] "/" config["theme"] "/" config["theme"] ".html" if (getline line < thfile > 0) theme = config["theme"] close (thfile) @@ -480,8 +513,8 @@ function apply_template(theme, parsed_content, metadata, thfile, thdir, line, result) { # Find the relative theme directory and theme file - thdir = config["themes_dir"] "/" theme - thfile = config["root"] "/" thdir "/" theme ".html" + thdir = config["themes"] "/" theme + thfile = config["themes_dir"] "/" theme "/" theme ".html" # Read the template file and replace the placeholders, if any while(getline line < thfile > 0) @@ -492,7 +525,7 @@ # Provide the theme directory if (index(line, "%THEME_DIR%")) - gsub(/%THEME_DIR%/, config["url"] "/" thdir, line) + gsub(/%THEME_DIR%/, config["base_url"] "/" thdir, line) # Some placeholders in head if (index(line, "%PAGE_TITLE%")) @@ -570,7 +603,7 @@ # The favicon html_head = html_head - sprintf("<link rel=\"shortcut icon\" type=\"image/ico\" href=\"%s/blis.ico\">", config["url"]) + sprintf("<link rel=\"shortcut icon\" type=\"image/ico\" href=\"%s/blis.ico\">", config["base_url"]) return html_head } @@ -993,7 +1026,7 @@ title = mch[1] # The matched segment replaced by the image tag - result = result sprintf("<img src=\"%s\" alt=\"%s\"/>", config["url"] "/" config["images_dir"] "/" mch[1], title) + result = result sprintf("<img src=\"%s\" alt=\"%s\"/>", config["images_url"] "/" mch[1], title) # The last segment: the string after the match line = substr(line, mch[0, "start"] + mch[0, "length"]) |
From: Costin S. <cs...@us...> - 2007-02-23 12:32:24
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25521 Modified Files: blis.cgi Log Message: Say something when the pages or the themes are not found. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- blis.cgi 23 Feb 2007 08:44:10 -0000 1.59 +++ blis.cgi 23 Feb 2007 12:32:21 -0000 1.60 @@ -273,8 +273,13 @@ } # If neither the query or the cookie have provided the theme, use the default config - if (!theme) - theme = config["theme"] + if (!theme && ("theme" in config)) + { + thfile = config["root"] "/" config["themes_dir"] "/" config["theme"] "/" config["theme"] ".html" + if (getline line < thfile > 0) + theme = config["theme"] + close (thfile) + } return theme } @@ -291,6 +296,8 @@ # The mode could be: view, raw, edit, print, upload, diff if (mode == "raw") mode_raw(filename) + else if (mode == "nraw") + mode_raw(filename, 1) else if (mode == "edit") mode_edit(filename) else if (mode == "debug") @@ -305,25 +312,44 @@ # Get the theme to use theme = get_theme() - # The mime type is text/html and cookie has to be set - result = http_header("text/html", theme) + if (theme) + { + # The mime type is text/html and cookie has to be set + result = http_header("text/html", theme) - # Parse the file - parsed_content = parse_file(filename, metadata) + # Parse the file + parsed_content = parse_file(filename, metadata) - # Apply the template - result = result apply_template(theme, parsed_content, metadata) + # Apply the template + result = result apply_template(theme, parsed_content, metadata) + } + else + { + # Set the mime type to text/plain + result = "Status: 500 Server error\n" + result = result http_header("text/plain") + result = result "No theme file found, check your settings." + } # Send out the result printf("%s\n", result) } # Send the raw file as text/plain mime -function mode_raw(filename, line) +function mode_raw(filename, numbered, line, i) { - printf("%s\n", http_header("text/plain")) + # Send the http header + printf("%s", http_header("text/plain")) + + # Output the file, line by line while(getline line < filename > 0) - print line + if (numbered) + { + i++ + printf("%4s %s\n", i, line) + } + else + printf("%s\n", line) } # Open the editor with the current page @@ -345,31 +371,88 @@ } # Server debug -function mode_debug( j) +function mode_debug(filename, metadata, j, content, lines, fmt_content, fmt_lines) { - printf("%s\n", http_header("text/plain")) + # Send the http header + printf("%s", http_header("text/plain")) # Show some cgi environment variables printf("CGI Environment\n\n") for (j in ENVIRON) printf("%-20s: %s\n", j, ENVIRON[j]) + + # Show configuration data + printf("\n\nConfiguration\n\n") + for (j in config) + printf("%-20s: %s\n", ("config[" j "]"), config[j]) + + # Show query data + printf("\n\nQuery\n\n") + for (j in query) + printf("%-20s: %s\n", ("query[" j "]"), query[j]) + + # Show cookies data + printf("\n\nCookies\n\n") + for (j in cookie) + printf("%-20s: %s\n", ("cookie[" j "]"), cookie[j]) + + if (filename) + { + # Read the file + lines = read_file(filename, content, metadata) + # Parse the file + fmt_lines = parse_array(content, lines, fmt_content) + + # Show the formatted file + printf("\n\nFormatted file\n\n") + for (j=1; j<=fmt_lines; j++) + printf("%4s %s\n", j, fmt_content[j]) + + # Show the parsed file + printf("\n\nParsed file\n\n") + printf("%s", parser(fmt_content, fmt_lines)) + } } # Mode 404 -function mode_404(req_page, filename, parsed_content, metadata) +function mode_404(req_page, filename, parsed_content, metadata, theme) { - # We should return the 404 status code - printf("Status: 404 Page not found\n") - printf("%s\n", http_header("text/html")) + # Get the theme to use + theme = get_theme() - # Set the new filename - filename = get_filename("_404_") + if (theme) + { + # We should return the 404 status code + # The mime type is text/html + result = "Status: 404 Page not found\n" http_header("text/html") - # Parse the file - parsed_content = parse_file(filename, metadata) + # Set the new filename + filename = get_filename("_404_") - # Apply the template - print apply_template(get_theme(), parsed_content, metadata) + if (filename) + { + # Parse the file + parsed_content = parse_file(filename, metadata) + + # Apply the template + result = result apply_template(theme, parsed_content, metadata) + } + else + { + # Set the mime type to text/plain + result = "Status: 500 Server error\n" http_header("text/plain") + result = result "No pages found, check your settings." + } + } + else + { + # Set the mime type to text/plain + result = "Status: 500 Server error\n" http_header("text/plain") + result = result "No theme file found, check your settings." + } + + # Send out the result + printf("%s\n", result) } ############################################################################ @@ -536,7 +619,7 @@ } # Get a valid filename and return the parsed content -function parse_file(filename, metadata, result, content, lines) +function parse_file(filename, metadata, result, content, lines, fmt_content, fmt_lines) { # We need the file name if (filename) @@ -544,14 +627,16 @@ # Read the file lines = read_file(filename, content, metadata) # Parse the file - result = parse_array(content, lines) + fmt_lines = parse_array(content, lines, fmt_content) + # Finally, call the real parser and return its results + result = parser(fmt_content, fmt_lines) } return result } # Get an array containing the input file content, one line per item, # and return the parsed content -function parse_array(content, lines, fmt_content, fmt_lines, l, br) +function parse_array(content, lines, fmt_content, fmt_lines, l, br) { # First we need to format the content, to obtain a regular one delete fmt_content @@ -582,6 +667,18 @@ br = 2 fmt_content[++fmt_lines] = content[l] } + else if (content[l] ~ /^\{\{\{/) + { + # Start of verbatim environment: break at the end of the line + br = 3 + fmt_content[++fmt_lines] = content[l] + } + else if (content[l] ~ /^\}{\}\}/) + { + # End of verbatim environment: break at the end of the line + br = 1 + fmt_content[++fmt_lines] = content[l] + } else { # This is not a special line @@ -597,6 +694,11 @@ br = 0 fmt_content[fmt_lines] = fmt_content[fmt_lines] " " content[l] } + else if (br == 3) + { + # Inside verbatim environment, break at the end of the line + fmt_content[++fmt_lines] = content[l] + } else { # No break requested: join the lines @@ -607,11 +709,7 @@ # Now fmt_content[] contains the formatted content and fmt_lines # contains the number of lines of fmt_content[] - - # TODO Since content[] is no longer needed, should we delete it for memory reasons? - - # Finally, call the real parser and return its results - return parser(fmt_content, fmt_lines) + return fmt_lines } @@ -653,6 +751,38 @@ # Add the closing tag result = result "</pre>\n" } + else if (content[l] ~ /^\{\{\{/) + { + # Verbatim environment. It captures all consecutive lines + # until the closing markup or eof are found. + + # Close any open context on all levels and add the open tag + result = result context(ctx, 1, "pre", "", "") "<pre>" + + # Go to the next line + l++ + + # Make the loop condition true + ok = 1 + # Enter the loop + do + { + # Add the lines as they are + result = result content[l++] + # Check if the nex line exists and is not the closing markup + if ((l <= lines) && (content[l] !~ /^\}\}\}/)) + # We can continue + result = result "\n" + else + # No, the next line does not exist or is the closing markup + ok = "" + # Skip this line, it is the closing markup + l++ + } + while (ok) + # Add the closing tag + result = result "</pre>\n" + } # Parse the single line line = parse_line(content[l], ctx, ctx_level) |
From: Costin S. <cs...@us...> - 2007-02-23 08:44:11
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31611 Modified Files: blis.cgi Log Message: The CamelCase feature can be disabled. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- blis.cgi 23 Feb 2007 08:30:45 -0000 1.58 +++ blis.cgi 23 Feb 2007 08:44:10 -0000 1.59 @@ -38,6 +38,7 @@ # Default globals config["page"] = "Home" config["mode"] = "view" + config["camelcase"] = "y" scriptname = ENVIRON["SCRIPT_NAME"] != "" ? ENVIRON["SCRIPT_NAME"] : "/cgi-bin/blis.cgi" # Software related parameters @@ -929,39 +930,42 @@ line = result line result = "" - # Find all CamelCases - while (match(line, /([A-Z][a-z]+[A-Z][a-zA-Z]+)/, mch)) + # Find all CamelCases, if enabled + if (config["camelcase"] == "y") { - # The first segment: the string before the match - result = result substr(line, 1, mch[0, "start"] - 1) + while (match(line, /([A-Z][a-z]+[A-Z][a-zA-Z]+)/, mch)) + { + # The first segment: the string before the match + result = result substr(line, 1, mch[0, "start"] - 1) - # Clear the extra query array - delete extra_query + # Clear the extra query array + delete extra_query - # Reset the title - title = "" + # Reset the title + title = "" - # Check whether the anchor points to the current page - if (page_to_file(page) == page_to_file(mch[1])) - attrs = "class=\"current\" " + # Check whether the anchor points to the current page + if (page_to_file(page) == page_to_file(mch[1])) + attrs = "class=\"current\" " - # If there is no title, use the anchor instead - if (!title) - title = file_to_page(mch[1]) + # If there is no title, use the anchor instead + if (!title) + title = file_to_page(mch[1]) - # Add the 'title' attribute - attrs = attrs "title=\"" title "\" " + # Add the 'title' attribute + attrs = attrs "title=\"" title "\" " - # The matched segment replaced by the anchor tag - result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), page_to_url(mch[1], extra_query), title) + # The matched segment replaced by the anchor tag + result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), page_to_url(mch[1], extra_query), title) - # The last segment: the string after the match - line = substr(line, mch[0, "start"] + mch[0, "length"]) - } + # The last segment: the string after the match + line = substr(line, mch[0, "start"] + mch[0, "length"]) + } - # Re-create the line to start searching for external anchors - line = result line - result = "" + # Re-create the line to start searching for external anchors + line = result line + result = "" + } # Find all matching external anchors while (match(line, /\[ *([^\[\]\|]+) *([^\]]*)\]/, mch)) |
From: Costin S. <cs...@us...> - 2007-02-23 08:30:47
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26161 Modified Files: blis.cgi Log Message: Fixed the horizontal rule parsing. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- blis.cgi 23 Feb 2007 08:18:34 -0000 1.57 +++ blis.cgi 23 Feb 2007 08:30:45 -0000 1.58 @@ -569,6 +569,12 @@ br = 1 fmt_content[++fmt_lines] = content[l] } + else if (content[l] ~ /^----+/) + { + # Horizontal rules: break at the end of the line + br = 1 + fmt_content[++fmt_lines] = content[l] + } else if (content[l] ~ /^[\*#:;>-]/) { # Lists and quotes: no break if the next line has no mark |
From: Costin S. <cs...@us...> - 2007-02-23 08:18:35
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21261 Modified Files: blis.cgi Log Message: Backticks go to tt. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- blis.cgi 23 Feb 2007 08:15:15 -0000 1.56 +++ blis.cgi 23 Feb 2007 08:18:34 -0000 1.57 @@ -799,7 +799,8 @@ #result = gensub(/\^([^\^]+)\^/, "<sup>\\1</sup>", "g", result); # superscripts #result = gensub(/_([^_]+)_/, "<sub>\\1</sub>", "g", result); # subscripts # result = gensub(/{-([^}]-})''/, "<del>\\1</del>", "g", result); # strikethrough ## TODO Broken - result = gensub(/@@([^@]+)@@/, "<tt>\\1</tt>", "g", result); #PmWiki style + result = gensub(/@@([^@]+)@@/, "<tt>\\1</tt>", "g", result); # PmWiki style + result = gensub(/`([^`]+)`/, "<tt>\\1</tt>", "g", result); # Trac style # result = gensub(/=([^= \t]+)=/, "<tt>\\1</tt>", "g", result); # Emacs wiki style # Escape some characters |
From: Costin S. <cs...@us...> - 2007-02-23 08:15:24
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20105 Modified Files: blis.cgi Log Message: Added experimental support for CamelCase. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- blis.cgi 12 Dec 2006 13:16:10 -0000 1.55 +++ blis.cgi 23 Feb 2007 08:15:15 -0000 1.56 @@ -26,7 +26,7 @@ BEGIN { # Parameters config["server_name"] = ENVIRON["HTTP_HOST"] != "" ? ENVIRON["HTTP_HOST"] : "blis.sourceforge.net" - config["root"] = "/htdocs/blis" + config["root"] = "/home/www/blis" config["url"] = "/blis" config["pages_dir"] = "pages" config["themes_dir"] = "themes" @@ -922,6 +922,40 @@ line = result line result = "" + # Find all CamelCases + while (match(line, /([A-Z][a-z]+[A-Z][a-zA-Z]+)/, mch)) + { + # The first segment: the string before the match + result = result substr(line, 1, mch[0, "start"] - 1) + + # Clear the extra query array + delete extra_query + + # Reset the title + title = "" + + # Check whether the anchor points to the current page + if (page_to_file(page) == page_to_file(mch[1])) + attrs = "class=\"current\" " + + # If there is no title, use the anchor instead + if (!title) + title = file_to_page(mch[1]) + + # Add the 'title' attribute + attrs = attrs "title=\"" title "\" " + + # The matched segment replaced by the anchor tag + result = result sprintf("<a %s href=\"%s\">%s</a>", trim(attrs), page_to_url(mch[1], extra_query), title) + + # The last segment: the string after the match + line = substr(line, mch[0, "start"] + mch[0, "length"]) + } + + # Re-create the line to start searching for external anchors + line = result line + result = "" + # Find all matching external anchors while (match(line, /\[ *([^\[\]\|]+) *([^\]]*)\]/, mch)) { |
From: Costin S. <cs...@us...> - 2006-12-13 15:17:30
|
Update of /cvsroot/blis/blis In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26536 Added Files: .htaccess Log Message: Using a htaccess for redirection. --- NEW FILE: .htaccess --- DirectoryIndex index.html Redirect permanent /index.html http://localhost/cgi-bin/blis.cgi |
From: Costin S. <cs...@us...> - 2006-12-12 13:16:13
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3056 Modified Files: blis.cgi Log Message: The title includes the sitename. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- blis.cgi 11 Aug 2006 16:33:48 -0000 1.54 +++ blis.cgi 12 Dec 2006 13:16:10 -0000 1.55 @@ -457,7 +457,7 @@ html_head = "" # Set the title - html_head = html_head sprintf("<title>%s</title>\n", get_page_title(metadata)) + html_head = html_head sprintf("<title>%s :: %s</title>\n", metadata["site_name"], get_page_title(metadata)) # Set the charset encoding if ("charset" in metadata) |
From: Costin S. <cs...@us...> - 2006-08-14 20:57:44
|
Update of /cvsroot/blis/vim/syntax In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4646/syntax Added Files: blis.vim Log Message: Added the blis syntax for vim. --- NEW FILE: blis.vim --- " Vim syntax file " Language: Blis wiki markup " Maintainer: Costin Stroie <cs...@us...> " Last Changed: Sun, 13 Aug 2006 00:30:24 EEST " Comment: Blis is a CMS with wiki like syntax " Clear existing syntax if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Case sensitive syntax case match " Normal text syntax match blis_text /.+/ " Comments syntax match blis_comment /^%.*$/ contains=blis_todo syntax keyword blis_todo FIXME TODO XXX NOT " Headings syntax match blis_heading /^\(=\{1,5}\)[^=]\+\1$/ syntax match blis_heading /^\(!\{1,5}\)[^!]\+$/ " Inline markup syntax region blis_italic start="''"lc=2 end="''"me=e-2 contains=blis_text keepend syntax region blis_bold start="'''" end="'''" contains=blis_bold_content syntax region blis_bolditalic start="'''''" end="'''''" syntax match blis_underline /\(_\{2}\).\{-}\1/ syntax match blis_subscript /\(,\{2}\).\{-}\1/ syntax match blis_superscript /\(\^\).\{-}\1/ syntax region blis_typewriter start="@@" end="@@" syntax match blis_italic_content /[^']\{2,}/ contained skipwhite syntax match blis_bold_content /[^']\{3,}/ contained skipwhite " Codeblocks syntax match blis_preformatted /^ .*$/ " Links syntax region blis_url start="\[" end="\]" syntax region blis_link start="\[\[" end="\]\]" syntax match blis_plainurl /\w\+:\/\/\S\+/ " Lists syntax match blis_ul /^*/ syntax match blis_ol /^#/ syntax match blis_dt /^;/ syntax match blis_dd /^:/ " Rule syntax match blis_rule /^-\{4,}/ " Highlights highlight link blis_comment Comment highlight link blis_todo Todo highlight link blis_heading Function highlight link blis_italic blis_italic_content highlight link blis_bold Identifier highlight link blis_bolditalic Identifier highlight link blis_underline Identifier highlight link blis_subscript Identifier highlight link blis_superscript Identifier highlight link blis_typewriter Identifier highlight def blis_italic_content gui=italic highlight def blis_bold_content gui=bold highlight link blis_preformatted String highlight link blis_link Statement highlight link blis_url Statement highlight link blis_plainurl Underlined highlight link blis_ul Type highlight link blis_ol Type highlight link blis_dt Type highlight link blis_dd Type highlight link blis_rule Special let b:current_syntax = "blis" " vim: set nowrap nu: |
From: Costin S. <cs...@us...> - 2006-08-14 20:56:50
|
Update of /cvsroot/blis/vim/syntax In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4273/syntax Log Message: Directory /cvsroot/blis/vim/syntax added to the repository |
From: Costin S. <cs...@us...> - 2006-08-14 14:20:42
|
Update of /cvsroot/blis/blis/themes/relaxation In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10926 Modified Files: relaxation.html Log Message: Minor reformatting. Index: relaxation.html =================================================================== RCS file: /cvsroot/blis/blis/themes/relaxation/relaxation.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- relaxation.html 11 Aug 2006 16:19:55 -0000 1.1 +++ relaxation.html 14 Aug 2006 14:20:38 -0000 1.2 @@ -55,34 +55,39 @@ </a> </li--> <li> - <br /> - <a href="http://validator.w3.org/check/referer" title="Valid HTML 4.01"> - <img src="%THEME_DIR%/images/valid-html401.png" alt="Valid HTML 4.01" height="15" width="80"> - </a> - </li> - <li> - <a href="http://jigsaw.w3.org/css-validator/check/referer" title="Valid CSS"> - <img src="%THEME_DIR%/images/valid-css.png" alt="Valid CSS" height="15" width="80"> - </a> - </li> - <li> - <a href="http://blis.sourceforge.net" title="Powered by Blis"> - <img src="%THEME_DIR%/images/blis-powered.png" alt="Powered by Blis" height="15" width="80"> - </a> - </li> - <li> - <img src="%THEME_DIR%/images/txt-powered.png" alt="Powered by Plain text files"> - </li> - <li> - <a href="http://english-73447556955.spampoison.com"> - <img src="http://pics3.inxhost.com/images/sticker.gif" alt="Powered by SpamPoison" width="80" height="15"> - </a> - </li> - <li> - <br /> - <a href="http://sourceforge.net"> - <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=53489&type=1" alt="Powered by SourceForge.net"> - </a> + <h2> </h2> + <ul> + <li> + <br /> + <a href="http://validator.w3.org/check/referer" title="Valid HTML 4.01"> + <img src="%THEME_DIR%/images/valid-html401.png" alt="Valid HTML 4.01" height="15" width="80"> + </a> + </li> + <li> + <a href="http://jigsaw.w3.org/css-validator/check/referer" title="Valid CSS"> + <img src="%THEME_DIR%/images/valid-css.png" alt="Valid CSS" height="15" width="80"> + </a> + </li> + <li> + <a href="http://blis.sourceforge.net" title="Powered by Blis"> + <img src="%THEME_DIR%/images/blis-powered.png" alt="Powered by Blis" height="15" width="80"> + </a> + </li> + <li> + <img src="%THEME_DIR%/images/txt-powered.png" alt="Powered by Plain text files"> + </li> + <li> + <a href="http://english-73447556955.spampoison.com"> + <img src="http://pics3.inxhost.com/images/sticker.gif" alt="Powered by SpamPoison" width="80" height="15"> + </a> + </li> + <li> + <br /> + <a href="http://sourceforge.net"> + <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=53489&type=1" alt="Powered by SourceForge.net"> + </a> + </li> + </ul> </li> </ul> </div> <!-- end of noindent --> |
From: Costin S. <cs...@us...> - 2006-08-14 14:16:32
|
Update of /cvsroot/blis/blis/pages In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9294 Modified Files: Download Log Message: Some download instructions. Index: Download =================================================================== RCS file: /cvsroot/blis/blis/pages/Download,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Download 11 Aug 2006 16:26:01 -0000 1.1 +++ Download 14 Aug 2006 14:16:24 -0000 1.2 @@ -4,4 +4,20 @@ (:DESCRIPTION:) Download a released version or the lates snapshot (:REVISION:) $Id$ +You can download one of the stable releases or the latest snapshot from +CVS server. + +== Download the release == + +The releases can be found on the standard SourceForge +[ http://sourceforge.net/project/showfiles.php?group_id=168355 | project +page ] which will redirect you to the SourceForge mirrors. + +== Download the lastest CVS snapshot == + +For the latest snapshot, you have to use CVS, according to the +instructions from [ http://sourceforge.net/cvs/?group_id=168355 | this +page ], under the ''Anonymous CVS Access'' section. The ''modulename'' +is @@blis@@. + |
From: Costin S. <cs...@us...> - 2006-08-11 16:33:53
|
Update of /cvsroot/blis/blis/cgi-bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8177 Modified Files: blis.cgi Log Message: Emacswiki tt style disabled. Index: blis.cgi =================================================================== RCS file: /cvsroot/blis/blis/cgi-bin/blis.cgi,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- blis.cgi 11 Aug 2006 16:14:43 -0000 1.53 +++ blis.cgi 11 Aug 2006 16:33:48 -0000 1.54 @@ -800,7 +800,7 @@ #result = gensub(/_([^_]+)_/, "<sub>\\1</sub>", "g", result); # subscripts # result = gensub(/{-([^}]-})''/, "<del>\\1</del>", "g", result); # strikethrough ## TODO Broken result = gensub(/@@([^@]+)@@/, "<tt>\\1</tt>", "g", result); #PmWiki style - result = gensub(/=([^= \t]+)=/, "<tt>\\1</tt>", "g", result); #Emacs wiki style + # result = gensub(/=([^= \t]+)=/, "<tt>\\1</tt>", "g", result); # Emacs wiki style # Escape some characters result = gensub(/&/, "\\\\&", "g", result) |
From: Costin S. <cs...@us...> - 2006-08-11 16:26:04
|
Update of /cvsroot/blis/blis/pages In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5121 Added Files: Download Install Markup Log Message: Some more pages added. --- NEW FILE: Download --- (:SITE_NAME:) Blis (:SITE_DESCRIPTION:) Awk powered CMS with wiki-style syntax (:TITLE:) Download Blis (:DESCRIPTION:) Download a released version or the lates snapshot (:REVISION:) $Id: Download,v 1.1 2006/08/11 16:26:01 cstroie Exp $ --- NEW FILE: Markup --- (:SITE_NAME:) Blis (:SITE_DESCRIPTION:) Awk powered CMS with wiki-style syntax (:TITLE:) Blis wiki markup (:DESCRIPTION:) Understand the wiki markup syntax used by Blis (:REVISION:) $Id: Markup,v 1.1 2006/08/11 16:26:01 cstroie Exp $ --- NEW FILE: Install --- (:SITE_NAME:) Blis (:SITE_DESCRIPTION:) Awk powered CMS with wiki-style syntax (:TITLE:) Install (:DESCRIPTION:) Installing Blis (:REVISION:) $Id: Install,v 1.1 2006/08/11 16:26:01 cstroie Exp $ |
From: Costin S. <cs...@us...> - 2006-08-11 16:21:55
|
Update of /cvsroot/blis/blis/pages In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3583 Modified Files: Home Log Message: Header reformatted. Index: Home =================================================================== RCS file: /cvsroot/blis/blis/pages/Home,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Home 29 Jun 2006 12:53:17 -0000 1.8 +++ Home 11 Aug 2006 16:21:53 -0000 1.9 @@ -1,8 +1,8 @@ -(:TITLE Blis :) -(:DESCRIPTION Awk powered CMS with wiki-style syntax :) -(:REVISION $Id$ :) - -==Introduction== +(:SITE_NAME:) Blis +(:SITE_DESCRIPTION:) Awk powered CMS with wiki-style syntax +(:TITLE:) Introduction +(:DESCRIPTION:) Blis introduction +(:REVISION:) $Id$ Blis is a Content Management System, a simple one. You might even think it is far from a modern CMS and you could be right. But, supposing it |