Debian Codegraph @

DOC/podget.7

raw
1 .\" Hand Tweaked Man Page.
2 .TH podget 7 "13 March 2025" "" ""
3
4 .SH NAME
5 .B Podget
6 - Simple tool to automate downloading of podcasts.
7
8 .SH SYNOPSIS
9
10 .B podget
11 .RB <options>
12
13 .SH DESCRIPTION
14
15 Podget is a simple podcast aggregator/downloader optimized for scheduled background jobs (i.e. cron).
16
17 It features support for:
18 .PD 0
19 .P
20 - Downloading podcasts from RSS and ATOM XML feeds.
21 .P
22 - For sorting the files into folders and categories.
23 .P
24 - For importing URLs from iTunes PCAST files and OPML lists.
25 .P
26 - Automatic M3U & ASX playlist creation.
27 .P
28 - Cleanup of old files.
29 .P
30 - Automatic UTF-16 conversion for feeds hosted on MS Windows Servers.
31 .PD
32
33 Podget works by extracting the <enclosure> tags from the feed then downloading
34 the specified URL. There is one exception when Podget will ignore <enclosure>
35 tags and that is when they are within <podcast:liveItem> tags because Podget is
36 an aggregator and not a player so has not been optimized for live content.
37
38 .SH OPTIONS
39 .TP
40 .B -c <FILE> \fR| \fB--config <FILE>
41 Name of configuration file.
42
43 .TP
44 .B --create-config <FILE>
45 Create configuration file and exit.
46 .TP
47
48 .B -C \fR|\fB --cleanup
49 Skip downloading and only run cleanup loop.
50
51 .TP
52 .B --cleanup_days <NUMBER>
53 Cleanup files older than <NUMBER> days.
54
55 .TP
56 .B --cleanup_simulate
57 Simulate cleanup loop to see what files would be deleted.
58
59 .TP
60 .B -d <DIRECTORY> \fR|\fB --dir_config <DIRECTORY>
61 Directory that configuration files are stored in.
62
63 .TP
64 .B --dir_session <DIRECTORY>
65 Directory that session files are stored in.
66
67 .TP
68 .B -f \fR|\fB --force
69 Force download of items from each feed even if they've already been downloaded.
70
71 .TP
72 .B -h \fR|\fB --help
73 Display condensed help dialog.
74
75 .TP
76 .B -l <DIRECTORY> \fR|\fB --library <DIRECTORY>
77 Directory to store downloaded files in.
78
79 .TP
80 .B -n \fR|\fB --no-playlist
81 Do not create M3U playlist of new items.
82
83 .TP
84 .B -p \fR|\fB --playlist-asx
85 In addition to M3U playlists, create ASX playlists.
86
87 .TP
88 .B --playlist-per-podcast
89 Create a playlist of new items for each podcast feed.
90
91 .TP
92 .B -r <COUNT> \fR|\fB --recent <COUNT>
93 Download only the <COUNT> newest items from each feed.
94
95 .TP
96 .B --serverlist <FILE>
97 Use <FILE> as serverlist instead of default.
98
99 .TP
100 .B -s \fR|\fB --silent
101 Run silently (for cron jobs).
102
103 .TP
104 .B -v
105 Set verbosity to level 1.
106
107 .TP
108 .B -vv
109 Set verbosity to level 2.
110
111 .TP
112 .B -vvv
113 Set verbosity to level 3.
114
115 .TP
116 .B -vvvv
117 Set verbosity to level 4.
118
119 .TP
120 .B --verbosity <LEVEL>
121 Set verbosity level (0-4).
122
123 .TP
124 .B -V \fR|\fB --version
125 Display version.
126
127 .TP
128 .B OPML List Options:
129
130 .RS
131
132 .TP
133 .B --import_opml <FILE or URL>
134 Import servers from OPML file or HTTP/FTP URL.
135
136 .TP
137 .B --export_opml <FILE>
138 Export serverlist to OPML file.
139
140 .RE
141
142 .TP
143 .B PCAST List Options:
144
145 .RS
146
147 .TP
148 .B --import_pcast <FILE or URL>
149 Import server from iTunes PCAST file or HTTP/FTP URL.
150
151 .RE
152
153 .SH CONFIGURATION FILES
154
155 By default, Podget relies on two configuration files.
156
157 .RE
158
159 .TP
160 .I podgetrc
161 This is a file with most options for how Podget should run.
162
163 If it is required to run podget with different options for certain feeds, then additional configuration files can be created and used with the --config or -c option. When this option is run with a new filename that does not exist yet, the file is created with default options that can then be customized as necessary.
164
165 .TP
166 .I serverlist
167 This is a file of all the feeds that Podget should monitor and download from.
168
169 If you need to separate your feeds into multiple lists, then additional files can be created with the --serverlist option. When this option is
170 run with a new filename that does not exist yet, the file is created with a default list of a single feed. Whenever a new list is created, Podget will download a single item from the single feed included by default to verify that everything is working.
171
172 For a description of the options available for this file, please refer to the SERVER LIST CONFIGURATION section of this document.
173
174 .RS
175
176 .SS USER CONFIGURATION DIRECTORY
177
178 The first time a user runs podget, it will create a configuration directory. In this directory, it will install the default configuration files.
179
180 Where this configuration directory is automatically placed is dependent upon the version of Podget that you used when you first ran it.
181
182 For version 0.8.10 and before:
183 .RS
184 $HOME/.podget
185 .RE
186
187 For later versions:
188 .RS
189 If $XDG_CONFIG_HOME is set then it will be placed in: $XDG_CONFIG_HOME/podget
190 .RE
191 .RS
192 IF unset, then it will be placed in: $HOME/.config/podget
193 .RE
194
195 If a user wants to clean up their $HOME directory by moving their existing configuration directory to either of the new locations, it can be done but it is necessary to remember to remove the leading period so it is no longer a hidden directory.
196 .RS
197 Example: mv $HOME/.podget $HOME/.config/podget
198 .RE
199
200 These locations can be overridden by the use of the --dir_config or -d option when you run podget.
201
202 .SS WHICH CONFIGURATION DIRECTORY IS USED
203
204 Since there are at least three possible locations for the configuration directory then it is necessary to know which one podget will use. To keep things simple, Podget uses the first one it finds and tests in the following order:
205 .PP
206 .nf
207 .fam C
208 1. $HOME/.podget
209 2. $XDG_CONFIG_HOME/podget
210 3. $HOME/.config/podget
211 .fam T
212 .fi
213
214 This location testing is skipped by the use of the --dir_config or -d option.
215
216 .SS AUTOMATIC CLEANUP
217
218 You can enable automatic cleanup with every run by configuring it in your podgetrc file. Simply set the following options:
219 .PP
220 .nf
221 .fam C
222 # Autocleanup.
223 # 0 == disabled
224 # 1 == delete any old content
225 cleanup=1
226
227 # Number of days to keep files. Cleanup will remove anything
228 # older than this.
229 cleanup_days=7
230
231 .fam T
232 .fi
233 However, some people prefer to run cleanup as a separate cron session. To do that, set the options in podgetrc to:
234 .PP
235 .nf
236 .fam C
237 # Autocleanup.
238 # 0 == disabled
239 # 1 == delete any old content
240 cleanup=0
241
242 # Number of days to keep files. Cleanup will remove anything
243 # older than this.
244 cleanup_days=7
245 .fam T
246 .fi
247
248 Then add something similar to this example to your crontab:
249 .PP
250 .nf
251 .fam C
252 # Once a week on Sunday at 04:07AM
253 07 04 * * Sun /usr/bin/podget \-C
254
255 .fam T
256 .fi
257
258 .SS MULTIPLE CONCURRENT SESSIONS
259
260 Podget checks for sessions using the same core configuration file that may already be running when it starts and exits if any are found. This insures that any long running sessions are not interrupted by new ones.
261
262 If you have feeds that require distinct configurations, then you can enable them to run simultaneously by using separate configuration files for each. Then if you have sufficient bandwidth, you can call them all at the same time.
263
264 Example Crontab configuration:
265 .PP
266 .nf
267 .fam C
268 00 02 * * * /usr/bin/podget -c podgetrc-group1
269 00 02 * * * /usr/bin/podget -c podgetrc-group2
270 .fam T
271 .fi
272
273 .SS SEQUENTIAL SESSIONS
274
275 Sometimes, you have feed lists that use the same configuration but you wish to keep separate. There are two ways to handle this.
276
277 First, run then separately from crontab with sufficient time in between so they don't interfere with each other.
278 .PP
279 .nf
280 .fam C
281 00 02 * * * /usr/bin/podget --serverlist RSS-Feeds
282 00 03 * * * /usr/bin/podget --serverlist ATOM-Feeds
283 .fam T
284 .fi
285
286 The second option is to place them into a shell script so they are called sequentially and do not interfere with each other and then add it to your crontab.
287 .PP
288 .nf
289 .fam C
290 #!/usr/bin/env bash
291 /usr/bin/podget --serverlist RSS-Feeds
292 /usr/bin/podget --serverlist ATOM-Feeds
293 .fam T
294 .fi
295
296 .SS ENABLING DEBUG OUTPUT
297
298 Debug output can be enabled in two ways.
299 .PP
300 The first way is by uncommenting the DEBUG option in your podgetrc and setting it to '1'. However this way will not enable DEBUG until just over 1400 lines of script have run and when podgetrc finally is read. This is sufficient for most issues.
301 .PP
302 The second way is from the command-line and enables debug as early as possible.
303 .PP
304 Simply execute podget like so:
305 .PP
306 .nf
307 .fam C
308 $ DEBUG=1 podget -vvvv
309 .fam T
310 .fi
311
312 .PP
313 You can enable other options as well if you need to but for debugging purposes,
314 it is highly recommended that you enabled as much verbosity as possible.
315
316 .SS SERVER LIST CONFIGURATION
317
318 By default, Podget uses serverlist for the default list of servers to contact. However you can configure the name with the config_serverlist variable in your podgetrc file.
319
320 Feeds are listed one per line in the serverlist file.
321
322
323 .PD 0
324
325 Default format with category and name:
326 .RS
327 <url> <category> <name>
328 .RE
329
330 Alternate Formats:
331 .P
332 1. With a category but no name.
333 .RS
334 <url> <category>
335 .RE
336 2. With a name but no category (2 ways).
337 .RS
338 .P
339 <url> No_Category <name>
340 .P
341 <url> . <name>
342 .RE
343 3. With neither a category or name.
344 .RS
345 <url>
346 .RE
347
348 1. URL Rules:
349 .RS
350 A. Any spaces in the URL need to be converted to %20
351 .RE
352 2. Category Rules:
353 .RS
354 A. Must be one word without spaces.
355 .P
356 B. You may use underscores and dashes.
357 .P
358 C. You can insert date substitutions.
359 .RS
360 %YY% == Year
361 .P
362 %MM% == Month
363 .P
364 %DD% == Day
365 .RE
366 .P
367 D. Category disabling:
368 .RS
369 .P
370 - With a name, the category must either be a single period (.) or 'No_Category'.
371 .P
372 - If the name is blank, the category can also be blank.
373 .RE
374 .RE
375 .P
376 3. Name Rules:
377 .RS
378 .P
379 A. If you are creating ASX playlists, make sure the feed name does not have any spaces in it and the filename cannot be blank.
380 .P
381 B. You can leave the feed name blank, and files will be saved in the category directory.
382 .P
383 C. Names with spaces are only compatible with filesystems that allow for spaces in filenames. For example, spaces in feed names are OK for feeds saved to Linux ext partitions but are not OK for those saved to Microsoft FAT partitions.
384 .P
385 D. Feed names can be disabled by leaving them blank.
386 .RE
387 .P
388 4. Disable the downloading of any feed by commenting it out with a leading #.
389
390 .PD
391
392 Example:
393 http://www.lugradio.org/episodes.rss Linux LUG Radio
394
395 Example with date substitution in the category and a blank feed name:
396 https://downloads.bbc.co.uk/rmhttp/downloadtrial/worldservice/summary/rss.xml News-%YY%-%MM%-%DD%
397
398 Example of two ways to do a feed with authentication:
399 http://somesite.com/feed.rss CATEGORY Feed Name USER:username PASS:password
400 http://username:[email protected]/feed.rss CATEGORY Feed Name
401
402 .RS
403
404 NOTE: The second method will fail if a colon (:) is part of the username or password. Both methods will fail if a space is part of the username or password.
405
406 .RE
407
408 .TP
409 .B Common Options:
410
411 .TP
412 .I OPT_CONTENT_DISPOSITION
413 Attempt to get filename from the Content-Disposition tag that is part of wget --server-response.
414
415 .TP
416 .I OPT_DISPOSITION_FAIL
417 This option works in conjunction with OPT_CONTENT_DISPOSITION by removing any URLs that fail to receive a filename from the COMPLETED log. This allows them to be automatically retried the next time a session runs. If this option is added to a feed that has already been downloaded then the user will need to remove the URLs for the problematic files from the COMPLETED log manually. On one feed this allowed for the improvement of the number of filename problems from approximately 15% to under 2% over the course of 6 sessions. Those sessions can occur sequentially on one day or as part of your established cron rotation.
418
419 .TP
420 .I OPT_FEED_ORDER_ASCENDING
421 By default, Podget assumes that items in a feed will be listed from newest to oldest (descending order). This option will modify Podget's handling of the feed for those that are listed from oldest to newest. This option will not have any noticeable effect for feeds where you want to download every item. It will have an effect for new feeds when combined with the --recent [COUNT] option.
422
423 .TP
424 .I OPT_FEED_PLAYLIST_NEWFIRST
425 Most playlist options create lists of just the new items that are downloaded in the current session. This option creates or updates a full playlist for all items available for a feed sorted from newest to oldest based on the modification date/time of the file.
426
427 .TP
428 .I OPT_FEED_PLAYLIST_OLDFIRST
429 Same as OPT_FEED_PLAYLIST_NEWFIRST except playlist is ordered from oldest to newest.
430
431 .TP
432 .I OPT_FILENAME_LOCATION
433 Some feeds do not have the detailed filename listed in the FEED but rather rename the file on redirection. This option addresses that issue by attempting to grab the filename from the last 'Location:' tag in the output of 'wget --server-response'.
434
435 .TP
436 .I OPT_FILENAME_RENAME_MDATE
437 For feeds that use a singular filename for each item that is identified by a long somewhat incomprehensible string in the URL. These feeds were previously fixed with FILENAME_FORMATFIX4 which would append the string to the common filename to produce unique filenames for each item. However this produced filenames that were not very easy to understand. This option gives us another method for dealing with these common filenames. This appends the date of the files last change (modification date) as a prefix to the filename in the format of YYYYMMDD_HHhMMm_<common-part>. This makes the filenames sortable and gives the user something that makes a moderate amount of sense. Does not work for all feeds, for some feeds the last modification time for each file is the time of download. Which may be acceptable in some situations but can cause confusion when downloading more than one item at a time from a feed.
438
439 .TP
440 .I OPT_WGET_DEFUSERAGENT
441 Configure Wget to use it's default user-agent (normally formatted similar to "Wget/1.21.2") and to not use either Podget's default user-agent ("Podget") or a custom agent set in WGET_BASEOPTS in podgetrc.
442
443 .TP
444 .I OPT_NO_CERT_CHECK
445 Disable wget SSL certificate verification. This is common used for feeds that are using self-signed certificates.
446
447 .TP
448 .I OPT_PREFER_IPv4 \fRor\fI OPT_PREFER_IPv6
449 Configure wget so that when a DNS lookup gives a choice of several addresses that it should connect to the specified family first.
450
451 .P
452 Examples:
453 http://somesite.com/feed.rss CATEGORY Feed Name OPT_PREFER_IPv4
454 http://somesite.com/feed.rss CATEGORY Feed Name OPT_PREFER_IPv6
455 http://somesite.com/feed.rss CATEGORY Feed Name OPT_WGET_DEFUSERAGENT
456 http://somesite.com/feed.rss CATEGORY Feed Name OPT_NO_CERT_CHECK
457 http://somesite.com/feed.rss CATEGORY Feed Name OPT_CONTENT_DISPOSITION
458 http://somesite.com/feed.rss CATEGORY Feed Name OPT_CONTENT_DISPOSITION OPT_DISPOSITION_FAIL
459 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_LOCATION
460 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_RENAME_MDATE
461 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_LOCATION OPT_FILENAME_RENAME_MDATE
462 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FEED_ORDER_ASCENDING
463 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FEED_PLAYLIST_NEWFIRST
464 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FEED_PLAYLIST_OLDFIRST
465
466 .TP
467 .B RSS Feed Options:
468 There are three options for RSS Feeds that are not supported for ATOM feeds.
469
470 The first two are related with the renaming the downloaded files with the contents of the <TITLE> tag from the HTML and the third is to expand what tags Podget gets content from.
471
472 .TP
473 .I OPT_FILENAME_RENAME_TITLETAG
474 This first version is for handling feeds that place the <TITLE> tag before the <ENCLOSURE> tag. The majority of tested feeds that use <TITLE> tags follow this order.
475
476 .TP
477 .I OPT_FILENAME_RENAME_REVTITLETAG
478 The second version is for handling feeds that have the <ENCLOSURE> tag first followed by the <TITLE> tag.
479
480 .TP
481 .I OPT_RSS_MEDIACONTENT
482 This third option will enable Podget to download content from <MEDIA:CONTENT> tags in addition to <ENCLOSURE> tags.
483
484 .P
485 Examples:
486 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_RENAME_TITLETAG
487 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_RENAME_TITLETAG OPT_FILENAME_RENAME_MDATE
488 http://somesite.com/feed.rss CATEGORY Feed Name OPT_FILENAME_RENAME_REVTITLETAG
489 http://somesite.com/feed.rss CATEGORY Feed Name OPT_RSS_MEDIACONTENT
490
491
492 To determine if the feed uses <TITLE> tags and in which order, run the following with the URL for the feed:
493 .PP
494 .nf
495 .fam C
496 wget -O - http://somesite.com/feed.rss | sed -n -e :a -e 's/.*<enclosure.*url\\s*=\\s*"\\([^"]\+\\)".*/URL \1/Ip' -e t -e "s/.*<enclosure.*url\\s*'=\\s*\\([^i]\\+\\)'.*/URL \\1/Ip" -e t -e 's/.*<title>\\(.*\\)<[/]title>.*$/TITLE \1/Ip' -e t -e '/\\(<enclosure\\|<title>\\).*/I{N;s/\ *\n/\ /;T;ba}'
497
498 .fam T
499 .fi
500 This will produce a list of lines that start with either TITLE or URL. The URL is from the <ENCLOSURE> tag and the TITLE is obviously from the <TITLE> tag. On many feeds the first thing you will notice is a few uses of the <TITLE> tag before the first URL is specified. In that case, Podget uses the last TITLE found, so the earlier ones are discard. The important part is when we get to the first URL, from there we need to determine if the title for that item came before or after the URL. If it comes first then we use OPT_FILENAME_RENAME_TITLETAG for it. If the title comes second then we use OPT_FILENAME_RENAME_REVTITLETAG.
501
502 On some feeds, the downloaded filename will not have anything identifiable to determine which TITLE goes with it. In those cases it may be necessary to download a few items and listen to them to determine which order they use.
503
504 On some feeds, it will be discovered that the downloaded filename and the TITLE are very similar. In those cases, it is left to the user to determine which they prefer.
505
506 On some feeds, the TITLE will have very little to specify when it was recorded and it may be useful to use the OPT_FILENAME_RENAME_MDATE option to add a date tag to each filename as it is converted.
507
508 And on some feeds, there will be a complete absence of TITLE lines. Those feeds do not use the tag so using either option will not produce any changes.
509
510 .TP
511 .B Atom Feed Options:
512 The following options are available for advanced handling of Atom feeds.
513
514 .TP
515 .I ATOM_FILTER_SIMPLE
516 This option will enable filtering for just audio or video files from a feed.
517
518 .TP
519 .I ATOM_FILTER_TYPE="type"
520 This option allows more detailed filtering of the variety of types available. This can limit the files downloaded to one type (example: "audio/mpeg") or to a few types (example: "(audio|video)/.*" for all audio and video types, OR "audio/.*" for all audio types).
521
522 .TP
523 .I ATOM_FILTER_LANG="language"
524 If an Atom feed supports multiple languages for enclosures, then you can use this option to filter to only those you desire. You can limit to one language (example: "en" for just English) or combine several supported languages to get them all (example: "(en|es|fr)" to download files in English, Spanish and French. How the languages are defined may vary from feed to feed.
525
526 .P
527 Note: If you do not enable any of the ATOM_FILTER options on a feed with multiple enclosures per item, when you run podget it will tell you the count per type or language to help you decide if you should enable the filters to reduce the number of files to be downloaded.
528
529 .P
530 Examples:
531 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_SIMPLE
532 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_TYPE="audio/mpeg"
533 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_TYPE="(audio|video)/.*"
534 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_LANG="en"
535 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_LANG="(en|es|fr)"
536 http://somesite.com/feed CATEGORY Feed Name ATOM_FILTER_TYPE="audio/mpeg" ATOM_FILTER_LANG="en"
537
538 .SS HANDLING UTF-16 FEEDS
539 .PP
540 Some servers provide their feeds in UTF-16 format rather than the more common UTF-8.
541 .PP
542 To automatically convert these files, create a secondary serverlist in your configuration directory:
543 .PP
544 .nf
545 .fam C
546 serverlist.utf16
547
548 .fam T
549 .fi
550 Remember to change the name of the serverlist to match what you set it to with config_serverlist if you changed it.
551
552 .SH EXAMPLE CRON JOB
553
554 Once podget\ is running correctly, it's most useful if you run it from a cron job so that the new episodes are available to play or load onto a portable player and you don't have to wait for them to download.
555 .PP
556 To edit your crontab, do:
557 .PP
558 .nf
559 .fam C
560 $ crontab \-e
561 .fam T
562 .fi
563
564 Then add one line similar to this example:
565 .PP
566 .nf
567 .fam C
568 15 04 * * * /usr/bin/podget \-s
569 .fam T
570 .fi
571
572 This will run podget at 4:15 AM every day.
573
574 In some cases, you might need to add a few directories to your PATH variable so that Podget can find everything it needs.
575
576 Then the job might look like:
577 .PP
578 .nf
579 .fam C
580 15 04 * * * PATH=/opt/local/bin:/usr/local/bin:$PATH /usr/bin/podget \-s
581 .fam T
582 .fi
583
584 .SH INFORMATION AND DEBUG MESSAGES
585
586 Sometimes when you are running Podget, it is nice to get a bit more information about what is happening to pinpoint what is causing a problem. With that in mind, Podget makes it possible to display more of what is happening behind the scenes.
587
588 For informational messages:
589 .PP
590 .nf
591 .fam C
592 $ INFO= podget
593 .fam T
594 .fi
595
596 INFO can be set to any value or none. It just matters that the variable is set.
597
598 By default any informational message line will be prefixed with 'INFO --'.
599
600 Debug messages get deeper into what is happening and are available in 5 levels.
601
602 By default Debug messages are disabled and are the equivalent of running:
603 .PP
604 .nf
605 .fam C
606 $ DEBUG=0 podget
607 .fam T
608 .fi
609
610 Higher Debug levels can be enabled and include these options.
611
612 .PP
613 .nf
614 .fam C
615 $ DEBUG=1 podget
616 .fam T
617 .fi
618
619 Level 1 Debug includes:
620 .PD 0
621 .P
622 - Informational messages.
623 .P
624 - Debugging messages (by default prefixed with 'DEBUG --').
625 .PD
626
627 .PP
628 .nf
629 .fam C
630 $ DEBUG=2 podget
631 .fam T
632 .fi
633
634 Level 2 Debug includes:
635 .PD 0
636 .P
637 - Informational messages.
638 .P
639 - Debugging messages.
640 .P
641 - Enable Bash Shell option for xtrace. The shell will print the expanded version of each command and arguments as they are run.
642 .PD
643
644 .PP
645 .nf
646 .fam C
647 $ DEBUG=3 podget
648 .fam T
649 .fi
650
651 Level 3 Debug includes:
652 .PD 0
653 .P
654 - Informational messages.
655 .P
656 - Debugging messages.
657 .P
658 - Enable Bash Shell option for xtrace.
659 .P
660 - Enable Bash Shell option for verbose. This will cause the script to print each line as they are read without expanding anything.
661 .PD
662
663 .PP
664 .nf
665 .fam C
666 $ DEBUG=4 podget
667 .fam T
668 .fi
669
670 Level 4 Debug includes:
671 .PD 0
672 .P
673 - Informational messages.
674 .P
675 - Debugging messages.
676 .P
677 - Enable Bash Shell option for xtrace.
678 .P
679 - Enable Bash Shell option for functrace. When enabled any traps on DEBUG and RETURN are inherited by shell functions, command substitutions and subshells.
680 .P
681 - Enable Bash shell debug trap. Podget uses a very simple debug trap that causes each line as it is read to be printed with the line number it is on. This is effectively a slightly improved version of what the verbose option tells us.
682 .PD
683
684 .SS Special Handling for Debug messages.
685 .PP
686 The majority of the output from Podget is set to the STDOUT stream. However, when using Debug modes at level 2 or above, the additional messages are sent to the STDERR stream. For most uses, this is just fine. However if you wish to pipe the output to another command then it may be necessary to merge the two streams back together so they are displayed in the expected order.
687 .PP
688 For example to pipe the output of Podget to less, you could run:
689 .PP
690 .nf
691 .fam C
692 $ DEBUG=2 podget 2>&1 | less
693 .fam T
694 .fi
695
696 .SH AUTHORS
697 Dave Vehrs