Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #54

Description

This pull request introduces support for configuring a default export directory ("export path") for exported files, both globally and per-project. Users can now set, clear, or override the export path via the interactive configuration wizards, and documentation has been updated to explain this new feature. The export logic is updated to respect the export path, including support for ~ home directory expansion and proper fallback behavior.

Key changes include:

Feature: Export Path Configuration

  • Added an ExportPath field to both the global (GlobalConfig) and project (Config) configuration structs, along with corresponding YAML and template updates. [1] [2] [3] [4]
  • Updated the interactive config (tmpo config) and project init (tmpo init) commands to prompt for export path, display current/exported values, and handle clearing or skipping the setting. [1] [2] [3] [4] [5] [6]
  • In the export command, implemented logic to determine the effective export path (project > global > current directory), expand ~, ensure the directory exists, and use it as the file output location. [1] [2] [3]

Documentation Updates

  • Updated README.md, docs/configuration.md, and docs/usage.md to document the new export path setting, its priority, usage examples, and how to set or clear it. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Code Quality and Testing

  • Updated the project config creation and its tests to include the export path, ensuring the new field is correctly saved and loaded. [1] [2] [3] [4] [5]

Minor Improvements

  • Added a newline after error output in tmpo init for better UX.

These changes together make it easier for users to control where their exported files are saved, both globally and per-project, with clear documentation and robust handling in the CLI.

Introduces an 'export_path' option to both global and project config, allowing users to specify a default export directory for time entries. The export command now respects this setting, expanding '~' to the home directory and ensuring the directory exists before exporting. Updates config prompts and display to include the export path.
Updated the export path prompt to clarify that pressing Enter keeps the current value. Added instructions and logic to allow users to type 'clear' or 'none' to remove the export path setting.
Now shows '(current directory)' when export path is empty, providing clearer feedback to users about the export path location.
Introduces an optional export path field to the project initialization flow and configuration template. Updates the interactive prompt, config file generation, and related tests to handle the new export path option.
Add documentation for the new 'export path' setting in the configuration wizard, global config, and per-project `.tmporc` files. Explain how to set, clear, and override the export path, including priority and home directory expansion. Update usage examples and configuration field references accordingly.
@DylanDevelops DylanDevelops changed the title feat: Customizable Export Path feat: Customizable tmpo export Path Jan 5, 2026
@DylanDevelops DylanDevelops merged commit 96cc5f5 into main Jan 5, 2026
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/configurable-export-path branch January 5, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tmpo export file location from Global or Project config

2 participants