mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add command line argument to export user feeds
This commit is contained in:
parent
39d752ca85
commit
f98fc1e03a
5 changed files with 50 additions and 5 deletions
|
@ -32,6 +32,7 @@ const (
|
|||
flagHealthCheckHelp = `Perform a health check on the given endpoint (the value "auto" try to guess the health check endpoint).`
|
||||
flagRefreshFeedsHelp = "Refresh a batch of feeds and exit"
|
||||
flagRunCleanupTasksHelp = "Run cleanup tasks (delete old sessions and archives old entries)"
|
||||
flagExportUserFeedsHelp = "Export user feeds (provide the username as argument)"
|
||||
)
|
||||
|
||||
// Parse parses command line arguments.
|
||||
|
@ -51,6 +52,7 @@ func Parse() {
|
|||
flagHealthCheck string
|
||||
flagRefreshFeeds bool
|
||||
flagRunCleanupTasks bool
|
||||
flagExportUserFeeds string
|
||||
)
|
||||
|
||||
flag.BoolVar(&flagInfo, "info", false, flagInfoHelp)
|
||||
|
@ -69,6 +71,7 @@ func Parse() {
|
|||
flag.StringVar(&flagHealthCheck, "healthcheck", "", flagHealthCheckHelp)
|
||||
flag.BoolVar(&flagRefreshFeeds, "refresh-feeds", false, flagRefreshFeedsHelp)
|
||||
flag.BoolVar(&flagRunCleanupTasks, "run-cleanup-tasks", false, flagRunCleanupTasksHelp)
|
||||
flag.StringVar(&flagExportUserFeeds, "export-user-feeds", "", flagExportUserFeedsHelp)
|
||||
flag.Parse()
|
||||
|
||||
cfg := config.NewParser()
|
||||
|
@ -177,6 +180,11 @@ func Parse() {
|
|||
return
|
||||
}
|
||||
|
||||
if flagExportUserFeeds != "" {
|
||||
exportUserFeeds(store, flagExportUserFeeds)
|
||||
return
|
||||
}
|
||||
|
||||
if flagFlushSessions {
|
||||
flushSessions(store)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue