doc/ANNOUNCE in rio-0.4.0 vs doc/ANNOUNCE in rio-0.4.1
- old
+ new
@@ -1,40 +1,42 @@
-Rio 0.4.0
+Rio 0.4.1
= Rio - Ruby I/O Facilitator
+fa-cil-i-tate: To make easy or easier.
+
== Overview
-Rio is a facade for most of the standard ruby classes that deal with I/O;
-providing a simple, intuitive, succinct interface to the functionality
-provided by IO, File, Dir, Pathname, FileUtils, Tempfile, StringIO, OpenURI
-and others. Rio also provides an application level interface which allows many
-common I/O idioms to be expressed succinctly.
+Rio is a facade for most of the standard ruby classes that deal with
+I/O; providing a simple, intuitive, succinct interface to the
+functionality provided by IO, File, Dir, Pathname, FileUtils,
+Tempfile, StringIO, OpenURI and others. Rio also provides an
+application level interface which allows many common I/O idioms to be
+expressed succinctly.
== SYNOPSIS
-fa-cil-i-tate: To make easy or easier [http://www.thefreedictionary.com/facilitate]
-
For the following assume:
astring = ""
anarray = []
Iterate over the .rb files in a directory.
rio('adir').files('*.rb') { |entrio| ... }
Return an array of the .rb files in a directory.
- rio('adir').files['*.rb']
+ anarray = rio('adir').files['*.rb']
Copy the .rb files in a directory.to another directory.
rio('adir').files('*.rb') > rio('another_directory')
Iterate over the .rb files in a directory and its subdirectories.
rio('adir').all.files('*.rb') { |entrio| ... }
-Return an array of the .rb files in a directory and its subdirectories.
- rio('adir').all.files['*.rb']
+Return an array of the .rb files in a directory and its
+subdirectories.
+ anarray = rio('adir').all.files['*.rb']
Copy or append a file to a string
rio('afile') > astring # copy
rio('afile') >> astring # append
@@ -77,12 +79,12 @@
rio('adir').lines[0..3] # a range of lines
rio('adir').lines[/re/] # by regular expression
rio('adir').lines[0..3,/re/] # or both
Iterate over selected chomped lines of a file
- rio('adir').chomp.lines(0..3) { |aline| ... } # a range of lines
- rio('adir').chomp.lines(/re/) { |aline| ... } # by regular expression
+ rio('adir').chomp.lines(0..3) { |aline| ... } # a range of lines
+ rio('adir').chomp.lines(/re/) { |aline| ... } # by regular expression
Return selected chomped lines of a file as an array
rio('adir').chomp[0..3] # a range of lines
rio('adir').chomp[/re/] # by regular expression
@@ -102,23 +104,26 @@
anarray = rio('afile.gz').chomp.gzip[0...10]
Copy lines 0 and 3 thru 5 of a gzipped file on an ftp server to stdout
rio('ftp://host/afile.gz').gzip.lines(0,3..5) > ?-
-Return an array of files in a directory and its subdirectories, without descending into .svn directories.
+Return an array of files in a directory and its subdirectories,
+without descending into .svn directories.
rio('adir').norecurse(/^\.svn$/).files[]
Iterate over the non-empty, non-comment chomped lines of a file
rio('afile').chomp.skip(:empty?,/^\s*#/) { |line| ... }
-Copy the output of th ps command into an array, skipping the header line and the ps command entry
+Copy the output of th ps command into an array, skipping the header
+line and the ps command entry
rio(?-,'ps -a').skiplines(0,/ps$/) > anarray
Prompt for input and return what was typed
ans = rio(?-).print("Type Something: ").chomp.gets
-Change the extension of all .htm files in a directory and its subdirectories to .html
+Change the extension of all .htm files in a directory and its
+subdirectories to .html
rio('adir').rename.all.files('*.htm') do |htmfile|
htmfile.extname = '.html'
end
Copy a CSV file, changing the separator to a semicolon
@@ -138,9 +143,10 @@
Project:: http://rubyforge.org/projects/rio/
Documentation:: http://rio.rubyforge.org/
Bugs:: http://rubyforge.org/tracker/?group_id=821
Email:: rio4ruby@rubyforge.org
+Blog:: http://rio4ruby.blogspot.com
== Copyright
Copyright (c) 2005,2006,2007 Christopher Kleckner. All rights reserved
== License