View Single Post
Old 06-11-2024, 05:05 AM   #1364
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,345
Karma: 7442365
Join Date: Apr 2017
Device: Kobo Mini, Libra Colour & Elipsa; Kindle Paperwhite 3 & 4; iOS apps
Ever take too many screenshots and want a way to batch delete them? I run into this problem often, so I decided to call a script from NM instead of manually deleting the screenshots one by one on my Kobo or using FTP/Telnet to delete the files remotely.

Code:
menu_item:main:Kill Screenshots:cmd_spawn:/mnt/onboard/.adds/scripts/cleanup.sh chain_always:nickel_misc:rescan_books_full
My script has the following line:
Code:
rm /mnt/onboard/screen_*.png
Fairly simple, but I'm immensely pleased with it since it’ll save me time. Are there any Kobo specific problems I should look out for when calling scripts through NM?

And on an unrelated note, is there a way to create a submenu in NM?

Last edited by Cootey; 06-11-2024 at 07:19 AM. Reason: Deleted extraneous part
Cootey is offline   Reply With Quote