Fabrica publication - a user perspective
Fabrica users are usually the members of a group of scholars providing contents for a Talia installation. Those users will, thus, create what will become sources, once published in Talia (from now on, simply sources). The Fabrica interface (based on FileMaker?) provides the users with the ability to easily create sources of the various available types, such as books, pages, facsimiles, ecc. The users will work together, in groups, creating all the needed sources, and each source will be revised by more than one user, in several steps, and possibly will go back and forth between users several times. Often sources are also created, in Fabrica, with a smaller set of data than the needed one (maybe just the name), the missing data will be added at a future time, by the creator itself or by some other members of the scholar group. Eventually, the group will decide that a source is complete, and ready to be published in Talia. Thus, they'll mark such a source as being in a "ready" state. Other states are available, but those are used for internal managing and are out of the scopes of this document.
By marking a source as "ready", the user will declare such a source as suitable for the publication. The next time a publication is performed, all the sources marked as "ready" will be sent to Talia (and marked as "published").
We can imagine that the following steps will be taken in the process of publishing a new source:
- A first stage where the source is created and commpleted, this will end up with the source being in a "ready" state;
- A second stage where a "publish all ready sources" button is pressed and which will send all the ready sources to the related Talia (nothing of this is available, yet);
- A third stage where some user realize they made a mistake on an already-published source.
The first stage is performed by the users on their own, and they already have the infrastructure required to accomplish it.
The second stage is the most important one for us. Upon launching the process of publication, the system goes through all the sources and, for each of those marked as "ready", it starts the publication process for it. During the publication process the XML for the import is prepared, and some remote procedure (on Talia) are invoked passing the XML to them.
This process needs to be authenticated. That is, each Talia installation must know which Fabrica(s) can feed to it, and the process of exporting from Fabrica should start with an exchange of a key (or whatever) which identifies the Fabrica itself. (This to prevent that unauthorized contents are published).
After the authentication phase, the publication XMLs are fed to Talia. Before each source is fed, though, a check is performed (in Fabrica) to control that every needed piece of data is there, that all the required external files (if any) are available and so on. If a source doesn't pass the checks, then it isn't exported (and notified to the user and maybe moved back to a "in progress" state).
(Michele: The sources completeness and integrity check should be performed on Talia side too if possible. The reason is that we have some projects (e.g. schopenhauersource) that do not rely on fabrica for publication bt use other legacy applications (in SchS they use MS Excel)).
This kind of export needs also that what's now in the various rake tasks is moved into some classes.
Also, as of now, the Critical and Facsimile Editions are created by hand, passing to some rake tasks all the needed parameters. We should either leave the Editions creation as a separated process (by adding a page in the admin panel of Talia, and/or adding this possibility to Fabrica)(Michele: again, this should not be handled in Fabrica only. Talia should always remain independent of Fabrica where possible) or integrate the data about the Edition to which each source belongs inside the source's export XML, and managing the edition creation along with the sources export (but in the latter case we'd still need some extra information for each edition, like title, nickname, ecc. _and_ a sort of incremental edition creation).
The users will probably export data for each edition in several stages. At first they'll publish a smaller set of all the sources being part of an edition. Later on they'll publish some more sources being part of the same editions as soon as they've created them in Fabrica (the process can be long as, as said above, each source is checked by more than one person before going to a "ready" state). This is something to study a bit more: how to deal with this? Two approaches are possible here:
- drop and recreate the whole edition each time a new source (declared as part of it) is published (this also must be launched by some panel in Talia or managed automatically). This has been very time consuming, up to now (an edition may take even 80 hours to be created!). ;
- add the ability to increment the edition content at a later time (this may be needed for the publication process too, please read above).
Please discuss this a bit together. As for the third stage, by "contract" we shouldn't provide the ability to delete or modify an already published source (even if this is going to happen anyway) so we should try to avoid the situation where some sources need modification/deletion. To do so, we should present the user with a complete list of all the sources that are going to be published, with the ability to check all their data and to remove those unwanted (by removing the "ready" from them state and move them back to wathever is the state before ready - like "in progress").
