Page 4 of 4

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Mon Sep 05, 2016 22:10
by Morn76
So far it only checks during updates (because this is where the bug was reported), but maybe it could check before installing too. I check the list (https://github.com/mdoege/gitsync-devel ... ck_urls.py) from time to time too of course, but still. I also would like to update votes for each mod when it is selected, but I'd have to ask Krock how that would work. So far I can only fetch the JSON for all mods.

Deleting repos from the app is a bit dangerous. Mod developers have their development mods (that are not necessarily pushed to GitHub) in that folder, so there is a danger that valuable work could get lost by accident. Forum users tend to be mod developers too and I do not want to cause data loss. Once an app can delete stuff, sooner or later it will delete the wrong thing. I think TheReaperKing had this idea upthread that the author could be part of the folder name, so you can e.g. have different "mobs" mods installed. This might be safer than deleting or replacing.

Highlighting downloaded mods is a good idea. Added to my to-do list.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Mon Sep 05, 2016 22:28
by rubenwardy
TheReaperKing wrote:I noticed the same thing, sometimes the same mod name (and more importantly folder name) but a different mod author. Right at the top it has 3Dplayer and awards as examples. Perhaps especially for folders with the same name the folder could be followed by the name of the repo owner? For example awards(rubenwardy)


There is only one mod called awards. The other is a github fork used by someone to contribute a patch - This list should not contain that fork, at least not by default

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Mon Sep 05, 2016 22:37
by Morn76
rubenwardy wrote:
TheReaperKing wrote:I noticed the same thing, sometimes the same mod name (and more importantly folder name) but a different mod author. Right at the top it has 3Dplayer and awards as examples. Perhaps especially for folders with the same name the folder could be followed by the name of the repo owner? For example awards(rubenwardy)


There is only one mod called awards. The other is a github fork used by someone to contribute a patch - This list should not contain that fork, at least not by default

So I should keep minetest-mods/awards and remove Traxie21/awards, right? What about rubenwardy/awards though?

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Mon Sep 05, 2016 23:23
by rubenwardy
rubenwardy/awards was where the repo originally was before it was moved to minetest-mods. So minetest-mods is the only one that should remain

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Wed Sep 07, 2016 11:13
by Morn76
I have updated the code today: Now mods that are already downloaded are highlighted in the list (prepended with "0>>>", so they are right at the top). Remote repo existence is checked before installing. Also, if a directory name is already taken, the user name is added, so e.g. bacon might be installed as "bacon_by_davisonio".

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Fri Sep 09, 2016 03:21
by izzyb
Awesome! Thanks. I'll check it out now.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 03:34
by izzyb
Thanks for the update. It's working great! :) One thing that would be nice to see in the status line is a count of installed mods. I know you can get it doing an update, but would be nice to see it all the time. I'm up to 295 mods installed and managed by MT-GitSync. :)

Adding the _by_author works out perfectly for my needs! :) I have mods downloading into one directory then create symlinks in .minetest/mods to choose the active version. Working out great! :)

Also loving that you can search the developer name to find all their mods. I'm having trouble getting the mobs_redo mods by tenplus working and see something is wrong with the packages being downloaded. I'll post details once I have it sorted out.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 04:30
by izzyb
Tenplus1's mobs_redo mods

These are the existing entries in the list. They're both bad entries.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Mod Releases • Re: [Mod] Mobs Redo [1.30] [mobs],tenplus1/mobs_animal,https://forum.minetest.net/viewtopic.php?t=9917&p=228759#p228759
Mod Releases • Re: [Mod] Mobs Redo [1.14] [mobs],http://www.github.com/tenplus1,https://forum.minetest.net/viewtopic.php?t=9917&p=185521#p185521


The Main forum link is viewtopic.php?f=11&t=9917
It consists of 4 mods, each with it's on repo. Assuming I Understand everything correctly, Here's how it should look. There's more links there to compatible mobs I'll go through.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Mod Releases • Re: [Mod] Mobs Redo API[1.31][Mobs],tenplus1/mobs_redo,https://forum.minetest.net/viewtopic.php?f=11&t=9917
Mod Releases • Re: [Mod] Mobs Redo Animals (mobs_animal) [1.31][Mobs],tenplus1/mobs_animal,https://forum.minetest.net/viewtopic.php?f=11&t=9917
Mod Releases • Re: [Mod] Mobs Redo Monsters (mobs_monster)[1.31][Mobs],tenplus1/mobs_monster,https://forum.minetest.net/viewtopic.php?f=11&t=9917
Mod Releases • Re: [Mod] Mobs Redo Simple NPC and Trader (mobs_npc)[1.31][Mobs],tenplus1/mobs_npc,https://forum.minetest.net/viewtopic.php?f=11&t=9917

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 12:37
by Morn76
Thanks, izzy, I've updated the code and mod table again. Now the git repo count is shown in the description box.

GitHub really needs to be more like Google Docs and allow editing files directly in the browser. That would make maintaining the mod list collaboratively a lot easier.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 13:29
by TheReaperKing
Can't you? I remember modifying text files before right on the github webpage or do you mean something else? Also maybe putting the mod list in a google doc would work?

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 14:52
by Morn76
Looks like you are correct, ReaperKing: https://help.github.com/articles/editin ... epository/ I've never really paid any attention to that pencil icon on GitHub before. Fascinating!

So I guess izzy if you have a GitHub account I could make you (or anyone else who is interested for that matter) a co-maintainer of the MT-GitSync repo, so you could simply edit the mod list directly. That might be a better workflow than posting change requests in forum posts. :-)

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 11, 2016 19:00
by izzyb
As it turns out, I do indeed have a github account. It's been a while since I've used it, but it's still active and I can log in. The account name is izzyb1234. I'll still post here when I make changes so everyone knows about the changes, and so someone can make sure I'm not screwing anything up. :)

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Mon Sep 12, 2016 09:40
by Morn76
Welcome aboard, izzy; I've sent you a collaborator invite on GitHub. How exciting, I've never done this before. :-)

Right now the .csv reader in gitsync.py is not very error-resilient, e.g. a blank line in the CSV will cause a problem. So the last line in the CSV should not have a return/line feed at the end! Maybe I should add some more checks to the code just in case. But other than that I think editing the CSV should be pretty straightforward.

P.S. Ok, I've added some checks now, so invalid lines in the mod table CSV will be skipped.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sat Sep 17, 2016 20:32
by EdShouldBeInBed
Hey, Morn76.

The only other python program I really have running is Calibre for my ebooks. And it has this nice install script...

I've cloned your git repo, and attempted to run the program with a ./ prefix. Here's what Linux Mint's terminal tells me:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ ./gitsync.py
Traceback (most recent call last):
  File "./gitsync.py", line 439, in <module>
    mkdispnames()
  File "./gitsync.py", line 297, in mkdispnames
    dispmods.append((add_rating(a, b),b,c))
  File "./gitsync.py", line 286, in add_rating
    if y in upstream_urls:
NameError: global name 'upstream_urls' is not defined


So. Can you tell this humble Canadian is doing wrong? I love the idea of this...

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sat Sep 17, 2016 23:21
by Morn76
Hi Ed!

Thanks for reporting; you've simply found a bug in some recently-added functionality that had not been tested properly. Basically, if the mod path in the app points to a directory without git repositories, this crash would happen. I hope I have it fixed now, so please "git pull" and try again.

What is it with Canadians and this thread? I think izzyb is Canadian too. This is starting to resemble a South Park episode where everyone turns Canadian all of a sudden. ;-)

Martin

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 18, 2016 12:48
by EdShouldBeInBed
... as long as I'm not blamed for the bug. :)

Running now. Though I do note, since I had to set the executable bit, I couldn't do a direct clone; it read my local as modified and told me to either stash or merge.

EDIT: You are now among the true prophets of Minetest. I wanted to emulate tenplus1's Xanadu server set up locally, and was set to have HOURS of typing and cloning... and you made it the work of maybe 15 minutes. Hats off, sir.

Now, can anyone give me hints on how to set up a desktop short cut so I don't need to run in terminal? It's in my home directory (I'm the only user of this machine any who.)

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 18, 2016 12:56
by ExeterDad
Morn76 wrote:What is it with Canadians and this thread? I think izzyb is Canadian too. This is starting to resemble a South Park episode where everyone turns Canadian all of a sudden. ;-)

Canadians are cool. They're the only ones that can say "Take off, hoser" properly.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 18, 2016 13:31
by EdShouldBeInBed
ExeterDad wrote:
Morn76 wrote:What is it with Canadians and this thread? I think izzyb is Canadian too. This is starting to resemble a South Park episode where everyone turns Canadian all of a sudden. ;-)

Canadians are cool. They're the only ones that can say "Take off, hoser" properly.


Indeed, good sir. And may I add, censoring myself lightly for the local sense of decorum: F'ing Eh.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Sep 18, 2016 15:00
by Morn76
EdShouldBeInBed wrote:EDIT: You are now among the true prophets of Minetest. I wanted to emulate tenplus1's Xanadu server set up locally, and was set to have HOURS of typing and cloning... and you made it the work of maybe 15 minutes. Hats off, sir.

Thanks a lot! :-)

EdShouldBeInBed wrote:Now, can anyone give me hints on how to set up a desktop short cut so I don't need to run in terminal? It's in my home directory (I'm the only user of this machine any who.)

I've added a desktop file and a shell script to start the app (because it also needs to cd into the proper directory first and I think that is a problem from within a .desktop file).

I could get this to work with:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
# cp gitsync.png /usr/share/icons/
# cp gitsync.desktop /usr/share/applications/

and then as a normal user:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ cp gitsync ~/bin
$ gedit ~/bin/gitsync

to set the correct path in the script.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Thu Mar 16, 2017 12:53
by EdShouldBeInBed
Morn76:
Anyway MT Sync could check if it needs to use --recursive to retrieve submodules from other gits? A few favourites have changed to modpacks with recursive links to their sub mods.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sat Mar 18, 2017 19:34
by Morn76
EdShouldBeInBed wrote:Morn76:
Anyway MT Sync could check if it needs to use --recursive to retrieve submodules from other gits? A few favourites have changed to modpacks with recursive links to their sub mods.

Can you point me to an example mod pack that uses this? I need a test case.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sat Mar 18, 2017 20:01
by EdShouldBeInBed
Morn76 wrote:
EdShouldBeInBed wrote:Morn76:
Anyway MT Sync could check if it needs to use --recursive to retrieve submodules from other gits? A few favourites have changed to modpacks with recursive links to their sub mods.

Can you point me to an example mod pack that uses this? I need a test case.


https://github.com/FaceDeer/castle is one that gives me empty directories when I try to d/l it.

Re: [Tool] GUI for installing and updating mods from GitHub

PostPosted: Sun Mar 19, 2017 13:09
by Morn76
EdShouldBeInBed wrote:https://github.com/FaceDeer/castle is one that gives me empty directories when I try to d/l it.

OK, looks like we can simply always clone with "--recursive" by default, so this is an easy fix. :-)