diff --git a/CHANGELOG b/CHANGELOG index b0ca2f620d..e34c4dae6b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,8 @@ git-annex (10.20230627) UNRELEASED; urgency=medium * Bug fix: Re-running git-annex adjust or sync when in an adjusted branch would overwrite the original branch, losing any commits that had been made to it since the adjusted branch was created. + * importfeed: Add feedurl to the metadata (and allow it to be used in the + --template) -- Joey Hess Mon, 26 Jun 2023 13:10:40 -0400 diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index e850580482..072f285b08 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -537,7 +537,8 @@ minimalMetaData i = case getItemId (item i) of - and to generate the filename. -} extractFields :: ToDownload -> [(String, String)] extractFields i = map (uncurry extractField) - [ ("feedtitle", [feedtitle]) + [ ("feedurl", [Just (feedurl i)]) + , ("feedtitle", [feedtitle]) , ("itemtitle", [itemtitle]) , ("feedauthor", [feedauthor]) , ("itemauthor", [itemauthor]) diff --git a/doc/git-annex-importfeed.mdwn b/doc/git-annex-importfeed.mdwn index a3a8f5936b..1c87288c24 100644 --- a/doc/git-annex-importfeed.mdwn +++ b/doc/git-annex-importfeed.mdwn @@ -72,7 +72,7 @@ resulting in the new url being downloaded to such a filename. The default template is '${feedtitle}/${itemtitle}${extension}' The available variables in the template include these that - are information about the feed: feedtitle, feedauthor + are information about the feed: feedtitle, feedauthor, feedurl And these that are information about individual items in the feed: itemtitle, itemauthor, itemsummary, itemdescription, itemrights,