Skip to content

Commit

Permalink
Add support for using Blosxom with muse-blosxom.el
Browse files Browse the repository at this point in the history
* AUTHORS: Add new authors for contrib files.

* contrib/blosxom/getstamps.pl: New file that implements fetching
  timestamps from published Muse files and placing them in a single
  timestamps file.  That file can then be used by blosxom's metadate
  plugin.  Thanks to Michael Welle for providing this file, as well as
  instructions on how to use Muse with Blosxom.

* contrib/blosxom/metadate_0_0_3: New file implementing the metadate
  plugin for blosxom.

* texi/muse.texi (Blosxom Requirements): Briefly document using Blosxom
  to serve Muse entries.

* NEWS: Add entries for these changes.
  • Loading branch information
mwolson committed Aug 25, 2007
1 parent f1c56e1 commit 21ed386
Show file tree
Hide file tree
Showing 6 changed files with 499 additions and 4 deletions.
10 changes: 7 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ Contributed software

This is a listing of authors of software in the `contrib' directory.

Nathan Kent Bullock: getstamps.py, hardcodedates.py
(No license was included, so the intent was most likely to use the
same license as that of pyblosxom, which is the MIT license)
Nathan Kent Bullock: pyblosxom/getstamps.py, pyblosxom/hardcodedates.py

Cameron Desautels: pyblosxom/metadate.py

Mark Ivey: blosxom/metadate_0_0_3

Eric Marsden: cgi.el, httpd.el
(assigned past and future changes to FSF)

Michael Welle: blosxom/getstamps.pl
13 changes: 12 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
2007-08-24 Michael Olson <mwolson@gnu.org>

* AUTHORS: Add new authors for contrib files.

* NEWS: Add entries for Muse 3.11.

* README: Mention that contents of contrib/blosxom and
contrib/pyblosxom have different licenses than the rest of Muse.

* contrib/blosxom/getstamps.pl: New file that implements fetching
timestamps from published Muse files and placing them in a single
timestamps file. That file can then be used by blosxom's metadate
plugin. Thanks to Michael Welle for providing this file, as well
as instructions on how to use Muse with Blosxom.

* contrib/blosxom/metadate_0_0_3: New file implementing the
metadate plugin for blosxom.

* contrib/pyblosxom/getstamps.py: Add license text. It seems safe
to assume that the original author wanted this to be distributed
with Pyblosxom, and hence use the MIT license like the rest of
Expand All @@ -27,7 +38,7 @@

* texi/muse.texi (Blosxom Requirements): Organize information by
subheading and subsubheading, and document how to use the metadate
plugin.
plugin. Briefly document using Blosxom to serve Muse entries.

2007-08-23 Michael Olson <mwolson@gnu.org>

Expand Down
10 changes: 10 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ muse-mode-auto-p set to non-nil, please set muse-mode-auto-p to nil
from now on. This was a workaround that some people used to deal with
a bug that has now been fixed.

** Support for serving published Muse files with Blosxom.
See the end of the Blosxom Requirements section of the Muse manual for
details.

** The metadate plugin for PyBlosxom is now included with Muse
in contrib/pyblosxom/metadate.py.

** Compatibility fixes for Emacs21 and XEmacs

*** Use copy-tree instead of copy-alist.
Expand Down Expand Up @@ -82,6 +89,9 @@ produced by Muse.

*** Document support for citations in new Citations section.

*** Document how to use the Pyblosxom metadate plugin in the
Blosxom Requirements section.

* Changes in Muse 3.10

** Relicense to GPLv3.
Expand Down
111 changes: 111 additions & 0 deletions contrib/blosxom/getstamps.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/usr/bin/perl -w --

#
# $Id: getstamps.pl,v 1.3 2007-08-19 13:46:54 welle Exp $
#

# Author: Michael Welle

# This file is available under the terms of the GNU General Public
# License, Version 2.

# Modified by Michael Olson to add Author note. license text, and to
# fix a use of "muse" rather than $muse_file_extension.

#my $tsfile = "/tmp/blog/timestamps";
my $tsfile = "-";
my $muse_file_extension = "muse";

#
#
#
sub process_file {
my ($file) = @_;


open( F, "<$file" );

while ( <F> ) {

if ( /^#date\s+(.+)$/ ) {

close ( F );
my $d = $1;

$file =~ s/\.${muse_file_extension}$/\.txt/;
$file =~ s/^\.\///;

if ( $d =~ /(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)/ ) {

printf TS "${file}=>$2/$3/$1 $4:$5\n";
return;

} # if

} # if

} # while

close( F );

} # process_file



#
#
#
sub traverse_directory {
my ($directory) = @_;
local *DIR;
my @files = ();
my $pfad = "";


opendir( DIR, $directory );
@files = readdir( DIR );
closedir( DIR );


foreach my $file ( @files ) {

next if ( !( $file =~ /^.*\.${muse_file_extension}$/ )
|| ($file eq '.') || ($file eq '..'));


$path = "$directory/$file";

if( -d $path ) {

traverse_directory( $path );

} else {

process_file( $path );

} #if

} #foreach

} # traverse_directory


#
# Here we go...
#

open( TS, ">${tsfile}" );

if ( @ARGV == 0 ) {

traverse_directory( "." );

} else {

traverse_directory( $ARGV[0] );

} #if

close( TS );

exit 0;
Loading

0 comments on commit 21ed386

Please sign in to comment.