[Cuis-dev] Erudite

Mariano Montone marianomontone at gmail.com
Mon Oct 17 18:56:37 PDT 2022


Hilaire,

I've implemented a first sketch of this.

To try, git pull Erudite.

Then Feature require: 'EruditeFilesBookStorer'.

Then evaluate this to store a book:

(EruditeFilesBookStorer on: EruditeManual new)
     storageDirectory: (DirectoryEntry smalltalkImageDirectory / 
'EruditeManual');
     store.

To load a book from the files:

EruditeFilesBookStorer new
     storageDirectory: (DirectoryEntry smalltalkImageDirectory / 
'EruditeManual');
     load :: open

Once you open a book from the files, you can save to files directly from 
Erudite book editor, clicking on save menu.

Those should work. Please let me know if they work for you and what you 
think of it.

Cheers,

       Mariano


El 17/10/22 a las 16:27, Mariano Montone escribió:
> Ah. XML didn't come to my mind. Good idea.
>
> El lun., 17 oct. 2022 16:13, Hilaire Fernandes via Cuis-dev 
> <cuis-dev at lists.cuis.st> escribió:
>
>     Looks good :)
>
>     For the master document of the book, XML may not be too verbose
>     and more neutral.
>
>     Hilaire
>
>     Le 16/10/2022 à 16:04, Mariano Montone via Cuis-dev a écrit :
>>     A possible idea for the implementation:
>>
>>     Have an EruditeBookFilesSerializer that converts books to and
>>     from disk.
>>
>>     On disk, have a main file with the book title and sections
>>     descriptions, in Smalltalk format.
>>
>>     Let's say, book.st <http://book.st>:
>>
>>     EruditeBook new
>>          title: 'My book';
>>          sections: {'Section1'.
>>                           'Section2' -> {'Subsection1'. 'Subsection2'}}
>>
>>     Sections and subsections point to files on disk.
>>     I thought of using yaml for that file, but Cuis does not have
>>     support.
>>
>>     Then, each section and subsection lives on its own file; they
>>     have plain Erudite contents.
>>
>>     Please let me know if you have other ideas for an implementation.
>>
>     -- 
>     GNU Dr. Geo
>     http://drgeo.eu
>     http://blog.drgeo.eu
>
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221017/d135ee69/attachment.htm>


More information about the Cuis-dev mailing list