xes_to_csv

package module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

XES to CSV Converter

Introduction

This is a simple command-line tool written in Go (Golang) that converts XES files into CSV files. The tool reads an input XES file, parses the event log data, and writes it out to a CSV file.

Requirements

  • Go 1.18 or higher

Installation

To install the converter, you need to have Go installed on your system. Then, you can clone this repository and build the project:

$ git clone https://github.com/golang-xes/xes-to-csv
$ cd xes-to-csv-converter

Usage

  • The basic usage of the converter is as follows:
$ ./xes2csv -input <input-file>.xes -output <output-file>.csv
  • input: Path to the input XES file.
  • output: Path where the output CSV file should be saved. Basic Example Convert an XES file to CSV:
$ ./xes2csv -input example.xes -output example.csv

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertXESToCSV

func ConvertXESToCSV(XESFilePath, CSVFilePath string) error

ConvertXESToCSV reads an XES file and writes its contents to a CSV file.

Types

type DateAttribute

type DateAttribute struct {
	Key   string `xml:"key,attr"`
	Value string `xml:"value,attr"`
}

DateAttribute represents a date attribute in an event.

type Event

type Event struct {
	StringAttributes []StringAttribute `xml:"string"`
	DateAttributes   []DateAttribute   `xml:"date"`
}

Event represents a single event within a trace in the XES file.

type StringAttribute

type StringAttribute struct {
	Key   string `xml:"key,attr"`
	Value string `xml:"value,attr"`
}

StringAttribute represents a string attribute in an event or trace.

type Trace

type Trace struct {
	Events           []Event           `xml:"event"` // Changed variable name to plural form for consistency.
	StringAttributes []StringAttribute `xml:"string"`
}

Trace represents a single trace in the XES file.

type XES

type XES struct {
	XMLName xml.Name `xml:"log"`
	Traces  []Trace  `xml:"trace"` // Changed variable name to plural form for consistency.
}

XES represents the structure of the XES file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL