Attributes
base_url
Base of the application used for creating internal links.
username
Authenticated (Digest Auth) user name (aka REMOTE_USER)
Methods
create_page
Create a new page and return the url to redirect to, namely the page in edit mode. We might change this to view mode if demand persuades.
preview_page
AJAX preview of a page (parse and render, save when button pressed)
update_page
Update a page given: content, id and base_url
edit_page_form
Present the form with a page ready to be edited.
view_page
Given a page id, we retrieve its page from the db and return the HTML form of the page to the browser.
view_page_public
Given a page id, we retrieve its page from the db and return the HTML form of the page to the browser. This method is much like the view_page() method is setup for public pages (ones that do not require authentication).
view_page_collected
Given a page id and a collection id we retrieve the collected page source from the db and return it as an HTML rendered page to the browser. This method is much like the view_page() method, but is setup for viewing pages in a collection with a collection navigation: next, previous, index (toc)
view_home_page
Create the view for the base of the application.
view_page_diff
View the diff of a page.
search
Search the documents for a single word.
collect
Collect documents. The id for each document submitted will be put into a list of document ids stored in the 'collection' collection. Yeah, that may seem strange at first, but the idea is we want to put allow for arbitrary sets of documents from the notes collection. We construct these sets by creating a list (array) of the corresponding document ids and inserting this "document" into the "collection" collection.
For example, the Beer collection document could look like:
{
collection_name => 'Beer',
documents => [$some_doc_id, $another_doc_id, .. $last_doc_id]
permissions => { owner => 'rwx', group=> 'r', world => 'r' }
}
where the doc ids are the usual mongodb auto-generated id.
Return the /collections URL to which we'll redirect.
sort_collection
Store a sorted list of pages. Return the /collections URL to which we'll redirect.
merge_collection
Given a collection id, we concatentate all its page into one.
delete_collection
Given a collection id: * Delete it from the mongo DB Return the URL to of the collections index
epub_collection
Create and .epub document from the given collection.
delete_page
Given a page id: * Delete it from the mongo DB * Remove it from the git repo Return the URL to recent (maybe home someday?)
publish_page
Publish a page - Currently this means POST to a MM instance.
bench
A path for benchmarking to get an basic idea of performance.
Name
Mojito - A Lightweight Web Document System
Description
Mojito is a web document system that allows one to author web pages. It has been inspired by MojoMojo which is a mature, stable, responsive and feature rich wiki system. Check MojoMojo out if you're looking for an enterprise grade wiki. Mojito is not attempting to be a wiki, but rather its initial goal is to enable individuals to easily author HTML5 compliant documents whether for personal or public consumption.
Goals
Mojito is in alpha stage so it has much growing to do. Some goals and guidelines are:
* Somewhat Framework Agnostic. Currently there is support for
Web::Simple, Dancer, Mojo and Tatsumaki.
* Minimalistic Interface. No Phluff or at least options to turn features off.
* A page engine that can standalone or potentially be plugged into MojoMojo.
* Exchange between MojoMojo and Mojito document formats.
* HTML5
Current Limitations
* single word search
* revision history doesn't have a web interface yet
Authors
Mateu Hunter hunter@missoula.org
Copyright
Copyright 2011, Mateu Hunter
License
You may distribute this code under the same terms as Perl itself.