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

Implement full command line interface #46

Open
ghost opened this issue Jul 30, 2020 · 8 comments
Open

Implement full command line interface #46

ghost opened this issue Jul 30, 2020 · 8 comments
Labels
command-line Command line interface enhancement New feature or request good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Jul 30, 2020

Hi,
currently I'm trying to automate the connection to the NordVPN network. Using Google I found your project, which seemed quite useful, so I installed it on my Raspberry Pi (Raspbian Lite). However, on trying to start nordpy it fails and exits with the message that the tkinter package is not present. And there's my question: I want to use nordpy exclusively on the command line, so is it possible to install nordpy without the GUI?

Thanks!

@morpheusthewhite
Copy link
Owner

morpheusthewhite commented Jul 30, 2020

Currently that is not possible, since in order to start the program from command line you need to connect at least once by using the gui.

This is necessary both to store your credentials and preferences.

After this first time yes, you can control it from command line.

@ghost
Copy link
Author

ghost commented Jul 30, 2020

Can you consider implementing asking for those credentials and preferences on the installation process?

@morpheusthewhite
Copy link
Owner

morpheusthewhite commented Jul 30, 2020

Yes, I'll leave this issue open and see if someone else is interested and/or may want to contribute

@morpheusthewhite morpheusthewhite changed the title nordpy on the command line Full command line interface Jul 30, 2020
@morpheusthewhite morpheusthewhite changed the title Full command line interface Implement full command line interface Jul 30, 2020
@morpheusthewhite morpheusthewhite added enhancement New feature or request good first issue Good for newcomers command-line Command line interface labels Jul 30, 2020
@morpheusthewhite
Copy link
Owner

Implementing command line supports means:

  • ask and store credentials from command line
  • ask and store preferences to be used in next command line runs

Optionally also

  • provide arguments to eventually choose preferences (when stored ones needs to be overwritten)

@ghost
Copy link
Author

ghost commented Jul 30, 2020

I'd like to contribute! However, I think I need some time to get into that. Moreover, I haven't contributed to any other repository on GitHub yet, so I'm not familiar with that system.

@morpheusthewhite
Copy link
Owner

I'd like to contribute! However, I think I need some time to get into that. Moreover, I haven't contributed to any other repository on GitHub yet, so I'm not familiar with that system.

I you decide to do so, you can easily find some resources for the web (regarding git and github, which are very simple for what you need) as well as for python (if you need, I suggest the official docs).

Strictly regarding this project, if you need hints about what you need to do don't exitate writing here

@ghost
Copy link
Author

ghost commented Aug 3, 2020

I looked into the code in the last few days. I saw that tkinter is used very widely to control the application.
What do you think about restructuring the whole project, so that the base functionality is served via CLI and Python tools (for example fetching the ovpn.zip via the requests-module) and that the GIU is based upon those CLI?
Also, I would welcome supporting macOS as well.

@morpheusthewhite
Copy link
Owner

I don't think you need to restructure the whole project. Yes, tkinter is very important in the application but some part of it are already tkinter-agnostic, like everything related to connection handling and settings too; on the other hand some other parts like credentials are coupled with gui. You can only to focus on that part, I don't think the rest of the code needs to be changed.

Regarding ovpn.zip as you probably saw the initial population is done via install.sh, which simplifies some things wrt to python since they are mostly operations on the filesystem and dependency installation. (note: python handles ovpn.zip update via requests module, but that function is called in very rare occasions).

I cannot test on macOS so I am not clearly not able to garantee full support for it. Also it wouldn't surprise me it this would not work since it relies on some things which may be different on macOS (I actually don't know, I never used it) like system DNS and iptables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line Command line interface enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant