diff options
| author | 2016-10-23 13:37:48 +0200 | |
|---|---|---|
| committer | 2016-10-23 13:37:48 +0200 | |
| commit | fcb9280fc87c159539f5832ab35f174cd515654e (patch) | |
| tree | 8fa0879f001c9cbc6120d2b0bbff364358871851 /cli/export-opml-for-user.php | |
| parent | 6d42acf5fd7906168c9e547c3d0ce675b8fd6fd2 (diff) | |
CLI export
ZIP export, OPML export.
Corrected height of feeds select in Pafat theme.
https://github.com/FreshRSS/FreshRSS/pull/1338
https://github.com/FreshRSS/FreshRSS/issues/1039
https://github.com/FreshRSS/FreshRSS/issues/1277
Diffstat (limited to 'cli/export-opml-for-user.php')
| -rw-r--r-- | 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 100644 index 000000000..bce4efd63 --- /dev/null +++ b/cli/export-opml-for-user.php @@ -0,0 +1,24 @@ +#!/usr/bin/php +<?php +require('_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); |
