[Tool] GUI for installing and updating mods from GitHub

Morn76
Member
 
Posts: 651
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: 22
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: 651
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: 41
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:
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: 651
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: 41
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: 1535
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
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.
 

EdShouldBeInBed
Member
 
Posts: 41
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: 651
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:

Code: Select all
# cp gitsync.png /usr/share/icons/
# cp gitsync.desktop /usr/share/applications/

and then as a normal user:

Code: Select all
$ cp gitsync ~/bin
$ gedit ~/bin/gitsync

to set the correct path in the script.
 

EdShouldBeInBed
Member
 
Posts: 41
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: 651
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: 41
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: 651
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. :-)
 

User avatar
Wuzzy
Member
 
Posts: 2700
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Wed Aug 02, 2017 02:25

The GUI is unusable on my GNU/Linux machine:

Image

The scrollbar is tiny and there's a font which is white on light blue.
I use Python 3.6.1
I'm creating MineClone 2, a Minecraft clone for Minetest. I made the Help modpack, adding in-game help to Minetest.
 

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

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

by Morn76 » Wed Aug 02, 2017 09:58

Wuzzy wrote:The scrollbar is tiny and there's a font which is white on light blue.
I use Python 3.6.1

Yes, I have not tested this with a dark theme like Breeze Dark. But I have added a flag on line 16 in gitsync.py, maybe you could try setting that to False. Then the listbox should no longer be light blue.
Code: Select all
colors = True   # use custom colors for listbox

It would be nice if a dark GUI theme could be automatically detected from Python somehow. Are you using KDE or GNOME?

As for the scrollbar, I don't think how wide it is can be controlled from Python; it's entirely up to the toolkit. I hope you realize you can click inside the bar anywhere above or below the handle to scroll. No need to try to grab the tiny proportional "elevator" scrollbar handle.
 

User avatar
Wuzzy
Member
 
Posts: 2700
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Wed Aug 02, 2017 10:52

OK, the colors are now less weird. Does this program use the system GUI defaults or does it set everything explicitly?

If it's the former, then it's my fault.
I'm creating MineClone 2, a Minecraft clone for Minetest. I made the Help modpack, adding in-game help to Minetest.
 

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

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

by Morn76 » Wed Aug 02, 2017 11:01

Wuzzy wrote:OK, the colors are now less weird. Does this program use the system GUI defaults or does it set everything explicitly?

If it's the former, then it's my fault.

Apart from that listbox styling with the blue background, it uses the system defaults.
 

Previous

Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 2 guests