Changeset 1132

Show
Ignore:
Timestamp:
07/30/07 11:38:33 (1 year ago)
Author:
sandal
Message:

marketing_speak += 10

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ruport-www/ruport.html

    r1129 r1132  
    3333    </div> 
    3434    <div id="mainContent"> 
    35       <h2>What is Ruport?</h2> 
    3635 
    37       <p>Ruby Reports (Ruport) is an extensible reporting system.  It aims to 
    38       keep things as simple as possible while still providing the core 
    39       toolset you'll need for most reporting tasks.</p> 
     36<h2>Simplify Your Reporting Tasks</h2> 
    4037 
    41       <h2>What can Ruport do for me?</h2> 
     38<p> 
     39Reports come in all flavours, but the code to generate them usually 
     40only comes in one: <i>monotony</i>.  From simple data transformations to 
     41highly customized printable reports, you are often faced with a 
     42dilemma:  Use a canned solution at the cost of full control, or begin 
     43coding acres of glue code to tie together all the tools you'll need. 
     44Of course, there is another option, and that is Ruby Reports. 
     45</p> 
    4246 
    43       <p>We provide a solid data model that can be easily hooked up to a number 
    44       of sources, including CSV files, ActiveRecord models, and raw SQL 
    45       connections through DBI.</p> 
     47<h2>A Unique Approach to Reporting</h2> 
    4648 
    47       <p>We also provide an insanely easy to extend formatting system which 
    48       provides a consistent interface as well as a set of helper functions 
    49       for a number of output types (HTML, PDF, CSV, and plain text).</p> 
     49<p> 
     50There are other reporting solutions out there that claim they have the 
     51answer to all your business reporting problems.  We're not in the 
     52business of competing with those folks.  In fact, you'll find that the 
     53core of Ruby Reports, <b>ruport</b>, focuses almost entirely on the 
     54underplumbing.</p> 
    5055 
    51       <p>On top of that, Ruport offers a bunch of little tools to tie things 
    52       together and help you be more productively lazy.  This includes a high 
    53       level report interface, as well as a code generator (rope) that will 
    54       help lay out a project for you and do other cool things like generate 
    55       boilerplate code and tests when needed. These tools can be found 
    56       in the ruport-util package.</p> 
     56<p> 
     57We provide standard data structures to allow you to 
     58easily compare data from any number of sources, including CSV files, 
     59ActiveRecord backed databases, and even raw SQL queries against legacy 
     60databases.  We also provide an extremely malleable formatting system 
     61that lays the foundations for PDF,CSV,HTML,and Text based reports.  To 
     62help get you off the ground floor, we're also actively maintaining a 
     63utilities package, <b>ruport-util</b>, which provides support for a range of 
     64higher level features, such as invoice generation, report mailing, 
     65graphing, code generation, and additional output formats. 
     66</p> 
    5767 
    58       <p>We're not aiming to be a comprehensive reporting solution: our primary 
    59       goal is to make reporting applications easier to build in Ruby, not 
    60       build them for you.  That having been said, you can also find things like 
    61       basic support for graphing and invoices in our ruport-util package. 
    62       This is likely going to take a little while to build up and stabilize, 
    63       but it should be a good way to add higher level functionality to your 
    64       Ruport projects as time goes on.</p> 
     68<p> 
     69Although you won't find canned reports to do drill downs or data cubes 
     70or any other specific task in Ruby Reports, you'll find that we've 
     71made the sharpest knives in the drawer available to you.  Instead of 
     72spending your time building a foundation, you can quickly mix and 
     73match our components, and then immediately begin to focus on your actual 
     74task. 
     75</p> 
    6576 
    66       <h2>Get Ruport</h2> 
     77<h2>Getting Started</h2> 
    6778 
    68       <p>Ruport and its dependencies:</p> 
    69       <pre>gem install ruport -y</pre> 
     79<p> 
     80The ruport and ruport-util packages are distributed as RubyGems so 
     81installation is a snap: 
     82</p> 
    7083 
    71       <p>The Ruby Reports Utilities package (optional):</p> 
    72       <pre>gem install ruport-util -y</pre> 
     84<pre> 
     85  gem install ruport -y 
     86   
     87  gem install ruport-util -y 
     88</pre> 
    7389 
    74       <h2>Need Help?</h2> 
    75  
    76       <p>If you're looking for help with Ruport or want to get involved with our 
    77       community, have a look at some of the 
    78       <a href="resources.html">Resources</a> we have available.</p> 
    79        
    80       <h2>Help Us</h2> 
    81  
    82       <p> 
    83         We always appreciate feedback from our users. You can make change 
    84         requests and submit bug reports on the  
    85         <a href="http://code.rubyreports.org">Trac site</a>  
    86         (use the account ruport / blinky to file tickets). 
    87       </p>    
    88  
    89       <p>We're also looking for a better hosting solution than our current 
    90 setup.  If you have a VPS or dedicated host you could 
    91 donate to us, contact Gregory <em>&lt;gregory.t.brown at gmail.com&gt;</em> for  
    92 details.</p> 
    93  
    94     <h2>Enjoy!</h2> 
    95        
    96     <p>We hope Ruport is helpful to you.  If you run into trouble or just  
    97         want to say hello, stop by #ruport on Freenode or send a message to our 
    98         <a href="http://list.rubyreports.org">mailing list</a>.</p> 
    99          
     90<p> 
     91To get a feel for how Ruport works, you may want to have a look at 
     92some <a href="examples.html">simple examples</a>.   
     93</p><p> 
     94We are also actively developing <a href="http://ruportbook.com">a free-content book</a>,  
     95which covers a range of topics and is updated regularly.  Once 
     96you've got your feet wet, you'll find the <a href="http://api.rubyreports.org">API documentation</a> 
     97 and our <a href="resources.html">other resources</a> helpful.   
     98</p><p> 
     99Please feel free to drop by the <a href="http://list.rubyreports.org">Ruport 
     100mailing list</a> with any questions, problems, or suggestions. 
     101</p> 
    100102    </div> 
    101103    <div id="secondaryContent"> 
    102       <a href='http://www.pledgie.com/campaigns/190'><img alt='Click here to lend your support to: Ruby Reports Documentation Effort and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/190.png?skin_name=chrome' border='0' /></a> 
    103       <p class="badgeLabel">Support the Ruby Reports Documentation Effort</p> 
    104104       
    105105      <h2>News</h2>   
  • ruport/trunk/examples/tattle_rubygems_version.rb

    r984 r1132  
    11# A dump of the database for this example can be found in ./data/tattle.dump 
     2 
    23 
    34require "active_record" 
    45require "ruport" 
     6 
    57 
    68# Update with your connection parameters 
     
    3234end 
    3335 
    34 sorted_table = rubygems_versions.sort_rows_by { |r| -r.count } 
    35 g = Grouping(sorted_table, :by => "platform") 
     36sorted_table = rubygems_versions.sort_rows_by("count", :order => :descending) 
     37sorted_table.reduce { |r| r["platform"] !~ /darwin/i } 
     38g = Grouping(sorted_table, :by => "platform", :order => "name") 
     39puts g.to_pdf  
    3640 
    37 File.open("platforms_gems.html", "w") do |f| 
    38   f.write g.to_html(:style => :justified) 
    39 end 
  • ruport/trunk/examples/trac_ticket_status.rb

    r1104 r1132  
    5555timeline = "http://stonecode.svnrepository.com/ruport/trac.cgi/timeline" 
    5656 
    57 report = TracSummaryReport.new(:timeline_uri => timeline, :days => 14)   
     57report = TracSummaryReport.new(:timeline_uri => timeline, :days => 30)   
    5858puts report.as(:text) 
    5959 
  • ruport/trunk/lib/ruport/formatter/pdf.rb

    r1087 r1132  
    392392    include DrawingHelpers 
    393393     
    394     private    
     394    private 
    395395     
    396396    def apply_pdf_table_column_opts(table,table_data,format_opts) 
    397       column_opts = format_opts.delete(:column_options)            
    398       if column_opts  
     397      column_opts = format_opts.delete(:column_options) 
     398      heading_opts = column_opts.delete(:heading) 
     399      if column_opts 
    399400        specific = get_specific_column_options(table_data.column_names, 
    400                                                column_opts)                                            
    401         columns = table_data.column_names.inject({}) { |s,c|  
    402           s.merge( c => ::PDF::SimpleTable::Column.new(c) { |col|   
    403             column_opts.each { |k,v| col.send("#{k}=",v) }     
    404             # use the specific column names now      
     401                                               column_opts) 
     402        columns = table_data.column_names.inject({}) { |s,c| 
     403          s.merge( c => ::PDF::SimpleTable::Column.new(c) { |col| 
     404            col.heading = create_heading(heading_opts)  
     405            column_opts.each { |k,v| col.send("#{k}=",v) } 
     406            # use the specific column names now 
    405407            specific[c].each { |k,v| col.send("#{k}=",v) } 
    406408          }) 
    407         }                      
     409        } 
    408410        table.columns = columns 
    409       end     
    410     end  
     411      end 
     412    end 
    411413 
    412414    def get_specific_column_options(column_names,column_opts) 
    413        column_names.inject({}) do |s,c| 
    414          s.merge(c => (column_opts.delete(c) || {}))  
    415        end 
    416     end      
     415      column_names.inject({}) do |s,c| 
     416        opts = column_opts.delete(c) || {} 
     417        if opts[:heading] 
     418          opts = opts.merge(:heading => create_heading(opts[:heading])) 
     419        end 
     420        s.merge(c => opts) 
     421      end 
     422    end 
     423     
     424    def create_heading(heading_opts) 
     425      heading_opts ||= {} 
     426      ::PDF::SimpleTable::Column::Heading.new {|head| 
     427        heading_opts.each {|k,v| head.send("#{k}=",v) } 
     428      } 
     429    end 
    417430     
    418431    def grouping_columns