You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
6.0 KiB

4 years ago
  1. .\" Automatically generated by Pandoc 1.19.2.1
  2. .\"
  3. .TH "TQDM" "1" "2015\-2018" "tqdm User Manuals" ""
  4. .hy
  5. .SH NAME
  6. .PP
  7. tqdm \- fast, extensible progress bar for Python and CLI
  8. .SH SYNOPSIS
  9. .PP
  10. tqdm [\f[I]options\f[]]
  11. .SH DESCRIPTION
  12. .PP
  13. See <https://github.com/tqdm/tqdm>.
  14. Can be used as a pipe:
  15. .IP
  16. .nf
  17. \f[C]
  18. $\ #\ count\ lines\ of\ code
  19. $\ cat\ *.py\ |\ tqdm\ |\ wc\ \-l
  20. 327it\ [00:00,\ 981773.38it/s]
  21. 327
  22. $\ #\ find\ all\ files
  23. $\ find\ .\ \-name\ "*.py"\ |\ tqdm\ |\ wc\ \-l
  24. 432it\ [00:00,\ 833842.30it/s]
  25. 432
  26. #\ ...\ and\ more\ info
  27. $\ find\ .\ \-name\ \[aq]*.py\[aq]\ \-exec\ wc\ \-l\ \\{}\ \\;\ \\
  28. \ \ |\ tqdm\ \-\-total\ 432\ \-\-unit\ files\ \-\-desc\ counting\ \\
  29. \ \ |\ awk\ \[aq]{\ sum\ +=\ $1\ };\ END\ {\ print\ sum\ }\[aq]
  30. counting:\ 100%|█████████|\ 432/432\ [00:00<00:00,\ 794361.83files/s]
  31. 131998
  32. \f[]
  33. .fi
  34. .SH OPTIONS
  35. .TP
  36. .B \-h, \-\-help
  37. Print this help and exit
  38. .RS
  39. .RE
  40. .TP
  41. .B \-v, \-\-version
  42. Print version and exit
  43. .RS
  44. .RE
  45. .TP
  46. .B \-\-desc=\f[I]desc\f[]
  47. str, optional.
  48. Prefix for the progressbar.
  49. .RS
  50. .RE
  51. .TP
  52. .B \-\-total=\f[I]total\f[]
  53. int, optional.
  54. The number of expected iterations.
  55. If unspecified, len(iterable) is used if possible.
  56. As a last resort, only basic progress statistics are displayed (no ETA,
  57. no progressbar).
  58. If \f[C]gui\f[] is True and this parameter needs subsequent updating,
  59. specify an initial arbitrary large positive integer, e.g.
  60. int(9e9).
  61. .RS
  62. .RE
  63. .TP
  64. .B \-\-leave=\f[I]leave\f[]
  65. bool, optional.
  66. If [default: True], keeps all traces of the progressbar upon termination
  67. of iteration.
  68. .RS
  69. .RE
  70. .TP
  71. .B \-\-ncols=\f[I]ncols\f[]
  72. int, optional.
  73. The width of the entire output message.
  74. If specified, dynamically resizes the progressbar to stay within this
  75. bound.
  76. If unspecified, attempts to use environment width.
  77. The fallback is a meter width of 10 and no limit for the counter and
  78. statistics.
  79. If 0, will not print any meter (only stats).
  80. .RS
  81. .RE
  82. .TP
  83. .B \-\-mininterval=\f[I]mininterval\f[]
  84. float, optional.
  85. Minimum progress display update interval [default: 0.1] seconds.
  86. .RS
  87. .RE
  88. .TP
  89. .B \-\-maxinterval=\f[I]maxinterval\f[]
  90. float, optional.
  91. Maximum progress display update interval [default: 10] seconds.
  92. Automatically adjusts \f[C]miniters\f[] to correspond to
  93. \f[C]mininterval\f[] after long display update lag.
  94. Only works if \f[C]dynamic_miniters\f[] or monitor thread is enabled.
  95. .RS
  96. .RE
  97. .TP
  98. .B \-\-miniters=\f[I]miniters\f[]
  99. int, optional.
  100. Minimum progress display update interval, in iterations.
  101. If 0 and \f[C]dynamic_miniters\f[], will automatically adjust to equal
  102. \f[C]mininterval\f[] (more CPU efficient, good for tight loops).
  103. If > 0, will skip display of specified number of iterations.
  104. Tweak this and \f[C]mininterval\f[] to get very efficient loops.
  105. If your progress is erratic with both fast and slow iterations (network,
  106. skipping items, etc) you should set miniters=1.
  107. .RS
  108. .RE
  109. .TP
  110. .B \-\-ascii=\f[I]ascii\f[]
  111. bool, optional.
  112. If unspecified or False, use unicode (smooth blocks) to fill the meter.
  113. The fallback is to use ASCII characters \f[C]1\-9\ #\f[].
  114. .RS
  115. .RE
  116. .TP
  117. .B \-\-disable=\f[I]disable\f[]
  118. bool, optional.
  119. Whether to disable the entire progressbar wrapper [default: False].
  120. If set to None, disable on non\-TTY.
  121. .RS
  122. .RE
  123. .TP
  124. .B \-\-unit=\f[I]unit\f[]
  125. str, optional.
  126. String that will be used to define the unit of each iteration [default:
  127. it].
  128. .RS
  129. .RE
  130. .TP
  131. .B \-\-unit_scale=\f[I]unit_scale\f[]
  132. bool or int or float, optional.
  133. If 1 or True, the number of iterations will be reduced/scaled
  134. automatically and a metric prefix following the International System of
  135. Units standard will be added (kilo, mega, etc.) [default: False].
  136. If any other non\-zero number, will scale \f[C]total\f[] and \f[C]n\f[].
  137. .RS
  138. .RE
  139. .TP
  140. .B \-\-dynamic_ncols=\f[I]dynamic_ncols\f[]
  141. bool, optional.
  142. If set, constantly alters \f[C]ncols\f[] to the environment (allowing
  143. for window resizes) [default: False].
  144. .RS
  145. .RE
  146. .TP
  147. .B \-\-smoothing=\f[I]smoothing\f[]
  148. float, optional.
  149. Exponential moving average smoothing factor for speed estimates (ignored
  150. in GUI mode).
  151. Ranges from 0 (average speed) to 1 (current/instantaneous speed)
  152. [default: 0.3].
  153. .RS
  154. .RE
  155. .TP
  156. .B \-\-bar_format=\f[I]bar_format\f[]
  157. str, optional.
  158. Specify a custom bar string formatting.
  159. May impact performance.
  160. [default: \[aq]{l_bar}{bar}{r_bar}\[aq]], where l_bar=\[aq]{desc}:
  161. {percentage:3.0f}%|\[aq] and r_bar=\[aq]| {n_fmt}/{total_fmt}
  162. [{elapsed}<{remaining}, \[aq] \[aq]{rate_fmt}{postfix}]\[aq] Possible
  163. vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, rate,
  164. rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, elapsed,
  165. remaining, desc, postfix.
  166. Note that a trailing ": " is automatically removed after {desc} if the
  167. latter is empty.
  168. .RS
  169. .RE
  170. .TP
  171. .B \-\-initial=\f[I]initial\f[]
  172. int, optional.
  173. The initial counter value.
  174. Useful when restarting a progress bar [default: 0].
  175. .RS
  176. .RE
  177. .TP
  178. .B \-\-position=\f[I]position\f[]
  179. int, optional.
  180. Specify the line offset to print this bar (starting from 0) Automatic if
  181. unspecified.
  182. Useful to manage multiple bars at once (eg, from threads).
  183. .RS
  184. .RE
  185. .TP
  186. .B \-\-postfix=\f[I]postfix\f[]
  187. dict or *, optional.
  188. Specify additional stats to display at the end of the bar.
  189. Calls \f[C]set_postfix(**postfix)\f[] if possible (dict).
  190. .RS
  191. .RE
  192. .TP
  193. .B \-\-unit_divisor=\f[I]unit_divisor\f[]
  194. float, optional.
  195. [default: 1000], ignored unless \f[C]unit_scale\f[] is True.
  196. .RS
  197. .RE
  198. .TP
  199. .B \-\-delim=\f[I]delim\f[]
  200. chr, optional.
  201. Delimiting character [default: \[aq]\[aq]].
  202. Use \[aq]\[aq] for null.
  203. N.B.: on Windows systems, Python converts \[aq]\[aq] to \[aq]\[aq].
  204. .RS
  205. .RE
  206. .TP
  207. .B \-\-buf_size=\f[I]buf_size\f[]
  208. int, optional.
  209. String buffer size in bytes [default: 256] used when \f[C]delim\f[] is
  210. specified.
  211. .RS
  212. .RE
  213. .TP
  214. .B \-\-bytes=\f[I]bytes\f[]
  215. bool, optional.
  216. If true, will count bytes, ignore \f[C]delim\f[], and default
  217. \f[C]unit_scale\f[] to True, \f[C]unit_divisor\f[] to 1024, and
  218. \f[C]unit\f[] to \[aq]B\[aq].
  219. .RS
  220. .RE
  221. .TP
  222. .B \-\-manpath=\f[I]manpath\f[]
  223. str, optional.
  224. Directory in which to install tqdm man pages.
  225. .RS
  226. .RE
  227. .TP
  228. .B \-\-log=\f[I]log\f[]
  229. str, optional.
  230. CRITICAL|FATAL|ERROR|WARN(ING)|[default: \[aq]INFO\[aq]]|DEBUG|NOTSET.
  231. .RS
  232. .RE
  233. .SH AUTHORS
  234. tqdm developers <https://github.com/tqdm>.