gmail-filter-builder/bin/generate-filters

16 lines
383 B
Plaintext
Raw Normal View History

2018-01-04 13:03:21 +00:00
#!/usr/bin/env php
<?php
use Opdavies\GmailFilterBuilder\Builder;
2018-01-04 13:16:54 +00:00
if (file_exists(__DIR__.'/../../../../filters.php')) {
$filters = require(__DIR__.'/../../../../filters.php');
} elseif (file_exists(__DIR__.'/../filters.php')) {
2018-01-04 13:03:21 +00:00
$filters = require(__DIR__.'/../filters.php');
} else {
throw new \Exception('No filters.php file found.');
}
echo new Builder($filters);