Front page still horked.
andersonlizardo at yahoo.com.br
Thu Nov 13 18:09:03 PST 2003
Anderson Lizardo wrote:
> Okay, I will write some syntax checker for the news database. If the
> problem still occurs on future, we will have to modify the news
> archiving/publishing system.
Done. It has some limitations, though. It will not complain if you
forgot to insert the required empty lines between the news item header
and its content, and before each boundary mark.
What it will detect:
- Missing global header fields: section, mime-version, content-type,
- Missing news item header fields: title, date and author.
- Typos on boundary marks (--NEW_ITEM_BOUNDARY :o)
- Missing end boundary mark (--NEWS_ITEM_BOUNDARY--)
The check_syntax() subroutine will check the entire database file, and
if any error is found, will print it to STDERR along with the line
number (if possible). Eg:
Invalid space character at start of line 7.
"Section" field not found.
2 syntax error(s) found on
That's it. I hope you like it :)
More information about the website