Closed ghost closed 8 years ago
Hi, thanks for the ping ! I'm very glad someone else found this script useful. I can see very valid stuff in your code (that I should have done at the time!). Does something make it specific to Mageia ? The configuration files look the same aren't they ?
And do you think this script would benefit from a pypi package ? I guess so, it'll be much simpler to test. Also, we can put many stuff in a settings file (the default dns, the test ips, all the globals nearly).
bye !
ps: if you carry on working on your version, would you use an online version control system, so than I can track your changes and eventually discuss code ? Ok if you don't use github, what about gitlab.com ?
On 02/10/2016 01:28 PM, vindarel wrote:
Hi, thanks for the ping ! I'm very glad someone else found this script useful.
Hi, your script is very interesting but in mageia don't works so I modified it.
I can see very valid stuff in your code (that I should have done at the time!). Does something make it specific to Mageia ? The configuration files look the same aren't they ?
It is specific of my configuration ad to mageia. I have a 3G router that is on line in asynchronous way and i have the script execute in rc.local as root (/etc/rc.d/rc.local) so the two machine (pc and router) are asynchronous.
I don't understand what you means with configuration file: sorry I'm a basic coder.
Then I think is better to get the DNS ip from openNIC directly from the API, I think some details of the web page is changed from the while so the code lines that grab IP's don't works. It is the main lack in your code: web page changes and API don't change.
And do you think this script would benefit from a pypi package ? I guess so, it'll be much simpler to test. Also, we can put many stuff in a settings file (the default dns, the test ips, all the globals nearly).
I agree but I know nothing about pypi. I have googled and it is like a specific python repository.
ps: if you carry on working on your version, would you use an online version control system, so than I can track your changes and eventually discuss code ? Ok if you don't use github, what about gitlab.com ?
I'm a basic coders and I have not already used version control system. Maybe it time to learn a new thing! In these days I'm sick but in the next I start to learn something. I put the code in whatever VCS you like, it is my first code in VCS. If you use github it is ok for me.
Sorry for my english, bye :)
Sandro kensan www.kensan.it & www.qiqi.it geek site Saluto gli agenti della NSA - Hello NSA - www.nsa.gov
Hey, the api (https://api.opennicproject.org/geoip/?jsonp&res=1&ip=&nearest) is exactly what we need ! Can you point me to its documentation ?
On 02/22/2016 04:04 PM, vindarel wrote:
Hey, the api (https://api.opennicproject.org/geoip/?jsonp&res=1&ip=&nearest) is exactly what we need ! Can you point me to its documentation ?
Sorry, I have read (grab) the API link in the source web page of OpenNIC. I suppose there is a web page that explain how it works but I
Sandro kensan www.kensan.it & www.qiqi.it geek site Saluto gli agenti della NSA - Hello NSA - www.nsa.gov
Well done then ! I asked on IRC: https://api.opennicproject.org/geoip/?help
On 02/22/2016 04:23 PM, vindarel wrote:
Well done then !
:)
I asked on IRC: https://api.opennicproject.org/geoip/?help
I put my code in github in the next days. Can I to fork your project or must I to create a new project? (Sorry It is my first public project)
Sandro kensan www.kensan.it & www.qiqi.it geek site Saluto gli agenti della NSA - Hello NSA - www.nsa.gov
The goal of forking is to interact on a project. If you fork, you'll be able to take my future commits (easily), and to suggest your new developments (and that would be great !). If you do not fork, it's still doable because we work with git projects after all, but we won't benefit from github's features. I think it's good if: 1- you fork 2- you erase opennic-set.py with your code 3- you press the button "pull request" (on my repo) and we speak about that.
That said, I prefer to use free-libre software when possible (I believe you do as well given the website I saw), so I suggest we rather use gitlab. That's where I do all my dev. I cloned this repo, we even see this issue. I'll leave this repo untouched, for better reference.
(glad to help ! I was new not so long ago)
We carry on on gitlab ! https://gitlab.com/vindarel/open-nic/issues/2
Hi @vindarel , this is my version of your code, it works fine in mageia3: http://www.kensan.it/tmp/opennic-set.py It is an update of yours. It is my first coding in python so excuse any style errors.
Kind regards, Sandro.