mass-code-parser
is a command-line tool for parsing and exporting MassCode database files into various formats. This tool allows users to convert their MassCode database into text, HTML, or JSON files.
- Parse MassCode database files (
db.json
). - Export the parsed data into text, HTML, or JSON formats.
- Support for specifying output file paths and types.
- Go 1.23 or later
- MassCode database file (
db.json
)
- Clone the repository:
git clone https://github.com/ondrovic/mass-code-parser.git
- Navigate to the project directory:
cd mass-code-parser
- Build the project:
go build -o mass-code-parser ./cmd
mass-code-parser <path-to-db.json> [flags]
To parse a MassCode database file located at /path/to/db.json
and export the results as an HTML file:
mass-code-parser /path/to/db.json --output --output-path="/path/to/output" --output-type="html"
-o, --output
(boolean): Export results to a file.-p, --output-path
(string): Specify the path for the output file (without extension).-t, --output-type
(string): Specify the output type. Options aretext
,html
, orjson
. Default ishtml
.
-o, --output
: If provided, the output will be saved to a file instead of printed to the console.-p, --output-path
: Path for the output file (without extension). If not specified, defaults tomass_code_export
.-t, --output-type
: Specifies the output format. Valid options are:text
: Export as a plain text file.html
: Export as an HTML file.json
: Export as a JSON file.
0
: Successful execution.1
: Execution failed due to an error.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
This tool utilizes several Go libraries, including:
- spf13/cobra: A library for creating powerful modern CLI applications.
- spf13/viper: A complete configuration solution for Go applications.
- ondrovic/common: Common utilities for Go applications.