Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
Added pub_time and mirror_time to record when these things happen.
Browse files Browse the repository at this point in the history
Rearchitected the Makefile stuff, so we can run makefiles inside Python.
Update these fields during Makefile and Mirror. Closes #91002 and #91021.
Synched gnome-import with DataLayer.
update-static no longer runs make, since Makefile does a build.
Add some new errors that happen during publishing.
Removed user menu.
A bit of documentation on the document publishing/Makefile.py system.
Moved ERR_ constants into Globals.py.
Fix timestamp formatting bug.
Added alternating "banded" colors in tables with OddEven class and css.
Icons now available in three sizes.
Optional "block" layout for doctable, needs more integration still.
Show document translations, version, timestamp, etc. Closes #89723.
  • Loading branch information
david committed Aug 18, 2002
1 parent 71dc1a5 commit b16ccac
Show file tree
Hide file tree
Showing 34 changed files with 707 additions and 330 deletions.
4 changes: 3 additions & 1 deletion bin/gnome-import
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ def callback(arg, directory, files):
'', # short_desc
omf.language, # lang
omf.seriesid, # sk_seriesid
0 # replaced_by_id
0, # replaced_by_id
'', # pub_time
'', # mirror_time
)

# Add document file
Expand Down
2 changes: 1 addition & 1 deletion bin/ldpdb-import
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def copy_users():
newusers.save()

# Reset david's information -- just for my own convenience.
sql = 'UPDATE username SET password=' + wsq('password') + ', stylesheet=' + wsq('ldp') + ' WHERE username=' + wsq('david')
sql = 'UPDATE username SET sysadmin=' + wsq('t') + ', password=' + wsq('password') + ', stylesheet=' + wsq('ldp') + ' WHERE username=' + wsq('david')
lampadas_db.runsql(sql)
lampadas_db.commit()

Expand Down
4 changes: 2 additions & 2 deletions bin/update-static
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ cd $LAMPADAS_LIB
./Makefile.py

# Build outputs
cd $LAMPADAS_CACHE
make -ik
#cd $LAMPADAS_CACHE
#make -ik

10 changes: 10 additions & 0 deletions conf/test.httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
DirectoryIndex index.html
</Location>

Alias /docdownloads /var/cache/lampadas/www/doc
<Location /docdownloads>
AllowOverride None
Options Indexes
Order allow,deny
Allow from all
RemoveType .html
ForceType text/plain
</Location>

Alias /images /home/david/ldp/cvs/LDP/lampadas/www/images
<Location /images>
AllowOverride None
Expand Down
2 changes: 2 additions & 0 deletions database/tables/document/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CREATE TABLE document
rating REAL,
sk_seriesid CHAR(36) NOT NULL,
replaced_by_id INT4,
pub_time TIMESTAMP,
mirror_time TIMESTAMP,

PRIMARY KEY (doc_id)
);
4 changes: 2 additions & 2 deletions database/tables/document/insert.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ abstract, short_desc,
pub_status_code, review_status_code, tech_review_status_code,
pub_date, last_update, tickle_date,
maintained, maintainer_wanted, rating,
sk_seriesid, replaced_by_id)
sk_seriesid, replaced_by_id, pub_time, mirror_time)
VALUES ($1, 'I18N_lang_code', '$2', '$3', '$4', '$5',
'$6', string_or_null($7), '$8', '$9',
'$10', '$11', '$12',
'$13',, '$14',
'$15', '$16', '$17',
string_or_null($18), string_or_null($19), string_or_null($20),
'$21', '$22', $23,
'$24', $25);])m4_dnl
'$24', $25, '$26', '$27');])m4_dnl
17 changes: 4 additions & 13 deletions database/tables/error/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ insert(4)
insert(5)
insert(6)
insert(7)
insert(8)
insert(9)
insert(10)
insert(11)
insert(12)
insert(13)
insert(14)
insert(15)
insert(16)
insert(17)
insert(18)
insert(19)
insert(20)
insert(101)
insert(201)
insert(202)

38 changes: 24 additions & 14 deletions database/tables/error_i18n/DE.m4
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
insert(1,
[Datei nicht gefunden],
[Die Quelldatei befindet sich nicht im CVS-Cache von Lampadas.])
[Datei nicht gefunden],
[Die Quelldatei befindet sich nicht im CVS-Cache von Lampadas.])
insert(2,
[Datei nicht beschreibbar],
[Die Quelldatei existiert, ist aber nicht beschreibbar.])
[Datei nicht beschreibbar],
[Die Quelldatei existiert, ist aber nicht beschreibbar.])
insert(3,
[Keine Quelldateien],
[Für dieses Dokument sind keine Quelldateien registriert.])
[Keine Quelldateien],
[Für dieses Dokument sind keine Quelldateien registriert.])
insert(4,
[Keine Primärdatei],
[Keine der Quelldateien wurde zur Primärdatei erklärt.])
[Keine Primärdatei],
[Keine der Quelldateien wurde zur Primärdatei erklärt.])
insert(5,
[Mehrer Primärdateien],
[Mehr als eine Datei wurde zur Primärdatei erklärt.])
[Mehrer Primärdateien],
[Mehr als eine Datei wurde zur Primärdatei erklärt.])
insert(6,
[Datei nicht lesbar],
[Die Datei existiert, Lampadas kann aber nicht davon lesen.])
[Datei nicht lesbar],
[Die Datei existiert, Lampadas kann aber nicht davon lesen.])
insert(7,
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
insert(101,
[Could not retrieve remote file.],
[The mirroring system was unable to retrieve a remote file over HTTP or FTP.])
insert(201,
[Cannot make because a source file is missing.],
[The Make system tried to make the document, but a source file is missing.
Th document will not be publishable until the problem is resolved.])
insert(202,
[Make command returned an error],
[A command returned a nonzero (failure) exit status, and Make was aborted.])
38 changes: 24 additions & 14 deletions database/tables/error_i18n/EN.m4
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
insert(1,
[File not found],
[The source file does not exist in the Lampadas cvs cache.])
[File not found],
[The source file does not exist in the Lampadas cvs cache.])
insert(2,
[File not writable],
[The source file exists, but is not writable.])
[File not writable],
[The source file exists, but is not writable.])
insert(3,
[No source files],
[No source files are listed for the document.])
[No source files],
[No source files are listed for the document.])
insert(4,
[No primary files],
[No source file is designated as primary.])
[No primary files],
[No source file is designated as primary.])
insert(5,
[Multiple primary files],
[More than one file is designated as primary.])
[Multiple primary files],
[More than one file is designated as primary.])
insert(6,
[File not readable],
[The file exists, but Lampadas cannot read it.])
[File not readable],
[The file exists, but Lampadas cannot read it.])
insert(7,
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
insert(101,
[Could not retrieve remote file.],
[The mirroring system was unable to retrieve a remote file over HTTP or FTP.])
insert(201,
[Cannot make because a source file is missing.],
[The Make system tried to make the document, but a source file is missing.
Th document will not be publishable until the problem is resolved.])
insert(202,
[Make command returned an error],
[A command returned a nonzero (failure) exit status, and Make was aborted.])
38 changes: 24 additions & 14 deletions database/tables/error_i18n/FR.m4
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
insert(1,
[Fichier introuvable],
[Ce fichier n\'existe pas dans le cache du cvs de Lampadas.])
[Fichier introuvable],
[Ce fichier n\'existe pas dans le cache du cvs de Lampadas.])
insert(2,
[Fichier protégé en écriture],
[Ce fichier existe, mais est protégé en écriture.])
[Fichier protégé en écriture],
[Ce fichier existe, mais est protégé en écriture.])
insert(3,
[Pas de fichier source],
[Pas de fichier source pour ce document.])
[Pas de fichier source],
[Pas de fichier source pour ce document.])
insert(4,
[Pas de fichier source principal],
[Pas de fichier source principal.])
[Pas de fichier source principal],
[Pas de fichier source principal.])
insert(5,
[Plusieurs fichiers source principaux],
[Plus d'un fichier source principal.])
[Plusieurs fichiers source principaux],
[Plus d'un fichier source principal.])
insert(6,
[Fichier illisible],
[Ce fichier existe, mais est illisible.])
[Fichier illisible],
[Ce fichier existe, mais est illisible.])
insert(7,
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
[Cannot determine file format],
[Lampadas cannot determine what format this file is stored in, so it cannot be published.])
insert(101,
[Could not retrieve remote file.],
[The mirroring system was unable to retrieve a remote file over HTTP or FTP.])
insert(201,
[Cannot make because a source file is missing.],
[The Make system tried to make the document, but a source file is missing.
Th document will not be publishable until the problem is resolved.])
insert(202,
[Make command returned an error],
[A command returned a nonzero (failure) exit status, and Make was aborted.])
1 change: 1 addition & 0 deletions database/tables/page/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ insert(index, splash, [], 0, [], f,
insert(home, index, main, 1, [], f, f, f, f)
insert(my, default, main, 2, [], t, t, f, f)
insert(doctable, default, main, 3, [], f, f, f, f)
insert(document_list, default, main, 4, [], f, f, f, f)
insert(search, default, main, 5, [], t, f, f, f)

insert(sessions, default, admin, 3, [], t, f, f, t)
Expand Down
5 changes: 5 additions & 0 deletions database/tables/page_i18n/DE.m4
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ insert([doctable], [Browse Documents], [],
|tabdocs|
], 1)

insert([document_list], [Document List], [],
[
|tabdocs_block|
], 0)

insert([search], [Suche], [],
[
|tabsearch|
Expand Down
5 changes: 5 additions & 0 deletions database/tables/page_i18n/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ insert([doctable], [Browse Documents], [],
|tabdocs|
], 1)

insert([document_list], [Document List], [],
[
|tabdocs_block|
], 1)

insert([search], [Search], [],
[
|tabsearch|
Expand Down
5 changes: 5 additions & 0 deletions database/tables/page_i18n/FR.m4
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ insert([doctable], [Browse Documents], [],
|tabdocs|
], 1)

insert([document_list], [Document List], [],
[
|tabdocs_block|
], 0)

insert([search], [Search], [],
[
|tabsearch|
Expand Down
13 changes: 7 additions & 6 deletions database/tables/section/EN.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
insert(user, 1)
m4_dnl insert(user, 1)
m4_dnl insert(sysadmin, 3)
insert(main, 2)
insert(admin, 3)
insert(news, 4)
insert(volunteer, 5)
insert(help, 6)
insert(main, 1)
insert(admin, 2)
insert(news, 3)
insert(volunteer, 4)
insert(help, 5)

1 change: 0 additions & 1 deletion database/tables/section_i18n/DE.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
insert(user, [Benutzer])
insert(main, [Hauptmenü])
insert(admin, [Adminstratoren])
insert(news, [Neuigkeiten])
Expand Down
1 change: 0 additions & 1 deletion database/tables/section_i18n/EN.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
insert(user, [User Menu])
insert(main, [Main Menu])
insert(admin, [Admin Menu])
insert(news, [News Menu])
Expand Down
1 change: 0 additions & 1 deletion database/tables/section_i18n/FR.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
insert(user, [Menu Utilisateur])
insert(main, [Menu Principal])
insert(admin, [Menu Administrateur])
insert(news, [Menu Nouvelles])
Expand Down
2 changes: 2 additions & 0 deletions database/tables/string/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ insert(strtranslations)
insert(strall)
insert(strrecentnews)
insert(strreplacedby)
insert(strpub_time)
insert(strmirror_time)
2 changes: 2 additions & 0 deletions database/tables/string_i18n/DE.m4
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ insert(strtranslations, [
insert(strall, [Alles])
insert(strrecentnews, [Aktuelle Nachrichten])
insert(strreplacedby, [Ersetzt durch])
insert(strpub_time, [Pub Time])
insert(strmirror_time, [Mirror Time])
2 changes: 2 additions & 0 deletions database/tables/string_i18n/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ insert(strtranslations, [Translations])
insert(strall, [All])
insert(strrecentnews, [Recent News])
insert(strreplacedby, [Replaced By])
insert(strpub_time, [Pub Time])
insert(strmirror_time, [Mirror Time])
2 changes: 2 additions & 0 deletions database/tables/string_i18n/FR.m4
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ insert(strtranslations, [Translations]) m4_dnl FIXME
insert(strall, [All])
insert(strrecentnews, [Recent News]) m4_dnl FIXME
insert(strreplacedby, [Replaced By]) m4_dnl FIXME
insert(strpub_time, [Pub Time])
insert(strmirror_time, [Mirror Time])
36 changes: 33 additions & 3 deletions doc/Lampadas.wt
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,12 @@ as a WikiText file into the document cache. Later, during the regular
<command>make</command>, it is converted into DocBook and processing
continues as with any other document.

Also, if there was an error Mirroring the document or an individual file,
an error is recorded against the file or document.
A document with existing errors cannot be mirrored.
Only Mirror will set mirroring errors, and only Lintadas wil clear them.
To remove an error, resolve the problem, then run Lintadas again.

The Makefile module writes out a Makefile for each document, in the same
directory in the cache to which it was mirrored. The Makefile tells the
publication system how to build the outputs for that document.
Expand Down Expand Up @@ -1100,12 +1106,36 @@ This section explains how the static version of a Lampadas website is generated.
The static version is intended for mirroring, or for distributing on CD or
in a distribution.


==Selecting Content for Satic Pages|static-content==

To create a static site, set the WebLayer's .static property to 1.
All page generation routines respect this property and generate their
pages accordinatly.
pages accordingly. Pages whose .only_dyamic property are set to 1
will not be included in the static output.

Some Table tokens will also generate slightly or completely
different content for the dynamic and the static website. The general
use to which this is put is to remove dynamic elements such as search pages
and edit pages, since these cannot be functional on a static site.


==Document Makefile System|doc-makefiles==

The Documnet Makefile system can generate a standard Makefile, so it
does have a standard Makefile facility. However, this feature is
there only as a backup, or to quickly republish a document manually.

The ordinary way to publish a document is to use the Makefile.py module.
Makefile.py pretends it is make, and it executes the commands in the
Makefile as make would. We take this approach because we need to know the
program exit codes and their outputs in order to detect publishing errors.
Makefile has to report publishing errors so that owners or admins can
readily locate and correct them.

Individual pages can be designated "only_static", in which case they
will be appear in the static website.
You must initially publish a document using the Makefile execute, so that
Lampadas knows the document has been successfully published. Otherwise,
it wil not appear in doctables to ordinary users.


=CSS Stylesheets=
Expand Down
4 changes: 2 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ index.html: Lampadas.xml
Lampadas.html: Lampadas.xml
xsltproc --nonet ../xsl/lampadas-html.xsl Lampadas.xml $? > $@

preview: # Lampadas.html
# galeon Lampadas.html
preview: Lampadas.html
mozilla -remote "openURL(file://`pwd`/Lampadas.html)"
# galeon Lampadas.html

.SUFFIXES: .xml .wt .sgml .1 .5

Expand Down
Loading

0 comments on commit b16ccac

Please sign in to comment.