This file is indexed.

/usr/bin/refdb-ms is in refdb-clients 1.0.2-3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/perl

=head1 NAME

refdb-ms - RefDB MakeStyle, a bibliography style generator for RefDB

=head1 Summary

A utility to aid the generation of RefDB bibliography styles for RefDB <refdb.sourceforge.net>.

=head1 Requirements

One of the design goals for this utility was to minimise external dependencies.

=over

=item Refdb::Makestyle

A custom module containing methods and attributes used by this script.

Debian package: libperl-refdb-makestyle.

=back

=cut

use strict;
use RefDB::Makestyle;

$ENV{'CLUI_DIR'} = "OFF"; 

my $ui = UI->new();

die "Fatal errors encountered.\n" if not $ui->startup_checks();

=head1 The program

=head2 Style root

The root element of the style, C<CiteStyle>, is a data member of the user-interface (C<ui>) object.  All other elements of the style are children of the C<CiteStyle> element.

=cut

$ui->set_root( CiteStyle->new() );

=head2 Help system

There is a series of help screens.  See C<refdb-ms.pl> library for details.

=cut

print "RefDB MakeStyle -- generate bibliography styles for RefDB.\n";
$ui->help_system() if $ui->_input_confirm( "Do you require help?" );

=head2 Main entry loop

This is the main part of the program -- where the style itself is created.

It is short as most of the "work" is done by the C<refdb-ms.pl> library.

=cut

my ( $current_element , @choice , $child ) =
	( $ui->get_root()->get_last_incomplete() );
$current_element->add_attributes();
$current_element->enter_value();
while ( 1 ) {
	# Get working element
	$current_element = $ui->get_root()->get_last_incomplete();
	last if not defined $current_element;  # style is complete 
	# Add element attributes and content
	$current_element->add_attributes();
	$current_element->enter_value();
	# Provide feedback
	printf "\nProgress report:\n%s\n" , $ui->get_root()->show_progress();
	printf "Current element: %s\n" , $current_element->get_name();
	# Select next element/action
	@choice = $current_element->select_next_child();
	# Delete element if user selected that option
	if ( @choice[1] eq "[DELETE]" ) {
		$ui->delete_selected_element();
		next;
	}
	# If current element complete, skip next part
	next if not defined $choice[1];  # current element is complete
	printf "\n%s" , @choice[0];
	# Add newly selected element to style
	$child = $ui->create_element( @choice[1] );
	$current_element->add_child( $child );
}
print "\nThe style is now complete.\n";

=head2 Write output

The style is written to an C<xml> file.  If the default name, E<lt>I<stylename>-style.xmlE<gt>, already exists, another is created.

=cut

$ui->write_style();

=head2 Write summary

A summary of the style is written to an C<html> file.  It is meant as an aide memoire when entering references.

=cut

$ui->write_summary();

=head2 Upload style

The style can be uploaded to refdb.  If a pre-existing style of the same name exists it is backed up to file before the new style is added.

=cut

$ui->upload_style();

printf "\nStyle \"%s\" has been created.\nIt has been saved to file <%s>.\nA summary of the style has been written to file <%s>.\n\nRefDB Makestyle is finished.\n" , $ui->get_root()->get_style_name() , $ui->get_style_file() , $ui->get_summary_file();
exit 0;

=head1 AUTHOR

David Nebauer, david E<lt>atE<gt> nebauer E<lt>dotE<gt> org

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2004 by David Nebauer

Distributed under the same license and conditions as the C<Refdb> project E<lt>L<http://refdb.sourceforge.net/>E<gt>.

=cut