diff options
| author | 2017-12-16 15:24:13 +0100 | |
|---|---|---|
| committer | 2017-12-16 15:24:13 +0100 | |
| commit | fdc9e0d75a786101a14f64bc418b48fdd1cb4890 (patch) | |
| tree | 9a7a1d523ab1279e2efce84d2d0c73dd0ad47c70 /cli/export-opml-for-user.php | |
| parent | f7560c585f211be41b093906e3a8fb5a6071c660 (diff) | |
| parent | ccb829418d25af49d129ac227b0cbd09c085b8a3 (diff) | |
Merge branch 'dev' into hebrew-i18n
Diffstat (limited to 'cli/export-opml-for-user.php')
| -rwxr-xr-x | cli/export-opml-for-user.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/export-opml-for-user.php b/cli/export-opml-for-user.php new file mode 100755 index 000000000..fd0993c35 --- /dev/null +++ b/cli/export-opml-for-user.php @@ -0,0 +1,24 @@ +#!/usr/bin/php +<?php +require(__DIR__ . '/_cli.php'); + +$options = getopt('', array( + 'user:', + )); + +if (empty($options['user'])) { + fail('Usage: ' . basename(__FILE__) . " --user username > /path/to/file.opml.xml"); +} + +$username = cliInitUser($options['user']); + +fwrite(STDERR, 'FreshRSS exporting OPML for user “' . $username . "”…\n"); + +$importController = new FreshRSS_importExport_Controller(); + +$ok = false; +$ok = $importController->exportFile(true, false, array(), 0, $username); + +invalidateHttpCache($username); + +done($ok); |
