Statocles icon indicating copy to clipboard operation
Statocles copied to clipboard

Global "create document" function API

Open preaction opened this issue 10 years ago • 2 comments

Most Statocles apps need a generic "create document" function. When this is called they need to:

  • Collect arguments and options as input
  • Build a document
  • Write it to the store

Additionally, when we have a $EDITOR or Dynamocles, we need to be able to save the document and have the application do what it needs to:

  • Rename the document
  • Update last_modified

If this is a generic API, we can then build the CLI (Statocles) and Web API (Dynamocles) on top of it, making my work easier.

preaction avatar Jan 17 '15 17:01 preaction

Call this Statocles::App::Role::Editable perhaps?

The Perldoc and Static apps are not editable, but the Blog and Plain apps are.

Or maybe the Static app is editable, with some caveats to ensure things don't blow up (like on images or something).

preaction avatar Jan 17 '15 17:01 preaction

The Statocles::App::Role::Store could take on some of this, if not all of it.

preaction avatar Sep 22 '15 05:09 preaction