Class PublicationDirLoader

java.lang.Object
atessera.markup.PublicationDirLoader

public final class PublicationDirLoader extends Object
Loads the content of a publication from a directory.

This loader walks the supplied directory, picks supported source files, sorts them by path, and assembles a PublicationContent model. Each matching file becomes a section; the section type is inferred from the file extension. Files named abstract.md and abstract.tex are treated specially as the publication abstract. Metadata from an INFO.txt file, if present, is applied to the resulting content.

Supported source file extensions are MD, TEX, EQ, LST, UML, PLOT, MP, DOT, PY, JAVA, C, and CPP.

  • Constructor Details

    • PublicationDirLoader

      public PublicationDirLoader(Path publDir)
      Creates a loader for the specified publication directory.
      Parameters:
      publDir - the publication directory, must not be null
  • Method Details

    • load

      public PublicationContent load() throws IOException
      Loads the publication content from the configured directory.
      Returns:
      the loaded publication content
      Throws:
      IOException - if an I/O error occurs while reading the directory