https://github.com/tfwright/incite
This repo has been abandoned in favor of http://github.com/inukshuk/bibtex-ruby
https://github.com/tfwright/incite
Last synced: 9 months ago
JSON representation
This repo has been abandoned in favor of http://github.com/inukshuk/bibtex-ruby
- Host: GitHub
- URL: https://github.com/tfwright/incite
- Owner: tfwright
- License: mit
- Created: 2008-12-03T16:39:16.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2020-02-28T17:46:21.000Z (over 6 years ago)
- Last Synced: 2024-08-09T10:16:28.540Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 53.7 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview [![Incite Build Status][Build Icon]][Build Status]
[Build Status]: http://travis-ci.org/tfwright/incite
[Build Icon]: https://secure.travis-ci.org/tfwright/incite.png?branch=master
Incite is in alpha alpha stage. It's useless, don't install it.
# Installation
Incite is available as a ruby gem.
```ruby
gem install incite
```
# Usage
* Note: This syntax is very experimental, and will likely--no, definitely--change in a radical way (see overview).
First you need to instantiate a source you want to cite:
```ruby
source = Incite::Source.new
# => #
```
Configure the source with the bibliographical data. The minimum required attributes are title, author(s), publisher, and year.
```ruby
source.authors = ["Sam Dandy"]
source.title = "A Brief Flirtation"
source.publisher = "Rainbow Unicorn Press"
source.year = 1985
```
Yes, I just made all of that up. I should have been a writer. Now you can cite your source:
```ruby
source.citation(:entry)
# => "Sam Dandy. A Brief Flirtation. : Rainbow Unicorn Press, 1985."
```
If you try to create a citation when this data is missing you'll get an error.
```ruby
source.title = nil
# => nil
source.citation(:entry)
# => ArgumentError: Source lacks attributes required to construct citation
```
Most citations require more data, viz. page numbers.
# Other future plans
* Integration with various bibliographies (Google Books, Amazon, &c)
* Citation text (for annotated notes/bibliographies)
* Source types (book, article, chapter &c)
* Different type of formats (to_s, to_rtf, &c)