Isopolito / gNordVPN-Local

A Gnome extension that shows your VPN status and allows you to control the connection.
GNU General Public License v3.0
18 stars 12 forks source link

Parsing country output fix #97

Closed ReveHavan closed 3 months ago

ReveHavan commented 3 months ago

Added support for nordvpn 3.18.3

Isopolito commented 3 months ago

Hi @ReveHavan , thanks for contributing. I'll test this out as soon as I get some free time and merge it in if everything looks good.

Isopolito commented 3 months ago

Hi @ReveHavan, I'm testing things now. Can you send me some examples of the output that was breaking the cities/country logic that your code fixes. I'd like to play with it a bit locally

ReveHavan commented 3 months ago

Hi @Isopolito, this is the raw output from "nordvpn countries" command.  represents an escape character.

Albania                            Algeria                            Andorra                            Argentina                          Armenia
Australia                          Austria                            Azerbaijan                         Bahamas                            Bangladesh
Belgium                            Belize                             Bermuda                            Bhutan                             Bolivia
Bosnia_And_Herzegovina             Brazil                             Brunei_Darussalam                  Bulgaria                           Cambodia
Canada                             Cayman_Islands                     Chile                              Colombia                           Costa_Rica
Croatia                            Cyprus                             Czech_Republic                     Denmark                            Dominican_Republic
Ecuador                            Egypt                              El_Salvador                        Estonia                            Finland
France                             Georgia                            Germany                            Ghana                              Greece
Greenland                          Guam                               Guatemala                          Honduras                           Hong_Kong
Hungary                            Iceland                            India                              Indonesia                          Ireland
Isle_Of_Man                        Israel                             Italy                              Jamaica                            Japan
Jersey                             Kazakhstan                         Kenya                              Lao_Peoples_Democratic_Republic    Latvia
Lebanon                            Liechtenstein                      Lithuania                          Luxembourg                         Malaysia
Malta                              Mexico                             Moldova                            Monaco                             Mongolia
Montenegro                         Morocco                            Myanmar                            Nepal                              Netherlands
New_Zealand                        Nigeria                            North_Macedonia                    Norway                             Pakistan
Panama                             Papua_New_Guinea                   Paraguay                           Peru                               Philippines
Poland                             Portugal                           Puerto_Rico                        Romania                            Serbia
Singapore                          Slovakia                           Slovenia                           South_Africa                       South_Korea
Spain                              Sri_Lanka                          Sweden                             Switzerland                        Taiwan
Thailand                           Trinidad_And_Tobago                Turkey                             Ukraine                            United_Arab_Emirates
United_Kingdom                     United_States                      Uruguay                            Uzbekistan                         Venezuela
Vietnam

* Virtual location servers

output.txt

Isopolito commented 3 months ago

got it @ReveHavan , thanks!