made project portable, just symlink executable to PATH

master
Master 2020-02-23 02:35:44 -05:00
parent 46ecc8ed04
commit 3725629ada
9 changed files with 5 additions and 6 deletions

BIN
.swp Normal file

Binary file not shown.

View File

@ -3,12 +3,10 @@
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
from rsrc.Scraper import proxylister, searcher
from configparser import ConfigParser
import subprocess
import os
class Config:
def __init__(self, config_file):
@ -98,7 +96,7 @@ class Scallywag:
def __init__(self, configFile):
self.config = Config( configFile )
self.gladefile = "./rsrc/gui/winMain.glade"
self.gladefile = "{0}/rsrc/gui/winMain.glade".format(os.path.dirname(os.path.realpath(__file__)))
self.builder = Gtk.Builder()
self.builder.add_from_file(self.gladefile)
self.builder.connect_signals(self)
@ -134,6 +132,7 @@ class Scallywag:
if __name__ == "__main__":
main = Scallywag("config.ini")
parent_dir = os.path.dirname(os.path.realpath(__file__))
main = Scallywag("{0}/config.ini".format(parent_dir))
Gtk.main()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -71,7 +71,7 @@ class Scraper:
results_buffer = list()
for tr in resultsTable_xpath:
title = tr.xpath('td[2]/div[1]/a[1]/text()')[0]
title = tr.xpath('td[2]/div[1]/a[1]/text()')
seeders = tr.xpath('td[3]/text()')[0]
leechers = tr.xpath('td[4]/text()')[0]
author = tr.xpath('td[2]/font/a/text()')