@speleotica/walls
v1.3.2
Published
Walls Cave Survey data I/O
Downloads
5
Maintainers
Readme
@speleotica/walls
Types and I/O methods for Walls Cave Survey data file formats
I'm not going to go to much trouble to document it here unless people ask, the types are pretty self-explanatory:
WallsSrvFile
Types and factory functions for AST nodes of .srv
(survey) files
formatWallsSrvFile
import { formatWallsSrvFile } from '@speleotica/walls/srv'
It takes a WallsSrvFile
, and optionally an options hash with a write
function.
If you don't provide write
, it will return the output as a string
. Otherwise,
it will call write
with chunks of data, so you can pass write
connected to a
file write stream.
WallsWpjFile
Types and factory functions for AST nodes of .wpj
(project) files
formatWallsWpjFile
import { formatWallsWpjFile } from '@speleotica/walls/wpj'
It takes a WallsWpjFile
, and optionally an options hash with a write
function.
If you don't provide write
, it will return the output as a string
. Otherwise,
it will call write
with chunks of data, so you can pass write
connected to a
file write stream.
writeWallsProject
import { writeWallsProject } from '@speleotica/walls/node'
Writes the .wpj
file and .srv
files of a project to disk.
Arguments
wpjPath
(string
, required)
The path to write the project file to
wpj
(WallsProjectFile
, required)
The project file AST. .srv
files will only be written for WallsProjectSurvey
nodes with a content
property.