Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/resolutions"

See collect_resolutions for the essential entry point.

Index

Variables

Const converter

converter: Converter = new showdown.Converter({omitExtraWLInCodeBlocks : true,simplifiedAutoLink : true,excludeTrailingPunctuationFromURLs : true,literalMidWordUnderscores : true,literalMidWordAsterisks : true,strikethrough : true,ghMentions : true,})

Functions

collect_resolutions

  • Collect all the resolutions. The function calls out, for each minute file, to the get_resolutions function, and flattens all such resolutions into a single large resolution. The set of resolution is also sorted (using sort_resolutions).

    async

    Parameters

    • file_names: string[]

      List of the minute file names, i.e., the base name of the minute file in its repository

    • get_data: GetDataCallback

      A function returning the markdown content of the minutes in a Promise. The function itself either uses the local file system read or a fetch to the repository, depending on whether this function is called for a local or a github repository.

    Returns Promise<MinuteProcessing>

    • List of resolutions

get_resolutions

  • Get the resolution for a minute text (in markdown) of one call. The function relies upon the JSON-LD metadata generated by scribejs. It:

    • extracts the URL, the date of the minutes, and the resolutions themselves from the preamble in JSON-LD;
    • creates an array of Resolution;

    Parameters

    • minutes: string

      the minutes for a call, in markdown

    Returns Resolution[]

    • resolution data for one call

sort_resolutions

  • Compare resolution objects; to be used in a “sort” method on the array of Resolutions.

    Sorting takes a decreasing order by year, a decreasing order by meeting date within a year, and finally an increasing order by resolution number

    Parameters

    Returns number

    • negative, zero, or positive, depending on the comparison result (see the Javascript “sort” method for details)