git-annex-importfeed(1)

πŸŽ€ git-annex-importfeed(1) πŸŽ€

okay so this is the git-annex-importfeed page from the git-annex manual β€” yes, the whole manpage, and yes, I'm gonna walk you through it like we're on facetime at 2am πŸ’…


✨ NAME ✨

git-annex-importfeed β€” import files from podcast feeds 🎧


✨ SYNOPSIS ✨

git annex importfeed [url ...]

✨ DESCRIPTION ✨

So basically this command imports the contents of podcasts and other rss and atom feeds. Only downloads files whose content has not already been added to the repository before β€” which is the iconic part, because it means you can delete, rename, etc. the resulting files and repeated runs won't duplicate them. no cap, it just knows. πŸ‘‘

When yt-dlp is installed, it can be used to download links in the feed. This lets you import e.g. YouTube playlists. (But heads up bestie β€” this is disabled by default because it can be a security risk. See the documentation of annex.security.allowed-ip-addresses in git-annex(1) for the details.) 🫢

Wanna make the import process add metadata to the imported files from the feed? Run:

git config annex.genmetadata true

slay. ⭐

By default, the downloaded files are put in a directory with the title of the feed, and files are named based on the title of the item in the feed. You can change all that with the --template option. πŸ¦‹

Existing files are not overwritten by this command. If some feed/foo.mp3 already exists, it will instead write to some feed/2_foo.mp3 (or 3, 4, etc). Sometimes a feed will change an item's url, resulting in the new url being downloaded to such a filename. it's giving "the universe finds a way" 😭


✨ OPTIONS ✨

  • --force β€” Force downloading items it's seen before. (yes, even the ones it already clocked πŸ‘€)
  • --fast, --relaxed, --verifiable, --raw, --raw-except β€” these behave the same as when using git-annex-addurl(1). same vibes, different command.
  • --scrape β€” instead of downloading the url and parsing it as a rss/atom feed to find files to import, this uses yt-dlp to screen scrape the equivilant of a feed, and imports what it found. lowkey unhinged, highkey useful πŸ”₯
  • --template β€” controls where the files are stored. πŸ’–

The default template is '${feedtitle}/${itemtitle}${extension}'

The available variables in the template include these that are information about the feed: feedtitle, feedauthor, feedurl

And these that are information about individual items in the feed: itemtitle, itemauthor, itemsummary, itemdescription, itemrights, itemid

Also, title is itemtitle but falls back to feedtitle if the item has no title, and author is itemauthor but falls back to feedauthor.

(All of the above are also added as metadata when annex.genmetadata is set.)

The extension variable is the extension of the file in the feed, or sometimes ".m" if no extension can be determined. πŸ“

The template also has some variables for when an item was published. (These may not be available when using --scrape, depending on the website.)

  • itempubyear (YYYY)
  • itempubmonth (MM)
  • itempubday (DD)
  • itempubhour (HH)
  • itempubminute (MM)
  • itempubsecond (SS)
  • itempubdate (YYYY-MM-DD or if the feed's date cannot be parsed, the raw value from the feed)

(These use the UTC time zone, not the local time zone. ⏰)

  • --no-check-gitignore β€” by default, gitignores are honored and it will refuse to download an url to a file that would be ignored. This makes such files be added despite any ignores. living dangerously, love that for you πŸ™ˆ
  • --jobs=N -JN β€” runs multiple downloads parallel. For example: -J4

Setting this to "cpus" will run one job per CPU core. ⚑

  • --backend β€” specifies which key-value backend to use.
  • --json β€” enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. πŸ€–
  • --json-progress β€” include progress objects in JSON output.
  • --json-error-messages β€” messages that would normally be output to standard error are included in the JSON instead.

Also the git-annex-common-options(1) can be used. (yes, all of them, go off πŸ‘‘)


✨ SEE ALSO ✨


✨ AUTHOR ✨

Joey Hess <id@joeyh.name> β€” an absolute icon, we stan 🌈


and that's the whole page bestie!! πŸŽ€ this was git-annex-importfeed(1) from the General Commands Manual, mwah, go import some podcasts πŸ’‹βœ¨

πŸ“¦ where this page comes from