Skip to content

PyBakUP Scripting Language

thebearbear edited this page Jul 29, 2012 · 4 revisions

For the PyBakUP Scripting Language specifications visit the PBSL Specifications page.

PyBakUP Scripting Language (PBSL) is a simple scripting language meant to intuitively give the user ultimate control over their back up system.

The language is small but powerful, and consists mostly of easy to understand and flexible keywords. The flexibility is to make writing the language more fluid and easy to grasp for each person's preferences. It also allows for a more human readable source. A good example is the expression "1 month" and "2 months" are equally valid.

Keywords

  • minute - a 60 second period
    • Alternatives
      • min
      • mins
      • minutes
  • hour - a 60 minute interval
    • Alternatives
      • h
      • hours
  • day - a 24 hour period
    • Alternatives
      • d
      • days
  • month - This is an average month, roughly 30.5 days
    • Alternatives
      • mon
      • mons
      • months
  • True
  • False
  • LastBU
    This keyword will determine the time since the last backup took place.
  • Modified
    This keyword will determine if the file was modified since the last backup.

Operators

  • ==
    Compares the left and the right hand side for equality.
    Adds the left and right hand side together.
  • ||
    Logical or, will be true if the left or right hand side is true, and false otherwise.
  • &&
    Logical and, will return true when both the left and right hand side are true, false otherwise.
  • Returns true if the left hand side is greater than the right hand side.
  • <
    Returns true if the left hand side is less than the right hand side.
  • =
    Returns true if the left hand side is greater than or equal to the right hand side.

  • <=
    Returns true if the left hand side is less than or equal to the right hand side.

Other

  • The language can handle parenthesis around any valid expression
Clone this wiki locally