-
Couldn't load subscription status.
- Fork 118
Add bulk slide removal functionality #691
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
base: master
Are you sure you want to change the base?
Add bulk slide removal functionality #691
Conversation
|
Dear @WahiduzzamanKhan , great that you want to contribute to @davidgohel asked my to have a look at your PR as it is related to issue #634 , which I opened. FeedbackI will have a deeper look at the PR in the near future, but just some first remarks:
A personal request:I just started this R YouTube Channel, where the first series is on issue #634 (video 1 and video 2). I needed a very simple issue for this, which be fixed in a few videos, so I went with #634 (vecorizing index arg in My suggestion: Could we keep |
|
Hello @markheckmann
Regarding your personal request, I don't really know what to say. Having an internal function and then calling this function from the exposed one does not make much sense to me. Feels like an unnecessary detour. If the video series is that important you, we can delay the merging of this PR for some time so you can finish the series. Other than that, I don't think there is much else we can do. |
|
Hi @WahiduzzamanKhan ,
Thanks, it would be great to slightly postpone the PR. I will be on holiday until Sunday. Beginning of next week I will finish the video series. After that we can add the tests together. As I will also add a few new tests for It would be good if we could already make a list of what behavior is expected and unexpected. We will write a test for all wanted and all unwanted behavior, including expected errors. Example:
The tests should call each line of the code at least once. Also, please use |
Summary
This PR introduces a new function
remove_slides_bulk()that allows users to efficiently remove multiple slides from a PowerPoint presentation in a single operation. This enhancement addresses the performance concerns when removing multiple slides by callingremove_slide()multiple times.Changes Made
New Function:
remove_slides_bulk()Location:
R/pptx_slide_manip.Rx: an rpptx objectindices: a numeric vector of slide indices to removerm_images: if TRUE (default), images in removed slides are also cleaned upNew Function:
clean_unused_media()Location:
R/pptx_slide_manip.Rx: an rpptx objectInternal Implementation Changes
File:
R/ppt_classes.Rget_slide_xml_info()public method to retrieve slide XML information for bulk operationsremove_slides_bulk()method to presentation class for handling bulk removal operationsFile:
R/ppt_class_dir_collection.Rremove_slides_bulk()method for efficient collection management