Simplest-File-Renamer icon indicating copy to clipboard operation
Simplest-File-Renamer copied to clipboard

Support command line arguments

Open leesei opened this issue 4 years ago • 3 comments

So that I can invoke with this in command line:

simplest-file-renamer .

https://stackoverflow.com/questions/30815446/how-to-pass-command-line-argument-in-electron/37656760
https://stackoverflow.com/a/64613200/665507

https://discourse.appimage.org/t/command-line-parameter-transfer/1537/2
https://github.com/AppImage/AppImageKit/issues/917

If time allows I'll create a PR :crossed_fingers:.

leesei avatar Feb 21 '21 06:02 leesei

That's really cool! Thank you for the idea and I hope you open a PR 🤝

whyboris avatar Feb 21 '21 16:02 whyboris

1.0.0 AppImage crashed on my Arch system, could be a change in system's gtk, see here This encourages me to build from source and work on this idea. First of all the 1.0.2 AppImage is working on my system.

The actual code is quite trivial: https://github.com/leesei/Simplest-File-Renamer/commit/e789ea8a97610cdb54d726a58b768eb5d1fa38e2

Caveat:

  • I only tested in AppImage on Linux. I don't know how to pass these parameters to npx electron . --serve, the process.argv.slice() offset is different.
  • Only files are handled, directories are ignored like the UI's file dialog

leesei avatar Mar 12 '22 13:03 leesei

Really cool! Thank you! I will try to find some time in the next month or two to try it out. Meanwhile - please open a PR with your code change so I can merge it in once I test it on my side 🤝

whyboris avatar Mar 12 '22 14:03 whyboris