App-padconsole

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Browser::Open" : "0",
            "Config::YAML" : "0",
            "DateTime" : "0",
            "Etherpad" : "v1.2.13.1",
            "Term::ReadLine" : "0",
            "URI::Escape" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "repository" : {
         "type" : "git",

META.yml  view on Meta::CPAN

  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: App-padconsole
no_index:
  directory:
    - t
    - inc
requires:
  Browser::Open: '0'
  Config::YAML: '0'
  DateTime: '0'
  Etherpad: v1.2.13.1
  Term::ReadLine: '0'
  URI::Escape: '0'
resources:
  repository: https://framagit.org/luc/padconsole.git
version: '0.13'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN


    'EXE_FILES'     =>  [ 'padconsole' ],

    'LICENSE'       => 'perl',

    'PREREQ_PM'     => {
        'Etherpad'       => '1.2.13.1',
        'Term::ReadLine' => 0,
        'Config::YAML'   => 0,
        'URI::Escape'    => 0,
        'DateTime'       => 0,
        'Browser::Open'  => 0,
    },

    'META_MERGE'    => {
        "meta-spec" => { version => 2 },
        resources => {
            repository => {
                type => 'git',
                url  => 'https://framagit.org/luc/padconsole.git',
                web  => 'https://framagit.org/luc/padconsole',

padconsole  view on Meta::CPAN

use IPC::Open3;
use File::Spec::Functions;
use File::Path qw/make_path/;

use Etherpad;
use Mojo::File;
use Mojo::Util qw/encode/;
use Term::ReadLine;
use Config::YAML;
use URI::Escape;
use DateTime;
use Browser::Open qw/open_browser_cmd/;
binmode STDOUT, ":utf8";

BEGIN {
    use Exporter ();
    use vars qw($VERSION);
    $VERSION     = '0.13';
}

$Getopt::Std::STANDARD_HELP_VERSION = 1;

padconsole  view on Meta::CPAN


sub _infos {
    my $pad = shift @commands;

    if (defined $pad) {
        my $revs = $ec->get_revisions_count($pad);
        if (defined $revs) {
            my @authors     = do { my %seen; grep { !$seen{$_}++ } $ec->list_names_of_authors_of_pad($pad) };
            my $last_edited = $ec->get_last_edited($pad);
            $last_edited    =~ s/\d{3}$//;
            my $dt          = DateTime->from_epoch(epoch => $last_edited);
            $last_edited    = $dt->strftime('%F %T');

            my $separator = (substr($url, -1, 1) eq '/' ) ? 'p/' : '/p/';

            printf 'Pad %s'."\n", $pad;
            printf '  Number of revisions : %s'."\n", $revs;
            printf '  Authors list        : %s'."\n", join(', ', sort @authors);
            printf '  Last edition        : %s'."\n", $last_edited;
            printf '  URL                 : %s%s%s'."\n", $url, $separator, uri_escape($pad);
            printf '  Read only URL       : %s%s%s'."\n", $url, $separator, uri_escape($ec->get_read_only_id($pad));

t/test.t  view on Meta::CPAN

# vim:set sw=4 ts=4 ft=perl expandtab:
use warnings;
use strict;

use Test::More tests => 7;
use_ok( 'Etherpad' );
use_ok( 'Mojo::File' );
use_ok( 'Term::ReadLine' );
use_ok( 'Config::YAML' );
use_ok( 'URI::Escape' );
use_ok( 'DateTime' );
use_ok( 'Browser::Open' );



( run in 0.284 second using v1.01-cache-2.11-cpan-05444aca049 )