Skip to content
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

Support command line arguments #20

Open
leesei opened this issue Feb 21, 2021 · 3 comments
Open

Support command line arguments #20

leesei opened this issue Feb 21, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@leesei
Copy link

leesei commented Feb 21, 2021

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
AppImage/AppImageKit#917

If time allows I'll create a PR 🤞.

@whyboris
Copy link
Owner

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

@whyboris whyboris added the enhancement New feature or request label Feb 21, 2021
@leesei
Copy link
Author

leesei commented Mar 12, 2022

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:
leesei@e789ea8

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

@whyboris
Copy link
Owner

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 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants