-
Notifications
You must be signed in to change notification settings - Fork 541
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
CLI flag to open file(s) or a directory on Lichtblick #365
Open
ctw-joao-luis
wants to merge
24
commits into
story/load-multiple-mcaps-r1
Choose a base branch
from
feature/cli-flags-to-read-files
base: story/load-multiple-mcaps-r1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CLI flag to open file(s) or a directory on Lichtblick #365
ctw-joao-luis
wants to merge
24
commits into
story/load-multiple-mcaps-r1
from
feature/cli-flags-to-read-files
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-read-files Signed-off-by: ctw-joao-luis <Joao.Luis@ctw.bmwgroup.com>
…ck-Suite/lichtblick into feature/cli-flags-to-read-files
luluiz
reviewed
Feb 14, 2025
luluiz
reviewed
Feb 14, 2025
luluiz
reviewed
Feb 14, 2025
luluiz
reviewed
Feb 14, 2025
luluiz
reviewed
Feb 14, 2025
luluiz
approved these changes
Feb 14, 2025
|
luluiz
approved these changes
Feb 14, 2025
#373 implements the tests for the useOpenFile hook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User-Facing Changes
With this feature Lichtblick users will be able to open .mcap files directly from the CLI (something that was already possible, but now its doable using the --source= parameter).
What's completely new is the ability to also pass paths to directories and Lichtblick will search for .mcap files inside of it.
Its important to note that, for now, this change will only be available for MCAP files
For instance on Windowns if you pass something like:
lichtblick.exe --source=~/Folder/mcapFile.mcap,~/Folder2/mcapFile2.mcap
Lichtblick will open both files
If you pass something like:
lichtblick.exe --source=~/Folder
Lichblick will search for any .mcap file inside that folder and try to open it.
Description
The command-line arguments are first captured in process.argv and filtered for the --source flag.
If multiple paths are specified, they are split using a comma as a delimiter and converted into absolute paths, handling home directory expansion if necessary. If more than one path is detected, they are treated as separate files and returned as a list. If only one path is provided and it is a directory, the logic attempts to extract .mcap files from it.
This ensures proper handling of both individual files and directories.
Checklist