1 package App
::Zealc
::Command
::download
;
7 our $VERSION = '0.000_001';
9 use App
::Zealc
'-command';
11 use File
::Spec
::Functions qw
/rel2abs/;
13 use Term
::ANSIColor qw
/:constants/;
14 use Term
::FormatColumns qw
/format_columns/;
17 use constant FEEDS
=> [qw
/NET_Framework ActionScript ColdFusion Akka Android AngularJS Ansible Apache_HTTP_Server Appcelerator_Titanium AppleScript Arduino AWS_JavaScript BackboneJS Bash Boost Bootstrap_2 Bootstrap_3 Bourbon C CakePHP Cappuccino Chai Chef Clojure CMake Cocos2D Cocos3D CodeIgniter CoffeeScript Common_Lisp Compass Cordova Corona CSS D3JS Dart Django Dojo DOM Drupal_7 Drupal_8 ElasticSearch Elixir Emacs_Lisp EmberJS Emmet Erlang Express ExpressionEngine ExtJS Flask Font_Awesome Foundation Git GLib Go Grails Groovy Groovy_JDK Grunt Haml Haskell HTML iOS Jade Jasmine Java_EE6 Java_EE7 Java_SE6 Java_SE7 Java_SE8 JavaFX JavaScript Joomla jQuery jQuery_Mobile jQuery_UI KnockoutJS Kobold2D LaTeX Laravel Less Linux_Man_Pages Mac_OS_X Man_Pages MarionetteJS Markdown Meteor MomentJS MongoDB Mongoose Mono MooTools MySQL Neat Nginx NodeJS NumPy OCaml OpenCV_C OpenCV_Java OpenCV_Python OpenGL_2 OpenGL_3 OpenGL_4 Perl PhoneGap PHP PHPUnit Play_Java Play_Scala PostgreSQL Processing PrototypeJS Puppet Python_2 Python_3 Qt_4 Qt_5 R Redis RequireJS Ruby Ruby_2 Ruby_on_Rails_3 Ruby_on_Rails_4 RubyMotion Rust SaltStack Sass Scala SciPy Sencha_Touch Sinon Smarty Sparrow Spring_Framework SproutCore SQLAlchemy SQLite Statamic Stylus SVG Swift Symfony Tcl Tornado Twig Twisted TYPO3 UnderscoreJS Unity_3D Vagrant Vim VMware_vSphere WordPress Xamarin Xojo XSLT XUL Yii YUI Zend_Framework_1 Zend_Framework_2 ZeptoJS/];
19 my %feeds = map { y/A-Z_/a-z-/r => $_ } @
{FEEDS
()};
21 sub usage_desc
{ "%c download %o\n%c download %o DOCSET\n%c download URL_TO_FEED" }
24 my ($self, $opts, $args) = @_;
26 $self->usage_error("Too many arguments") if @args > 1;
31 return $_ unless -d
$file;
32 return BOLD
. "$_*" . RESET
if -t
select;
37 my ($self, $opts, $args) = @_;
41 my $fname = $feeds{$_} =~ y/_/ /r;
42 my $file = rel2abs
"$fname.docset", $self->app->path;
45 print format_columns
@feeds;
47 my $feed = Zeal
::Feed
->new(exists $feeds{$name} ?
"http://kapeli.com/feeds/$feeds{$name}.xml" : $name);
48 say "Downloading $feeds{$name} version ", $feed->version, ' from ', $feed->url;
49 $feed->download($self->app->path);
60 App::Zealc::Command::download - view available docsets and download them
68 # Downloading LaTeX version /1 from http://london3.kapeli.com/feeds/LaTeX.tgz
70 zealc download http://kapeli.com/feeds/LaTeX.xml
71 # Downloading LaTeX version /1 from http://london3.kapeli.com/feeds/LaTeX.tgz
75 When invoked with no arguments, the download command displays a list
76 of known Dash docsets. The installed docsets have a * after their
79 When invoked with an argument from the list of known Dash docsets it
80 downloads that docset.
82 When invoked with an argument not from the list of known Dash docsets
83 it assumes the argument is a link to a L<Zeal::Feed> and downloads the
84 docset described by the feed.
92 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
94 =head1 COPYRIGHT AND LICENSE
96 Copyright (C) 2015 by Marius Gavrilescu
98 This library is free software; you can redistribute it and/or modify
99 it under the same terms as Perl itself, either Perl version 5.20.1 or,
100 at your option, any later version of Perl 5 you may have available.
This page took 0.025901 seconds and 4 git commands to generate.