Skip to content

Instantly share code, notes, and snippets.

@brainopia
Created January 27, 2012 04:55
Show Gist options
  • Save brainopia/1687067 to your computer and use it in GitHub Desktop.
Save brainopia/1687067 to your computer and use it in GitHub Desktop.
example of customizing ruby docs for yourself
#!/usr/bin/env ruby
files = `find sources -type f`.split
def toplevel(path)
%r{ruby-1.9.3-p0/#{path}}
end
files -= files.grep toplevel %r{bootstraptest|(ext/(-test|curses)|symbian|bcc32|benchmark|def|doc|enc|bin|spec|misc|template|tool|sample|man|test|ext/tk)}
files -= files.grep %r{(win32|lib/rdoc|/\.)}
files -= files.grep /\.(pro|def|mak|mk|in|src|ucm|blt|kwd|gemspec|sh|rl|atheos|emx|nt|s|y|ja|SYMBIAN|rake)$/i
system "sdoc --github --no-se-indexs --charset=utf-8 --tab-width=2 --title=ruby-1.9.3-p0 --output=docs/ruby-1.9.3-p0 --main='#{files.join ' '}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment