[asciidoctor-java-integration] Add POJO resolution in AsciiDoc

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

[asciidoctor-java-integration] Add POJO resolution in AsciiDoc

I was thinking if it don't be  a nice new feature for asciidoctor-java-integration project to add a module to resolve POJO variables to Asciidoctor attributes. I am thinking for example in next use case:

A school wants to prepare typical filling the gap exams, they could prepare the exam in AsciiDoc, the exam is presented to students online, they fill the gaps, these information is stored into a POJO, and then when teaches wants to correct the exams, the same AsciiDoc file can be used and filled with the POJO values.

So for example (an yes it is at high level don't want to go too deep) we can have something like:

class Exam {
  Student student;
  String answer1;

and our AsciiDoc:

= Exam

Student Name: {student.name}

== Questions

What year did man first land on the moon ?
Ansswer: {answer1}

Then using an special render module on asciidoctor-java-integration project with a given instance and document, an output is produced.

Of course when Asciidoctor supports checkboxes (https://github.com/asciidoctor/asciidoctor/issues/200) more kind of questions could be done.

Also this works with for example typical forms that should be filled by users.

What you think, has it sense this feature?