writemonkey / wm3

165 stars 5 forks source link

Extending WM with object database #383

Open ebrelion opened 3 years ago

ebrelion commented 3 years ago

While writing stories, it is interesting to have a small database of objects that will be used in the text : people, locations, etc. This function is available in many "no distraction" editors. This is my proposal for including such a function in WM. Comments are welcome...

Extending WriteMonkey with object database

While writing, it is interesting to have a small database of objects that will be used in the text : people, locations, etc.

Template example to define a person:


Name:
Nickname:
Description:

The templates and the objects can perhaps be stored in the WM repository, using a new class of objects.

The user will be able to define as many templates as he wants, each one with a unique name. We can imagine some command like "Create object template {name}"

Then, he can start to use the templates with a simple command "New object using {name}". The editor will show a new text document with the template fields. The writer will then be able to enter the desired data in the fields.

The object text can include shortcuts to texts snippets that could be used quickly when the user want to include the object in his document text. Some special tag will be used to link the shortcut text to the snippet. The user can define an unlimited number of tags in each object with the syntax :

{tag}text

Object sample to define a person:


Name:Joel
Nickname:Jojo
Description:an hairy developper
{jo}Joel the developper
{joh}The hairy developper

Then, a special function key (Ctrl+something) will be used to replace the current word in the editor by the corresponding text in an object. Here, in the sample, typing "jo" then Ctrl+something will replace "jo" by "Joel the developper".

All objects and templates can be listed in the repository and deleted from there.

Alex-T-H commented 3 years ago

Sounds to me more like a requirement to an Integrated Development Environment for software develop than for writing a novel. It would be a use case for SW development where a subroutine needs to be changed multiple times where a function call would be more elegant.