Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study: Metablock? #223

Open
mkoskim opened this issue Oct 8, 2024 · 1 comment
Open

Study: Metablock? #223

mkoskim opened this issue Oct 8, 2024 · 1 comment
Labels
consideration Features that may or may not be implemented.

Comments

@mkoskim
Copy link
Owner

mkoskim commented Oct 8, 2024

I investigated shortly novelibre file format (.novx). What came into my mind, that it would not necessarily be bad idea to encapsulate meta-text into its own block. I have thought this once in a while anyways.

Metablocks would look like this:

[p] Paragraph text... [/p]
[missing] Paragraph text... [/missing]
[p] Paragraph text... [/p]
[meta]
  [synopsis] ... [/synopsis]
  [comment] ... [/comment]
  [other metadata]
[/meta]
[p] Paragraph text... [/p]

Metablock would operate like bulleted lists, that is, they are merged, if there is nothing between the blocks.

Benefits: The benefits I could seek for this are:

  1. Metablocks could be configured hidden or floating. They could have an anchor in the text, and float freely in the margins.
  2. Could ease index handling: there would be only one index entry for one metablock, and it could contain different elements.
  3. It could be a standard way to add information to scenes: I thought earlier a generic "control tag", which would insert information to its scene. Metablock could operate like this.
@mkoskim mkoskim added the consideration Features that may or may not be implemented. label Oct 10, 2024
@mkoskim
Copy link
Owner Author

mkoskim commented Oct 14, 2024

One idea: there is basically no need that the act, chapter and scene breaks should be paragraphs. No, they can be blocks, too. So, a metablock could be something that is "configured" what it breaks.

The sole idea of a metablock is just collect information about the forthcoming text together, and thus it will act as some kind of break anyways. The type of the break could be "choosable".

Currently the buffer looks like this:

[ ...,
  {type: "scene", children: [
    {type: "hscene", children: [{text: "Chapter name"}]}, // hscene = scene break
    {type: "p", children: [{text: "Lorem ipsum..."}]},
    {type: "p", children: [{text: "Lorem ipsum..."}]},
  ]}
  ...
]

This could be changed something like:

[ ...,
  {type: "scene", children: [
    {type: "meta", break: "scene", children: [{text: "Chapter name"}]}, // meta.break === "scene"
    {type: "p", children: [{text: "Lorem ipsum..."}]},
    {type: "p", children: [{text: "Lorem ipsum..."}]},
  ]}
  ...
]

We could keep all the current markups and hotkeys untouched. We could render the buffer like we do now. But if we use metablock as a break, we could attach more information to it.

Word count target: One of the most useful thing to add to scenes, chapters and acts would be to set target word count. This would remove the need for fillers, and it would work great with Story Arc view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consideration Features that may or may not be implemented.
Projects
None yet
Development

No branches or pull requests

1 participant