From: Ruby Quiz Date: 2007-02-23T23:00:03+09:00 Subject: [QUIZ] Mailing List Files (#115) The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. 2. Support Ruby Quiz by submitting ideas as often as you can: http://www.rubyquiz.com/ 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The Ruby Talk mailing list archives will show files attached to incoming messages. However, it's not always easy to get at the data from these files using the archives alone. The attachments are sometimes displayed in not-too-readable formats: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/190780 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/226884 This is tough for those of us who like to play with Ruby Quiz solutions. This week's quiz is to write a program that takes a message id number as a command-line argument and "downloads" any attachments from that message. Assume message ids are for Ruby Talk posts by default, but you may want to provide an option to override that so we can support lists like Ruby Core as well. If no path is given, write the attachments to the working directory. When there is a path, your code should place the files there instead.