DESCRIPTION.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Usage
  2. =====
  3. python -m wget [options] <URL>
  4. options:
  5. -o --output FILE|DIR output filename or directory
  6. API Usage
  7. =========
  8. >>> import wget
  9. >>> url = 'http://www.futurecrew.com/skaven/song_files/mp3/razorback.mp3'
  10. >>> filename = wget.download(url)
  11. 100% [................................................] 3841532 / 3841532>
  12. >> filename
  13. 'razorback.mp3'
  14. The skew that you see above is a documented side effect.
  15. Alternative progress bar:
  16. >>> wget.download(url, bar=bar_thermometer)
  17. ChangeLog
  18. =========
  19. 3.2 (2015-10-22)
  20. * download(url) can again be unicode on Python 2.7
  21. https://bitbucket.org/techtonik/python-wget/issues/8
  22. 3.1 (2015-10-18)
  23. * it saves unknown files under download.wget filename
  24. https://bitbucket.org/techtonik/python-wget/issues/6
  25. * it prints unicode chars to Windows console
  26. * it downloads unicode urls with Python 3
  27. 3.0 (2015-10-17)
  28. * it can download and save unicode filenames
  29. https://bitbucket.org/techtonik/python-wget/issues/7
  30. 2.2 (2014-07-19)
  31. * it again can download without -o option
  32. 2.1 (2014-07-10)
  33. * it shows command line help
  34. * -o option allows to select output file/directory
  35. * download(url, out, bar) contains out parameter
  36. 2.0 (2013-04-26)
  37. * it shows percentage
  38. * it has usage examples
  39. * it changes if being used as a library
  40. * download shows progress bar by default
  41. * bar_adaptive gets improved algorithm
  42. * download(url, bar) contains bar parameter
  43. * bar(current, total)
  44. * progress_callback is named callback_progress
  45. 1.0 (2012-11-13)
  46. * it runs with Python 3
  47. 0.9 (2012-11-13)
  48. * it renames file if it already exists
  49. * it can be used as a library
  50. * download(url) returns filename
  51. * bar_adaptive() draws progress bar
  52. * bar_thermometer() simplified bar
  53. 0.8 (2011-05-03)
  54. * it detects filename from HTTP headers
  55. 0.7 (2011-03-01)
  56. * compatibility fix for Python 2.5
  57. * limit width of progress bar to 100 chars
  58. 0.6 (2010-04-24)
  59. * it detects console width on POSIX
  60. 0.5 (2010-04-23)
  61. * it detects console width on Windows
  62. 0.4 (2010-04-15)
  63. * it shows cute progress bar
  64. 0.3 (2010-04-05)
  65. * it creates temp file in current dir
  66. 0.2 (2010-02-16)
  67. * it tries to detect filename from URL
  68. 0.1 (2010-02-04)
  69. * it can download file
  70. Release Checklist
  71. =================
  72. | [ ] update version in wget.py
  73. | [x] update description in setup.py
  74. | [ ] python setup.py check -mrs
  75. | [ ] python setup.py sdist upload
  76. | [ ] tag hg version
  77. --
  78. anatoly techtonik <techtonik@gmail.com>