-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for using Blosxom with muse-blosxom.el
* 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
Showing
6 changed files
with
499 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.