[Tool] GUI for installing and updating mods from GitHub

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Mon Sep 05, 2016 22:10

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.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Mon Sep 05, 2016 22:28

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
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Mon Sep 05, 2016 22:37

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?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Mon Sep 05, 2016 23:23

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
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Wed Sep 07, 2016 11:13

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".
 

izzyb
Member
 
Posts: 21
Joined: Thu May 07, 2015 22:41

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

by izzyb » Fri Sep 09, 2016 03:21

Awesome! Thanks. I'll check it out now.
 

izzyb
Member
 
Posts: 21
Joined: Thu May 07, 2015 22:41

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

by izzyb » Sun Sep 11, 2016 03:34

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.
 

izzyb
Member
 
Posts: 21
Joined: Thu May 07, 2015 22:41

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

by izzyb » Sun Sep 11, 2016 04:30

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
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sun Sep 11, 2016 12:37

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.
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

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

by TheReaperKing » Sun Sep 11, 2016 13:29

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?
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sun Sep 11, 2016 14:52

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. :-)
 

izzyb
Member
 
Posts: 21
Joined: Thu May 07, 2015 22:41

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

by izzyb » Sun Sep 11, 2016 19:00

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. :)
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Mon Sep 12, 2016 09:40

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.
 

EdShouldBeInBed
Member
 
Posts: 36
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

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

by EdShouldBeInBed » Sat Sep 17, 2016 20:32

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...
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sat Sep 17, 2016 23:21

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
 

EdShouldBeInBed
Member
 
Posts: 36
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

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

by EdShouldBeInBed » Sun Sep 18, 2016 12:48

... 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.)
Last edited by EdShouldBeInBed on Sun Sep 18, 2016 13:30, edited 1 time in total.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

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

by ExeterDad » Sun Sep 18, 2016 12:56

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.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

EdShouldBeInBed
Member
 
Posts: 36
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

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

by EdShouldBeInBed » Sun Sep 18, 2016 13:31

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.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sun Sep 18, 2016 15:00

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.
 

EdShouldBeInBed
Member
 
Posts: 36
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

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

by EdShouldBeInBed » Thu Mar 16, 2017 12:53

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.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sat Mar 18, 2017 19:34

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.
 

EdShouldBeInBed
Member
 
Posts: 36
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

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

by EdShouldBeInBed » Sat Mar 18, 2017 20:01

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.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

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

by Morn76 » Sun Mar 19, 2017 13:09

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. :-)
 

Previous

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 3 guests

cron