polyfemos.parser.filepathparser — polyfemos 0.3.29 documentation

# polyfemos.parser.filepathparser

Functions to parse filepaths from strings

copyright

  2019, University of Oulu, Sodankyla Geophysical Observatory

license

  GNU Lesser General Public License v3.0 or later (https://spdx.org/licenses/LGPL-3.0-or-later.html)

Public Functions

`polyfemos.parser.filepathparser.` `path_from_str`(inputstr)
  Parameters

    inputstr (str) – A string representing the filepath, reserved variables included

  Return type

    func

  Returns

    A filepath function

Private Functions

`polyfemos.parser.filepathparser.` `_pathfunc`(path, year='', julday='', network_code='', station_code='', location_code='', channel_code='', parname='', **kwargs)
  Parameters

    - path (str) – A filepath body to be filled with reserved variable values

    - year (str, optional) – defaults to empty string

    - julday (str, optional) – defaults to empty string

    - network_code (str, optional) – defaults to empty string

    - station_code (str, optional) – defaults to empty string

    - location_code (str, optional) – defaults to empty string

    - channel_code (str, optional) – defaults to empty string

    - parname (str, optional) – defaults to empty string

  Return type

    str

  Returns

    A filepath with every reserved variable replaced with their respectable values