node-djiparsetxt
Version:
command-line application that reads a DJI '.txt' file and outputs a json.
38 lines (37 loc) • 1.35 kB
TypeScript
/// <reference types="node" />
import { IRowObject, IHeaderInfo } from "./shared/interfaces";
/**
* Parse the record from the given file.
* @param buf File buffer of a log.
* @param filter Function to use as a filter for the rows, only IRecord's that return true are returned.
* @returns Array of rows with each row being
* an object where the keys are the record type.
*/
export declare function parse_file(buf: Buffer, filter?: (row: IRowObject) => boolean): IRowObject[];
/**
* Get details section of the given file.
* @param buf File buffer of a log.
* @returns Object with the parsed details section.
*/
export declare function get_details(buf: Buffer): any;
/**
* Get header section of the given file.
* @param buf File buffer of a log.
* @returns Object with the parsed header section.
*/
export declare function get_header(buf: Buffer): IHeaderInfo;
/**
* Returns a KML string.
* @param buf File buffer of a log
* @param image Optional image param for the kml
* @returns Array of jpeg buffers.
*/
export declare function get_kml(buf: Buffer, image?: string, removeNoSignalRecords?: boolean): Promise<string>;
/**
* Get the jpegs in file.
* @param buf File buffer of a log
* @returns Array of jpeg buffers.
*/
export declare function get_jpegs(buf: Buffer): Buffer[];
export * from "./shared/interfaces";