def self.help
helpstring = "\n== Pushing views with Couchview ==\n\nUsage: couchview push directory dbname\n\nCouchview expects a specific filesystem layout for your CouchDB views (see\nexample below). It also supports advanced features like inlining of library\ncode (so you can keep DRY) as well as avoiding unnecessary document\nmodification.\n\nCouchview also solves a problem with CouchDB's view API, which only provides\naccess to the final reduce side of any views which have both a map and a\nreduce function defined. The intermediate map results are often useful for\ndevelopment and production. CouchDB is smart enough to reuse map indexes for\nfunctions duplicated across views within the same design document.\n\nFor views with a reduce function defined, Couchview creates both a reduce view\nand a map-only view, so that you can browse and query the map side as well as\nthe reduction, with no performance penalty.\n\n== Example ==\n\ncouchview push foo-project/bar-views baz-database\n\nThis will push the views defined in foo-project/bar-views into a database\ncalled baz-database. Couchview expects the views to be defined in files with\nnames like:\n\nfoo-project/bar-views/my-design/viewname-map.js\nfoo-project/bar-views/my-design/viewname-reduce.js\nfoo-project/bar-views/my-design/noreduce-map.js\n\nPushed to => http://127.0.0.1:5984/baz-database/_design/my-design\n\nAnd the design document:\n{\n\"views\" : {\n\"viewname-map\" : {\n\"map\" : \"### contents of view-name-map.js ###\"\n},\n\"viewname-reduce\" : {\n\"map\" : \"### contents of view-name-map.js ###\",\n\"reduce\" : \"### contents of view-name-reduce.js ###\"\n},\n\"noreduce-map\" : {\n\"map\" : \"### contents of noreduce-map.js ###\"\n}\n}\n}\n\nCouchview will create a design document for each subdirectory of the views\ndirectory specified on the command line.\n\n== Library Inlining ==\n\nCouchview can optionally inline library code into your views so you only have\nto maintain it in one place. It looks for any files named lib.* in your\ndesign-doc directory (for doc specific libs) and in the parent views directory\n(for project global libs). These libraries are only inserted into views which\ninclude the text\n\n// !include lib\n\nor\n\n# !include lib\n\nCouchview is a result of scratching my own itch. I'd be happy to make it more\ngeneral, so please contact me at jchris@grabb.it if you'd like to see anything\nadded or changed.\n\n"
helpstring.gsub(/^ /, '')
end