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

code: modularize function special, split specials.pl #4096

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

mbab
Copy link
Collaborator

@mbab mbab commented Oct 14, 2024

+AMDG+

@APMarcello3 APMarcello3 merged commit 45a3d40 into DivinumOfficium:master Oct 14, 2024
1 check passed
@mbab mbab deleted the hspecial4 branch October 14, 2024 12:30
@FAJ-Munich
Copy link
Contributor

Great work to modularise specials.

Thinking about issue #626 lately, I realised the functions that do perform formatting "too early" are those script functions mainly found in horas.pl. So I have been thinking about bringing all those called by the & directive into a single file, e.g. horasscripts.pl. As such, I wonder if Martyrology and Antiphonas finalis shouldn't become # sections covered by specials already? I guess this could have an impact on the epubgen so I'm hesitant as of now. What do you think, Father and @mbab ?

Additionally, I think those scripts called by missa as well (like do_io.pl , dialogcommon.pl , etc. ) should go into the DivinumOfficium folder?

@mbab
Copy link
Collaborator Author

mbab commented Oct 15, 2024

As such, I wonder if Martyrology and Antiphonas finalis shouldn't become # sections covered by specials already?

As there is already #Martyrology in Prima.txt I bet You can try.

Maybe we should keep in ordinarium only skeleton and add middle level file (can't find proper name) with content as

[De Officio Capituli]
$Deus in adjutorium iij
&Gloria
$MLitany2
$respice
&Gloria
$Oremus
$dirigere
$Amen

After much consideration I think above was daft idea.

Additionally, I think those scripts called by missa as well (like do_io.pl , dialogcommon.pl , etc. ) should go into the DivinumOfficium folder?

Certainly. And it doesn't look like it would be difficult to convert it into a perl modules


As for #626 I have idee:
change specials to ordinarium compiler which outputs something like:

[...
['Psalterium/Translate#Hymnus', sub { $_[0] =~ s/^/#/ }]
['Psalterium/Minor Special#Hymnus Tertia', sub { # apply doxology, initial etc. }]
...]

generally 'source' of text from database + function which will perform necessary operation on it in next step,
output of such compilation can be linked for specified language to something like markdown, which can serve as base for HTML (and other formats) output.
This will make obsolete "vernacular" variables (as %winner2), translate and prayer functions and I believe should make code cleaner.
But I'm a bit worry about performance and size of work to implement this.

@mbab
Copy link
Collaborator Author

mbab commented Oct 16, 2024

I'm giving notification to this for @APMarcello3 & @FAJ-Munich as I doubt my reply reached you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants