Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Released version 0.26

  • Loading branch information...
commit c395794d663ac8e247ddf63a64c3809f538d297a 1 parent 34e5a9d
@ingydotnet authored
View
4 Changes
@@ -1,9 +1,11 @@
---
version: 0.26
-date: Tue Nov 23 15:16:42 EST 2010
+date: Tue Oct 11 21:47:43 EDT 2011
changes:
- Add inline script support for running external programs
for things like images and browser.
+- Support for auto-sizing slides (wolfsage++)
+- Switch from Gloom to Mo.
---
version: 0.25
date: Tue Oct 5 22:18:50 PDT 2010
View
28 MANIFEST.SKIP
@@ -1,28 +0,0 @@
-^Makefile$
-^Makefile\.old$
-^pm_to_blib$
-^blib/
-^pod2htm.*
-^MANIFEST\.SKIP$
-^MANIFEST\.bak$
-^\.git/
-^\.gitignore
-^\.gitmodules
-/\.git/
-\.svn/
-^\.vimrc$
-\.sw[op]$
-^core$
-^out$
-^tmon.out$
-^\w$
-^foo.*
-^notes
-^todo
-^ToDo$
-## avoid OS X finder files
-\.DS_Store$
-## skip komodo project files
-\.kpf$
-## ignore emacs and vim backup files
-~$
View
20 Makefile.PL
@@ -1,19 +1 @@
-use inc::Module::Install;
-
-all_from 'lib/Vroom.pm';
-readme_from;
-manifest_skip;
-ack_xxx;
-version_check;
-
-requires 'IO::All';
-requires 'YAML::XS';
-requires 'File::HomeDir';
-requires 'Template::Toolkit::Simple';
-requires 'Term::Size';
-
-use_gloom 'Vroom::OO';
-
-install_script 'vroom';
-
-WriteAll;
+use inc::Module::Package 'Ingy:modern 0.17';
View
11 README
@@ -94,6 +94,7 @@ INPUT FORMAT
height: 84
width: 20
# skip: 12 # Skip 12 slides. Useful when making slides.
+ # auto_size: 1 # Determines height/width automatically
---- center
My Presentation
@@ -182,6 +183,10 @@ CONFIGURATION OPTIONS
The number of columns in the terminal you plan to use when
presenting the show. Used for centering the content.
+ auto_size: <0|1>
+ When set to 1, the height/width options above will be ignored and
+ determined each time you start the slideshow.
+
indent: <number>
All slides will be indented by this number of spaces by default.
@@ -304,10 +309,10 @@ GITHUB NOTES
gh-pages at <http://ingydotnet.github.com/vroom-pm/>.
AUTHOR
- Ingy döt Net <ingy@cpan.org>
+ Ingy döt Net <ingy@ingy.net>
-COPYRIGHT
- Copyright (c) 2008, 2009. Ingy döt Net.
+COPYRIGHT AND LICENSE
+ Copyright (c) 2008, 2009, 2010, 2011. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
View
0  vroom → bin/vroom 100644 → 100755
File renamed without changes
View
101 lib/Vroom.pm
@@ -1,43 +1,56 @@
-package Vroom;
+##
+# name: Vroom
+# abstract: Slide Shows in Vim
+# author: Ingy döt Net <ingy@ingy.net>
+# license: perl
+# copyright: 2008, 2009, 2010, 2011
+
use 5.006001;
-use Vroom::OO -base;
+package Vroom;
+use Vroom::Mo;
our $VERSION = '0.26';
-use IO::All;
-use YAML::XS;
+use File::HomeDir 0.97;
+use IO::All 0.44;
+use Template::Toolkit::Simple 0.13;
+use Term::Size 0.2;
+use YAML::XS 0.37;
+
use Getopt::Long;
-use File::HomeDir;
use Cwd;
use Carp;
-use Term::Size;
-
-has input => 'slides.vroom';
-has stream => '';
-has ext => '';
-has help => 0;
-has clean => 0;
-has compile => 0;
-has sample => 0;
-has run => 0;
-has html => 0;
-has text => 0;
-has ghpublish => 0;
-has start => 0;
-has digits => 0;
-has skip => 0;
-has config => {
- title => 'Untitled Presentation',
- height => 24,
- width => 80,
- list_indent => 10,
- skip => 0,
- vim => 'vim',
- vimrc => '',
- gvimrc => '',
- script => '',
- auto_size => 0,
-};
+
+has input => (default => sub {'slides.vroom'});
+has stream => (default => sub {''});
+has ext => (default => sub {''});
+has help => (default => sub{0});
+has clean => (default => sub{0});
+has compile => (default => sub{0});
+has sample => (default => sub{0});
+has run => (default => sub{0});
+has html => (default => sub{0});
+has text => (default => sub{0});
+has ghpublish => (default => sub{0});
+has start => (default => sub{0});
+has digits => (default => sub{0});
+has skip => (default => sub{0});
+has config => (
+ default => sub {
+ +{
+ title => 'Untitled Presentation',
+ height => 24,
+ width => 80,
+ list_indent => 10,
+ skip => 0,
+ vim => 'vim',
+ vimrc => '',
+ gvimrc => '',
+ script => '',
+ auto_size => 0,
+ };
+ }
+);
sub usage {
return <<'...';
@@ -215,7 +228,6 @@ sub makeText {
sub makeHTML {
my $self = shift;
- require Template::Toolkit::Simple;
$self->cleanAll;
$self->makeSlides;
io('html')->mkdir;
@@ -842,12 +854,6 @@ If it makes sense to you, run it. (at your own risk :)
...
}
-=encoding utf8
-
-=head1 NAME
-
-Vroom - Slide Shows in Vim
-
=head1 SYNOPSIS
> mkdir MySlides # Make a Directory for Your Slides
@@ -1213,18 +1219,3 @@ ones above, to publish your slides to a gh-pages branch.
You can see an example of a talk published to HTML and posted via gh-pages
at L<http://ingydotnet.github.com/vroom-pm/>.
-
-=head1 AUTHOR
-
-Ingy döt Net <ingy@cpan.org>
-
-=head1 COPYRIGHT
-
-Copyright (c) 2008, 2009. Ingy döt Net.
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-See http://www.perl.com/perl/misc/Artistic.html
-
-=cut
View
5 lib/Vroom/Mo.pm
@@ -0,0 +1,5 @@
+package Vroom::Mo;
+# use Mo qw'default import';
+# The following line of code was produced from the previous line by
+# Mo::Inline version 0.27
+no warnings;my$M=__PACKAGE__.::;*{$M.Object::new}=sub{bless{@_[1..$#_]},$_[0]};*{$M.import}=sub{import warnings;$^H|=1538;my($P,%e,%o)=caller.::;shift;eval"no Mo::$_",&{$M.$_.::e}($P,\%e,\%o,\@_)for@_;return if$e{M};%e=(extends,sub{eval"no $_[0]()";@{$P.ISA}=$_[0]},has,sub{my$n=shift;my$m=sub{$#_?$_[0]{$n}=$_[1]:$_[0]{$n}};$m=$o{$_}->($m,$n,@_)for sort keys%o;*{$P.$n}=$m},%e,);*{$P.$_}=$e{$_}for keys%e;@{$P.ISA}=$M.Object};*{$M.'default::e'}=sub{my($P,$e,$o)=@_;$o->{default}=sub{my($m,$n,%a)=@_;$a{default}or return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$a{default}->(@_):$m->(@_)}}};my$i=\&import;*{$M.import}=sub{(@_==2 and not $_[1])?pop@_:@_==1?push@_,grep!/import/,@f:();goto&$i};@f=qw[default import];use strict;use warnings;
View
195 lib/Vroom/OO.pm
@@ -1,195 +0,0 @@
-### This module was derived from Gloom - the Great Little OO Module!
-### Read `perldoc Gloom` for more information.
-
-package Vroom::OO;
-
-use 5.008003;
-use strict;
-use warnings;
-
-our $VERSION = '0.15';
-
-sub import {
- my ($class, $flag) = @_;
- my ($package, $module) = caller(0);
-
- strict->import;
- warnings->import;
-
- if ($class->isa(__PACKAGE__) and
- defined $flag and
- $flag eq '-base'
- ) {
- $class->import_base($package, $module);
- }
- else {
- require Exporter;
- goto &Exporter::import;
- }
-}
-
-sub import_base {
- my ($class, $package, $module) = @_;
- no strict 'refs';
- push @{$package . '::ISA'}, $class;
- $class->import_fake($package, $module);
- $class->export_base($package);
-}
-
-sub import_fake {
- my ($class, $package, $module) = @_;
- my $inc_module = $package . '.pm';
- $inc_module =~ s/::/\//g;
- return if defined $INC{$inc_module};
- $INC{$inc_module} = $module;
-}
-
-sub export_base {
- my ($source, $target) = @_;
- no strict 'refs';
- for my $sub (map {
- /::/ ? $_ : "${source}::$_"
- } $source->EXPORT_BASE()) {
- my $name = $sub;
- $name =~ s/.*:://;
- *{$target . "::$name"} = \&$sub;
- }
-}
-
-sub new {
- my $class = shift;
- my $self = bless {}, $class;
- $self->init(@_);
- return $self;
-}
-
-sub init {
- my $self = shift;
- while (my ($property, $value) = splice(@_, 0, 2)) {
- unless ($self->can($property)) {
- my $class = ref $self;
- require Carp;
- Carp::confess("Class '$class' has no property '$property'");
- }
- $self->$property($value);
- }
-}
-
-my %code = (
- sub_start =>
- "sub {\n",
- set_default =>
- " \$_[0]->{%s} = %s\n unless exists \$_[0]->{%s};\n",
- class =>
- " return do { my \$class = \$_[0]; %s } unless ref \$_[0];\n",
- init =>
- " return \$_[0]->{%s} = do { my \$self = \$_[0]; %s }\n" .
- " unless \$#_ > 0 or defined \$_[0]->{%s};\n",
- return_if_get =>
- " return \$_[0]->{%s} unless \$#_ > 0;\n",
- set =>
- " \$_[0]->{%s} = \$_[1];\n",
- onset =>
- " do { local \$_ = \$_[1]; my \$self = \$_[0]; %s };\n",
- chain =>
- " return \$_[0];\n}\n",
- sub_end =>
- " return \$_[0]->{%s};\n}\n",
-);
-
-my $parse_arguments = sub {
- my $paired_arguments = shift || [];
- my ($args, @values) = ({}, ());
- my %pairs = map { ($_, 1) } @$paired_arguments;
- while (@_) {
- my $elem = shift;
- if (defined $elem and defined $pairs{$elem} and @_) {
- $args->{$elem} = shift;
- }
- elsif ($elem eq '-chain') {
- $args->{-chain} = 1;
- }
- else {
- push @values, $elem;
- }
- }
- return wantarray ? ($args, @values) : $args;
-};
-
-my $default_as_code = sub {
- no warnings 'once';
- require Data::Dumper;
- local $Data::Dumper::Sortkeys = 1;
- my $code = Data::Dumper::Dumper(shift);
- $code =~ s/^\$VAR1 = //;
- $code =~ s/;$//;
- return $code;
-};
-
-sub has {
- my $package = caller;
- my ($args, @values) = &$parse_arguments(
- [ qw(-package -class -init -onset) ],
- @_,
- );
- my ($has, $default) = @values;
- $package = $args->{-package} if defined $args->{-package};
- return if defined &{"${package}::$has"};
- my $default_string =
- ( ref($default) eq 'ARRAY' and not @$default )
- ? '[]'
- : (ref($default) eq 'HASH' and not keys %$default )
- ? '{}'
- : &$default_as_code($default);
-
- my $code = $code{sub_start};
-
- if ($args->{-class}) {
- if ($args->{-class} eq '-init') {
- $args->{-class} = $args->{-init};
- $args->{-class} =~ s/\$self/\$class/g;
- }
- my $fragment = $code{class};
- $code .= sprintf
- $fragment,
- $args->{-class};
- }
-
- if ($args->{-init}) {
- my $fragment = $code{init};
- $code .= sprintf
- $fragment,
- $has,
- $args->{-init},
- ($has) x 4;
- }
- $code .= sprintf $code{set_default}, $has, $default_string, $has
- if defined $default;
- $code .= sprintf $code{return_if_get}, $has;
- $code .= sprintf $code{set}, $has;
- $code .= sprintf $code{onset}, $args->{-onset}
- if defined $args->{-onset};
- if (defined $args->{-chain}) {
- $code .= $code{chain};
- }
- else {
- $code .= sprintf $code{sub_end}, $has;
- }
-
- my $sub = eval $code;
- die "eval('$code') failed: $@" if $@;
- no strict 'refs';
- *{"${package}::$has"} = $sub;
- return $code if defined wantarray;
-}
-
-our $DumpModule = 'YAML::XS';
-sub WWW { require XXX; local $XXX::DumpModule = $DumpModule; XXX::WWW(@_) }
-sub XXX { require XXX; local $XXX::DumpModule = $DumpModule; XXX::XXX(@_) }
-sub YYY { require XXX; local $XXX::DumpModule = $DumpModule; XXX::YYY(@_) }
-sub ZZZ { require XXX; local $XXX::DumpModule = $DumpModule; XXX::ZZZ(@_) }
-
-sub EXPORT_BASE {
- return map { __PACKAGE__ . '::' .$_ }
- qw(has WWW XXX YYY ZZZ);
-}
Please sign in to comment.
Something went wrong with that request. Please try again.