BibliographyPlugin » History » Version 20

Luis Figueira, 2013-10-09 12:42 PM

1 1 Luis Figueira
h1. Bibliography Plugin Documentation
2 1 Luis Figueira
3 18 Luis Figueira
{{>toc}}
4 18 Luis Figueira
5 6 Luis Figueira
We're developing a Plugin to manage project's and user's bibliographical entries. In the issue tracker it is named _feature_36_.
6 1 Luis Figueira
7 4 Chris Cannam
* [[BibliographyOngoingReviewNotes|Ongoing miscellaneous review notes]] from testing during development
8 1 Luis Figueira
* [[BibliographyPluginAlphaVersion|Plugin's Alpha Version Requisites and Notes]]
9 6 Luis Figueira
10 6 Luis Figueira
11 6 Luis Figueira
h2. Objective and Philosophy
12 6 Luis Figueira
13 6 Luis Figueira
Projects hosted on code.soundsoftware.ac.uk are usually associated with academic publications (papers, articles, etc). These often offer a strong theoretical background to the code that's being hosted on this site, and many times are the only way users can understand what's happening under the hood for a specific project. On the other hand many researchers are now adopting a "reproducible research" philosophy, in which they not only publish the paper/article itself, but also the code and/or data that supports such publication.
14 6 Luis Figueira
15 7 Luis Figueira
The main idea behind this module is to be able to provide a service that ties both features together, making it easy for researchers to make their source code and publications available on the same platform.
16 1 Luis Figueira
17 7 Luis Figueira
Since Redmine is a project-oriented platform, it makes sense that the publications can only be *created, edited, deleted, etc* in the project's scope. 
18 7 Luis Figueira
19 1 Luis Figueira
h2. Plugin Architecture
20 7 Luis Figueira
21 7 Luis Figueira
h3. Permissions
22 8 Luis Figueira
23 7 Luis Figueira
The following permissions were created: 
24 7 Luis Figueira
25 7 Luis Figueira
* view
26 7 Luis Figueira
* add
27 7 Luis Figueira
* edit
28 7 Luis Figueira
* delete  
29 7 Luis Figueira
30 1 Luis Figueira
31 1 Luis Figueira
h3. Models
32 1 Luis Figueira
33 1 Luis Figueira
h4. Publications
34 1 Luis Figueira
35 1 Luis Figueira
h4. Bibtex_Entries
36 1 Luis Figueira
37 1 Luis Figueira
h4. Authors
38 1 Luis Figueira
39 1 Luis Figueira
h4. Authorships
40 1 Luis Figueira
41 1 Luis Figueira
Model that "ties" the authors and publications models together. It contains relation-specific information: 
42 1 Luis Figueira
43 1 Luis Figueira
* @name_on_paper@: author's name on that specific publication;
44 1 Luis Figueira
* @order@: author's order in that publication;
45 1 Luis Figueira
* @institution@: author's institution when the publication was published;
46 1 Luis Figueira
* @email@: author's email on that specific publication.
47 1 Luis Figueira
48 1 Luis Figueira
49 1 Luis Figueira
h3. Relationships
50 1 Luis Figueira
51 1 Luis Figueira
NOTE: upload the class UML. 
52 1 Luis Figueira
53 1 Luis Figueira
54 1 Luis Figueira
h3. Tying it all togheter
55 1 Luis Figueira
56 2 Luis Figueira
This is the complete documentation used to create the plugin:
57 2 Luis Figueira
http://www.redmine.org/projects/redmine/wiki/Hooks
58 1 Luis Figueira
59 2 Luis Figueira
h3. Views
60 1 Luis Figueira
61 2 Luis Figueira
There should be two main ways to browse publications:
62 2 Luis Figueira
63 2 Luis Figueira
# General
64 2 Luis Figueira
# Project 
65 2 Luis Figueira
66 2 Luis Figueira
h4. General Publications View
67 2 Luis Figueira
68 3 Luis Figueira
All the publications published in the website.
69 3 Luis Figueira
70 2 Luis Figueira
h4. Project Publications View
71 1 Luis Figueira
72 1 Luis Figueira
All the publications related to a specific project.
73 1 Luis Figueira
74 1 Luis Figueira
h4. My Publications
75 1 Luis Figueira
76 1 Luis Figueira
In the My Page, there should be a "box" with a list of all the publications added by the user and/or publications where the user is an author
77 2 Luis Figueira
78 14 Luis Figueira
h2. Bibtex Parsing: necessary gems
79 12 Luis Figueira
80 14 Luis Figueira
* Bibtex parsing: *bibtex-ruby* (https://github.com/inukshuk/bibtex-ruby)
81 14 Luis Figueira
* Bib entries formatting: *citeproc-ruby* (https://github.com/inukshuk/citeproc-ruby)
82 1 Luis Figueira
** needs nokogiri gem: http://nokogiri.org/tutorials/installing_nokogiri.html
83 1 Luis Figueira
*** need to have @libiconv@ installed
84 14 Luis Figueira
85 14 Luis Figueira
h3. Installation instructions (tested on eclectus, as root)
86 14 Luis Figueira
87 14 Luis Figueira
<pre>
88 14 Luis Figueira
  gem install bibtex-ruby
89 14 Luis Figueira
90 14 Luis Figueira
  apt-get install libxslt-dev libxml2-dev
91 14 Luis Figueira
  apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
92 14 Luis Figueira
  apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby
93 14 Luis Figueira
  gem install nokogiri
94 14 Luis Figueira
95 14 Luis Figueira
  gem install citeproc-ruby 
96 14 Luis Figueira
</pre>
97 14 Luis Figueira
98 15 Luis Figueira
h2. Deployment notes
99 15 Luis Figueira
100 15 Luis Figueira
h3. Migrations 
101 15 Luis Figueira
102 15 Luis Figueira
<pre>
103 16 Luis Figueira
  rake db:migrate:plugin NAME=redmine_bibliography VERSION=version
104 15 Luis Figueira
</pre>
105 9 Chris Cannam
106 9 Chris Cannam
After running the migrations, you need to seed the publication types:
107 1 Luis Figueira
108 16 Luis Figueira
<pre>
109 16 Luis Figueira
  rake redmine:plugins:redmine_bibliography:seed_bibtex_entry_types
110 16 Luis Figueira
</pre>
111 17 Luis Figueira
112 17 Luis Figueira
h2. Tests
113 17 Luis Figueira
114 20 Luis Figueira
Running @author_test.rb@ file directly (the -I flag adds the folder to the load path):
115 17 Luis Figueira
<pre>
116 19 Luis Figueira
ruby -I test plugins/redmine_bibliography/test/unit/author_test.rb
117 17 Luis Figueira
</pre>