Page 5 of 5

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

Posted: 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

Posted: 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

Posted: 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

Posted: 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:

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

Posted: 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

Posted: 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

Posted: 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

Posted: 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

Posted: 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:

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.

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

Posted: 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

Posted: 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

Posted: 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

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

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

Posted: Wed Aug 02, 2017 02:25
by Wuzzy
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

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

Posted: Wed Aug 02, 2017 09:58
by Morn76
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.

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

Posted: Wed Aug 02, 2017 10:52
by Wuzzy
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.

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

Posted: Wed Aug 02, 2017 11:01
by Morn76
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.