Skip to content

Find out good terminology for the different settings/resource files #9

@coderbloke

Description

@coderbloke

Template:

  • Text files containing tags

GeneratorSpecification:

  • Tags, tag handling, context function names

GeneratorJob:

  • GeneratorSpecification + context object class
  • Input files: template, source files, trigger resources and the target files themselves
  • Output files: target files

GenerationManager:

  • Collection of jobs
  • Define for them:
    • manual or automatic?
    • archive folder (or put it to the Job?)
  • manager is tracking the input files, and decide for need for regeneration

If so:

  • Job shall clearly provide in advance:
  • The list of files the Manager shall monitor
  • The list of files it will overwrite, for the manager to backup them, before job start

Variation of input/output files:

  • E.g.: There is a table with user info (id, real name, email). An announcement email body to be generated into txt for each user

    • One exact resource changes
    • One template is needed (email text with user's real name.
    • Multiple files to be generated, but no fixed name, and they are not coming from filesystem, but from a context
    • Context gets the resource as input
    • Context shall provide them with list get function for the generator manager.
    • Context shall provide tag for the job, which can be used in output file name pattern. (e.g. user id)
  • E.g. A batch file to be generated, which sends the emails to the user.

    • One exact resource changed (same as above, the user table)
    • One template is needed (with for-each tag)
    • One exact file to be generated. Can be single fixed name. But can be a pattern.
    • Context gets the resource as input
    • Context shall provide list get function for the generator for the for-each template tag
    • Context may provide tags for the job for output file name pattern (e.g. date)
  • E.g. User links one exact scene file to one exact script. When scene file is changed, the scene tree building code is updated

    • The target files serves as the template
    • One exact output file
    • There is one exact triggering resource (The scene file itself, or an intermediate file in which user configures some additional thing, e.g. which node shall have separate init function etc. Should this be a separate config file, or an extension of the GeneratorJob class?)
    • Context shall provide simple get function for the template
  • E.g. User wants to generate a source code from each file of a resource type, script from a scene file, or a statemachine file

    • Multiple input files, coming from file system, defined by wildcards
    • Multiple output files, they serve as template, if they are already exists (user could added it own custom code into it already
    • Output file name is given by a pattern
    • If there is no output file yet (initial generation) one template file serves as input

May point in more general direction:

  • Wouldn't a lightweight build system makes sense and hits builds on that?
    The build system could track the changes of inputs, and call the jobs/tasks if needed.
  • Would a build system based on a more general dataflow engine?
    Connection between any data. Editing in GraphEdit. Push/pull mechanism.
  • Context are same for all. A context shall provide: actions returning some value, list get function for iterators, bool is function for conditions, set functions to get data from the engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions