root/trunk/tools/plugin-config

Revision 4196, 0.6 kB (checked in by takayama, 3 months ago)

* Set svn keywords

  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/usr/bin/perl -w
2use strict;
3
4use lib 'lib', '../lib';
5use MT::Bootstrap;
6use MT;
7use MT::PluginData;
8
9use Data::Dumper;
10$Data::Dumper::Terse = 1;
11$Data::Dumper::Indent = 1;
12$Data::Dumper::Quotekeys = 0;
13$Data::Dumper::Sortkeys = 1;
14
15my $mt = new MT;
16my $plugin = $ARGV[0];
17my $scope = $ARGV[1] || 'system';
18if (!$plugin) {
19    print "usage: $0 <plugin_name> [<scope>]\n";
20    exit 1;
21}
22
23my $config = MT::PluginData->load({
24    plugin => $plugin,
25    key => $scope eq 'system' ? 'configuration' : 'configuration:' . $scope
26});
27if (!$config) {
28    print "(None)\n";
29} else {
30    my $data = $config->data;
31    my $dump = Dumper($data);
32    print $dump;
33}
Note: See TracBrowser for help on using the browser.