Add tree-style recursive directory listing to CLI, directory navigation to GUI, and fix icon rendering issues.#25
Open
adityakrgupta24 wants to merge 5 commits into
Open
Conversation
Add -R flag to the ls command that displays the memory card directory structure in a tree format with box-drawing characters. Add -l flag (--long-recursive) to show mode bits, file size, and timestamps alongside the tree output, with columns aligned to the deepest entry.
Add double-click navigation into save directories with '..' support to return to parent. Show files when inside a subdirectory. Enable export and delete for individual files. Disable import when not at root. Show current path in window title. Fix icon texture type detection to use bit flags (bit 2 = texture present, bit 3 = compressed). Fix RLE decompression high-bit check from 0xff00 to 0x8000 and add zero-repeat guard. Catch FileTooSmall in icon constructor to allow partial rendering. Fix Retina display rendering by scaling glViewport with content scale factor. Fix canvas sizer proportion to fill available space. Suppress stale focus events during list updates to prevent erroneous icon load attempts on navigation.
In existing tests, rename module imports from mymcplus to mymcplusplus to match the package rename. Fix expected export output to account for "Exporing" typo corrected to "Exporting" in commit 48c1065 and longname default behavior introduced in the same commit (PR Adubbz#22). Add filter="data" to tar.extractall to resolve Python 3.14 deprecation warning.
Document the new ls -R, ls -R -l, and ls -R -l -c flags with example output showing tree structure and aligned column display.
Add minor version bump for new tree-style recursive directory listing and GUI directory navigation features.
This file contains hidden or 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
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.
Changes
CLI: Tree-style recursive listing (
mymcplusplus/mymc.py)-Rflag tolscommand that displays directory structure with box-drawing characters-l(--long-recursive) flag to show mode bits, file size, and timestamps in tree mode-cflag for creation timesGUI: Directory navigation (
mymcplusplus/gui/dirlist_control.py,mymcplusplus/gui/gui.py)..entry navigates back to parenticon.sysinside a save directory renders the 3D icon preview_updatingflag0x7FFFFFFE) for..entryItemDatato avoid platform issues with negative values (Safe change as PS2 memory card specs don't allow tree depth of more than 1 - where depth of root folder is 0)Icon rendering fixes (
mymcplusplus/ps2icon.py,mymcplusplus/gui/icon_renderer.py,mymcplusplus/gui/icon_window.py)30xff00to0x8000, add zero-repeat guardFileTooSmallin Icon constructor to allow partial rendering instead of failing entirelyglViewportwithGetContentScaleFactor()so icon renders at full sizewx.EXPANDto1so canvas fills available spaceTest fixes (
test/)mymcplustomymcplusplusto match package renamefilter="data"totar.extractallfor Python 3.14 compatibilityDocumentation (README.md)
ls -R,ls -R -l, andls -R -l -cwith sample outputTesting
All 36 existing tests pass
Manually tested CLI with
SCEVMC0.mc2,MemoryCard1-1.mc2,MemoryCard1-2.mc2,SCEVMC0_ecc.ps2andSCEVMC0_ecc_jpn.ps2::test_memcards.zip
Manually tested GUI navigation, export, delete, and icon rendering on cards in above attachment.
NOTE: I don't have an exhaustive way of testing all existing functionalities before this PR. I have just run tests in the tests folder and verified the feature in this PR. I have done basic testing of existing functionalities.