APIs for interacting with Project Gutenberg
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit bfdb7c2 Oct 9, 2014

README.md

Gutenberg for NodeJs

An API for interacting with the Gutenberg Project

npm status

Build Status

#Usage

NodeJS module to serve as facade to the Gutenberg Catalogue.

The Module supports:

  • Fetch of Catalogue Index Metadata (via HTTP RDF fetch)
  • Content Download by Format (via FTP)
    • Added support for pre-10000 catalogue indexes
  • Parsing of Ascii-Text document areas

All interactions are Live over HTTP/FTP and consumers are responsible for intelligent usage/caching.

Create an instance:

var Gutenberg = require('gutenberg');
var instance = new Gutenberg();

Get Catalogue Metadata:

instance.getCatalogueMetadata(
	{},
	function(err, metas){
		// for each meta, you get catalogue metadata by doc
	}
);

Get Catalogue Item by Key:

instance.getCatalogueItemByKey(
	{
		id: 9999,
		extension: 'txt'	// see catalogue metadata for list of supported extension by doc
	},
	function(err, content){
		// Content has header, footer and content fields
	}
);

#Contact & Issues Issues: Github Issues

CI: travic-ci.org

#License

(The MIT License)

Copyright (c) 2008-2014 Todd Morrison todd@deepelement.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.