Hi, Anyone know a way to easily printout all code in a project, say a plugin that you download and want to read offline? Currently I open each file up and copy/paste into word, then when I print I adjust the printout to be double-sided and multiple pages per sheet (i.e. compress). Would be great to have something that collects all text in a directory into one text file. Anything exist for this? Tks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Curtis Summers
2006-Sep-15 20:05 UTC
Re: printing project code - way to copy into one doc ???
Greg Hauptmann wrote:> Hi, > > Anyone know a way to easily printout all code in a project, say a plugin > that you download and want to read offline? Currently I open each file > up and copy/paste into word, then when I print I adjust the printout to > be double-sided and multiple pages per sheet (i.e. compress). > > Would be great to have something that collects all text in a directory > into one text file. Anything exist for this? > > TksIt looks like you are using Windows if you''re using Word. Do yourself a favor and download some Unix tools and you can do something like this: find ./ -iregex ''.*\(\.rb\|readme\|install\).*'' | sort | while read in; do printf "\n\n####\n# FILE: %s\n####\n\n" ${in} >> onebigfile; cat "${in}" >> onebigfile; done This will dump all ruby, readme, and install (you can add to it) files for the current directory into one big file looking something like this: #### # FILE: ./README #### Contents of the readme file.... #### # FILE: ./init.rb #### Contents of init.rb.... and so on. This would save you the tedious copy and paste step, requiring that you open just the one big file. Also, depending on what you''re wanting to look at, rdoc might work for you: http://www.ruby-doc.org/stdlib/libdoc/rdoc/rdoc/classes/RDoc.html -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Curtis Summers
2006-Sep-15 20:09 UTC
Re: printing project code - way to copy into one doc ???
Curtis Summers wrote:> This will dump all ruby, readme, and install (you can add to it) files > for the current directoryCorrection: "current directory" should be "current directory and all sub-directories under that directory" Also, cygwin should have all of these command-line tools for Windows: http://www.cygwin.com/ When I have to develop on Windows, I always install this first! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Sep-15 21:06 UTC
Re: printing project code - way to copy into one doc ???
wow, excellent Curtis - thanks very much --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---