Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result file changes #67

Closed
4 tasks done
orchetect opened this issue Nov 23, 2023 · 3 comments
Closed
4 tasks done

Result file changes #67

orchetect opened this issue Nov 23, 2023 · 3 comments
Assignees
Labels
export manifest Related to export metadata (CSV, JSON) profiles Ideas for new profiles
Milestone

Comments

@orchetect
Copy link
Contributor

orchetect commented Nov 23, 2023

The following modifications to the result file (formerly known as 'done' file) are needed:

  • Add key name profile containing the profile name as the value
    Referenced from: Proper Error message and handling for mismatched Profiles and Database MarkerData#9
  • Add key name exportFolder containing the final output path of the extracted files
  • Change --done-filename CLI option (MarkersExtractor.doneFilename) to --result-file-path (MarkersExtractor.resultFilePath) which can accept a full path.
    That way shell tools can know where to find the done file and in turn it can tell them where the final output folder is.
    Referenced from: Database Panel Implementation MarkerData#16
  • Remove --create-done-file flag as it will be redundant with the --result-file-path option. If --result-file-path is provided, it implicitly means that a done file should be created. If not supplied, no done file is created.
@orchetect orchetect added this to the 0.2.6 milestone Nov 23, 2023
@orchetect orchetect self-assigned this Nov 23, 2023
@orchetect orchetect added profiles Ideas for new profiles export manifest Related to export metadata (CSV, JSON) labels Nov 23, 2023
@orchetect orchetect pinned this issue Nov 24, 2023
@orchetect orchetect changed the title Add profile name to done file Done file changes Nov 24, 2023
@orchetect
Copy link
Contributor Author

orchetect commented Nov 24, 2023

I'm going to change 'Done File' nomenclature to 'Result File' / 'Export Result File'. It's more descriptive.

Some of the key names will change to be more consistent and descriptive as well.

@orchetect orchetect changed the title Done file changes Result file changes Nov 24, 2023
@orchetect
Copy link
Contributor Author

orchetect commented Nov 24, 2023

This is done and will be in 0.2.6.

The possible result json file contents are below. Not all keys will be present of course, only the ones relevant to the export profile used.

These key names also should not be checked using string literals. Instead, the key name can be fed into ExportResult.Key(rawValue:) to produce a ExportResult.Key enum case which can be switched on.

public enum Key: String, Equatable, Hashable, CaseIterable {
case profile
case exportFolder
case csvManifestPath
case jsonManifestPath
case midiFilePath
}

Key/Value Pairs

  • profile: The profile identifier. This will always be present.

    Don't use a string literal to check its value. Instead, the value string can be fed into ExportProfileFormat(rawValue:) to produce a ExportProfileFormat enum case which can be switched on.

    public enum ExportProfileFormat: String, CaseIterable {
    case airtable
    case midi
    case notion
    }

  • outputFolder: Path to the base output folder (that contains the thumbnails, marker pngs, and output csv/json/midi file). This will always be present.

  • csvManifestFile: Path to CSV manifest file, if applicable to the profile

  • jsonManifestFile: Path to JSON manifest file, if applicable to the profile

  • midiFile: Path to MIDI file, if applicable to the profile

@IAmVigneswaran
Copy link
Contributor

Will close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export manifest Related to export metadata (CSV, JSON) profiles Ideas for new profiles
Projects
None yet
Development

No branches or pull requests

2 participants