Skip to content

Commit

Permalink
new release, now we are beta
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeschiren committed Sep 6, 2019
1 parent 7a986f8 commit bd19755
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Commands/ArchiveList.php
Expand Up @@ -41,7 +41,7 @@ protected function configure()
<info>%command.name% --db-backup-path=/tmp/foo</info>';
$this->setHelp($HelpText);
$this->setName('archive:list');
$this->setDescription('Backup database');
$this->setDescription('List running archivers (does not work yet)');
$this->setDefinition(
[
new InputOption(
Expand Down
14 changes: 8 additions & 6 deletions Commands/ListSites.php
Expand Up @@ -12,13 +12,12 @@
use Piwik\Plugins\ExtraTools\Lib\Site;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Piwik\Plugins\SitesManager\API as APISitesManager;

use Piwik\Plugins\ExtraTools\Lib\Drop;

/**
* List sites.
*/
class ListSites extends ConsoleCommand
{

protected function configure()
{
$HelpText = 'The <info>%command.name%</info> will list all sites you have.
Expand All @@ -31,14 +30,17 @@ protected function configure()
}

/**
* Execute the command like: ./console backup:db"
* Execute the command like: ./console site:list"
*/
protected function execute(InputInterface $input, OutputInterface $output)
{


$list = new Site(null);
$sites = $list->list();

foreach ($sites as $site) {
$id = $site['idsite'];
echo $site['name'] . ' (' .$site['idsite'] . ")\n";
}
}
}
16 changes: 16 additions & 0 deletions Lib/OutPutFormats.php
@@ -0,0 +1,16 @@
<?php

namespace Piwik\Plugins\ExtraTools\Lib;

use Symfony\Component\Console\Output\OutputInterface;

class OutPutFormats
{


public function text($text, OutputInterface $output)
{
echo "foo";
//$this->output->write("<info>$text</info>");
}
}
1 change: 0 additions & 1 deletion Lib/Site.php
Expand Up @@ -40,7 +40,6 @@ function () use ($site) {
$excludeUnknownUrls = null;
$site = $this->site;
$extract = extract($site);
// var_dump($site);
return APISitesManager::getInstance()->addSite(
$siteName,
$urls,
Expand Down
4 changes: 1 addition & 3 deletions README.md
@@ -1,5 +1,3 @@
# NOT READY YET FOR PRODUCTION USE

# Extra Tools (for Matomo)

Some extra cli commands to help with maintaining Matomo.
Expand Down Expand Up @@ -194,4 +192,4 @@ This is only tested on the most recent release - then I'm writing this, it's 3.8
## Thank you!
This plugin is based on work done by [Ben Evans](https://github.com/nebev) in
https://github.com/nebev/piwik-cli-setup, and also reusing code in Matomo
core.
core.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -6,7 +6,7 @@
"install"
],
"homepage": "https://github.com/digitalist-se/extratools",
"version": "0.1.0-alpha8",
"version": "0.1.0-beta1",
"license": "GPL-3.0-or-later",
"authors": [
{
Expand Down
4 changes: 1 addition & 3 deletions docs/index.md
@@ -1,5 +1,3 @@
# NOT READY YET FOR PRODUCTION USE

# Extra Tools (for Matomo)

Some extra cli commands to help with maintaining Matomo.
Expand Down Expand Up @@ -194,4 +192,4 @@ This is only tested on the most recent release - then I'm writing this, it's 3.8
## Thank you!
This plugin is based on work done by [Ben Evans](https://github.com/nebev) in
https://github.com/nebev/piwik-cli-setup, and also reusing code in Matomo
core.
core.
2 changes: 1 addition & 1 deletion plugin.json
@@ -1,7 +1,7 @@
{
"name": "ExtraTools",
"description": "Adds automatic installation from the console, db backups, creation of new sites etc.",
"version": "0.1.0-alpha8",
"version": "0.1.0-beta1",
"theme": false,
"require": {
"piwik": ">=3.8.0-stable,<4.0.0-b1"
Expand Down

0 comments on commit bd19755

Please sign in to comment.