Giter Site home page Giter Site logo

lcurse's Introduction

lcurse

Python script to have a "curse" compatible client for linux

lcurse nowadays supports git repositories too. As git repos aren't structured the same, you will most probably need to create an link via "ln -s source destination" inside the wow/Interface/Addons folder. But at least the update is then done via the usuall lcurse way.

Requirements

  • python 3.6
  • pipenv
  • PyQt5
  • bs4
  • cfscrape
  • lxml

All requirements can be installed with:

pipenv install

Running

Simply:

pipenv run ./lcurse

Unattended mode

You may also run lcurse in "unattended mode" once you have set it up. This will update all your addons and then exit. Use

pipenv run ./lcurse --auto-update

lcurse's People

Contributors

alar77 avatar boombatower avatar cameronjphillips avatar delroth avatar ephraim avatar imdevinc avatar mathyv avatar nicdumz avatar oneofone avatar philmore971 avatar purplestephyr avatar seirl avatar shinnova avatar sunaurus avatar timwienk avatar zerodogg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lcurse's Issues

Fedora

Hello, I love the program. I am just having trouble installing this on fedora 25. I think it may be a problem with the naming structure of fedora vs ubuntu? I have installed all the dependencies, but it keeps complaining about not having PyQt5. I think fedora may call it "python-qt5". Is there any way to fix this?

lcurse doesn't seem to be working for me..

..I'm running xubuntu 14.10 with crossover installed so therefore my addons are located under my homedir /.cxoffice/WorldofWarcraft/drive c/Program Files/World of Warcraft end that path is reflect as such under lcurse preference as my install directory. I've copied over a few days old worth of addons in the AddOns directory and attempted to click on Update Catalog.. I'm not seeing any addons listed at all. If I click on update all addons, it just hangs terminally searching.. Help?

steorra

Version Française

Une version de lcurse complète et fonctionnelle en français est disponible sur la branche fork :
A complete and functional version of the French version is available on the Fork branch:
[(https://github.com/Philmore971/lcurse)]
La version de référence reste la branche principale :
The reference version remains the main branch:
[https://github.com/ephraim/lcurse/]

L'objectif final est la disparition de cette branche quand l'extension de la traduction fr_FR.ts prendra en compte l'ensemble de l'application.
The ultimate goal is the disappearance of this branch when the extension of the fr_FR.ts translation will take into account the entire application.

Stuck updating

On my initial start of lcurse, I clicked update catalog. This got stuck at 46%, I then restarted pc etc, still stuck at 46%. I then just cancelled it, imported my addons, and upon clicking update all addons, the "Verifying which addons need to be updated" also got stuck at 46%.

Freezes on update addons

When using either update addon or update all addons I get the following error message in terminal:

Unhandled exception in thread started by <bound method CheckDlg.startWorkerThreads of <waitdlg.CheckDlg object at 0x7f85c62d8ee8>>
    Traceback (most recent call last):
       File "/home/alex/lcurse/modules/waitdlg.py", line 62, in startWorkerThreads
      thread.checkFinished.connect(self.onCheckFinished)
TypeError: decorated slot has no signature compatible with CheckWorker.checkFinished[QVariant, bool, QVariant]

Error update catalog

Error after update catalog command
python --version
Python 3.6.6
same pb with : Python 3.7.0
same pb with : pipenv run ./lcurse
same pb with the fork Alar : https://github.com/alarofrunetotem/lcurse

Traceback (most recent call last):
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 424, in run
self.retrieveListOfAddons()
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 414, in retrieveListOfAddons
lastpage = self.retrievePartialListOfAddons(page)
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 401, in retrievePartialListOfAddons
href=link.get("href").replace("/download",'')
AttributeError: 'NoneType' object has no attribute 'replace'
Abandon (core dumped)

Won't update The Undermine Journal

Probably due to the reported version:

lcurse_undermine

This addon updates twice a week with fresh market data. The actual curse client doesn't seem to have an issue, so perhaps there's something in the manifest you can check?

IndexError

This looks like a great script, but I can't get it to run "Update Catalog" without either crashing or perpetually displaying the load bar associated with said function. Python3 with pyqt5 is installed.

Bash spits out these errors:
WARNING: gui translation file could not be found: /opt/lcurse/translations/en_US.qm
Traceback (most recent call last):
File "/opt/lcurse/modules/waitdlg.py", line 252, in run
self.retrieveListOfAddons()
File "/opt/lcurse/modules/waitdlg.py", line 242, in retrieveListOfAddons
lastpage = self.retrievePartialListOfAddons(page)
File "/opt/lcurse/modules/waitdlg.py", line 225, in retrievePartialListOfAddons
lastpage = self.parsePager(pager[0].string)
IndexError: list index out of range
Traceback (most recent call last):
File "/opt/lcurse/modules/application.py", line 319, in addAddon
url = [ item[1] for item in self.availableAddons if item[0] == name ][0]

Sort function

Only some addons get imported in lcurse, the rest have to be added manually. If you use many addons you'll loose track of which addons are already there and which are not. Same if you want to remove an addon. It would be really great to be able to sort the list of addons alphabetically.

Ah and not to forget: Great that you made this tool. Thank you!

Possible error with Unicode characters

Since installing the addon "ElvUI Aura Bars Mover". I am unable to use Import function.

Traceback (most recent call last):
  File "/home/[REDACTED]/git/lcurse/modules/application.py", line 249, in importAddons
    tmp = self.extractAddonMetadataFromTOC(toc)
  File "/home/[REDACTED]/git/lcurse/modules/application.py", line 195, in extractAddonMetadataFromTOC
    line = f.readline()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 183: invalid continuation byte
[1]    8117 abort      lcurse

Trying to remove this addon using lcurse also gives a similar error;

Traceback (most recent call last):
  File "/home/[REDACTED]/git/lcurse/modules/application.py", line 372, in removeAddon
    tmp = self.extractAddonMetadataFromTOC(toc)
  File "/home/[REDACTED]/git/lcurse/modules/application.py", line 195, in extractAddonMetadataFromTOC
    line = f.readline()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 183: invalid continuation byte
[1]    8228 abort      lcurse

I have manually removed this addon from my Interface/Addons directory and this fixes the issue.
The contents of the ElvUI_AuraBarsMovers.toc file are:

## Interface: 70000
## Title: |cff1784d1ElvUI |rAura Bars Mover
## Author: Darth Predator
## Version: 1.25
## Notes: Moveble unit aura bars for |cff1784d1ElvUI|r.
## Notes-ruRU: Âîçìîæíîòü ïåðåìåùåíèÿ ïîëîñ àóð â |cff1784d1ElvUI|r.
## eMail: [email protected]
## URL: 
## RequiredDeps: ElvUI
## OptionalDeps: ElvUI_SLE
## DefaultState: Enabled

LibElvUIPlugin-1.0\locales\load_locales.xml
LibElvUIPlugin-1.0\LibElvUIPlugin-1.0.lua
core.lua
options.lua


## X-Tukui-ProjectID: 76
## X-Tukui-ProjectFolders: ElvUI_AuraBarsMovers

Not sure if this is an issue with lcurse or my computer, in the case it may be the latter it's probably worth noting I have always received this error on launch but until this time have had no problems from it:

WARNING: gui translation file could not be found: /home/[REDACTED]/git/lcurse/translations/en_NZ.qm

Add compatibility for pure command-line use?

Hello!

It would be wonderful to have support for pure command-line use (for those of us who dislike buttons and stuff).

I'll start fiddling with this on my own repo, but I'd like to leave this issue open in case anyone else (that actually know what they are doing) wants to help out :)

Sometimes lcurse downloads "nolib" version which means the addon needs extra libs and doesn't work

Sometimes lcurse downloads "nolib" version for some addons, which means the addon needs extra libs and doesn't work.

Some addons have two versions: one includes the libraries required for the addon to run and another version which doesn't need this. Sometimes, the "nolib" version is listed as the latest version - here's an example: http://www.curse.com/addons/wow/tradeskill-master#t1:other-downloads - and if this version is installed, it doesn't work.

One way of fixing this would be to exclude "nolib" versions automatically (but maybe implement an option to allow installing/updating such addons?).

Cannot update addon if filename has a space

As title say, if the download redirect goes to a filename with a space, the client fails to update the addon with the error (in console): Could not open $filename , retrying...5 times, ending with HTTP Error 400: Bad Request.

I fixed the issue by adding a line at line 171 in waitdlg.py:
downloadLink = re.sub(r" ", "%20", downloadLink)
right below:
downloadLink = soup.select(".download-link")[0].get('data-href')

Better addon recognition

When having a addon called for example "BindPad" (folder name "bindpad") the program will ask curse for a addon called "bindpad" but when it really is "bind-pad".
I think, - if the result is a 404 on the addon, there should be a fall-back method which checks the addon name seperated with a dash.

-- This is not trivial I think (without reading any file I guess? (Which could make this clear)) --

Can't remove addon unless Name cell is selected

If I select an addon by clicking on the URL or version cells and then then from the menu I select "Remove addon", the addon is not removed. This only works if I select the "Name" cell.

Also, why not remove the addon folder when selecting to remove an addon from lcurse, instead of only removing it from lcurse?

Create some tags/releases

Any chance for tags/releases? Perhaps using semver? Doesn't need be anything fancy, but then there are release tarballs and a common starting point for bugs.

Curse/Twitch

Now that curse and twitch have merged, I think the addon urls are not working. when i run, I get a screen full of red, on the addon list, with failures to find the url in my terminal

Does not create "~/.lcurse" folder automatically

lcurse doesn't create the ~/.lcurse folder automatically which makes the app fail. For instance, this error was displayed after selecting "Update Catalog" on a fresh installation:

Traceback (most recent call last):
  File "/home/andrei/lcurse-master/modules/application.py", line 399, in onUpdateCatalogFinished
    with open(defines.LCURSE_ADDON_CATALOG, "w") as c:
FileNotFoundError: [Errno 2] No such file or directory: '/home/andrei/.lcurse/addon-catalog.json'

Pypi package

Hi!

I think this package should be on pypi for easier installation. You could read this guide if you are unsure about how to get it there.

Update catalog gets stuck at 96%

Is it maybe linked to the HTTP 523 errors I see in the logs?

Unhandled exception in thread started by <bound method UpdateCatalogWorker.retrievePartialListOfAddons of <waitdlg.UpdateCatalogWorker object at 0x7f9e2ddfdc18>>
Traceback (most recent call last):
  File "/opt/lcurse/modules/waitdlg.py", line 294, in retrievePartialListOfAddons
    response = self.opener.open("http://www.curse.com/addons/wow?page=%d" % (page))
  File "/usr/lib/python3.4/urllib/request.py", line 470, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 580, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 502, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 442, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 685, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 470, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 580, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 508, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 442, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 588, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 523: Origin Unreachable

Python 3 requirement

Please mention the requirement of Python 3 in the README.

I had a virtualenv all set up with a hand built sip and PyQt5 for Python 2.7 on Ubuntu 14.04 before I realized why lcurse couldn't import from the PyQt5 module: I had done everything for Python 2 instead of Python 3. :)

Updating addons hangs at 99%

Update check hangs at 99% until I kill the process. Even if starting from terminal lcurse doesn't print debugging output anymore (it did last year, so I'm wondering why). It's probably an abandoned addon but with 50+ addons I can't find the culprit. It would be good if errors like these would be caught, lcurse should give up with a message indicating the misconfigured or removed addon.

I tried console.py with the same result, no messages, but hangs after around 25%. Is there any way I can force it to be more verbose? Wasn't there a log file somewhere? The last log I can find is from Jan 17.

Python 3.7

Python 3.7 was released a couple weeks ago and in my testing thus far, lcurse has not broken. All that is needed is to change the 3.6 to a 3.7 in the Pipfile. I will continue to watch for issues, but I was wondering if this will be officially making the version jump.

Mise à jour Version Française

Suite à la modification de la structure du site : https://www.curseforge.com/wow/addons
La mise à jour du catalogue, ainsi que la mise à jour des addons par téléchargement sont de nouveau fonctionnelles sur la version française.
[https://github.com/Philmore971/lcurse]
J'ai fait proposition de mes modifications sur la branche principale, mais il semble que la mise à jour n'a pas été testée, évaluée et répercutée sur la branche principale.

Right clicking window causes crash.

Traceback (most recent call last):
  File "/home/polygon/lcurse/modules/application.py", line 36, in contextMenuEvent
    name=self.item(row,0).text()
AttributeError: 'NoneType' object has no attribute 'text'
Aborted (core dumped)

Code style

  • PEP8 suggests using spaces instead of tabs for indentation.
  • For string formatting, str.format() is the preferred way (instead of using %).

Would you be interested in a PR to fix either or both of these?

Fix crash when updating all plugins (result acccessed before it was defined)

diff --git a/modules/waitdlg.py b/modules/waitdlg.py
index 69bb362..710aa39 100644
--- a/modules/waitdlg.py
+++ b/modules/waitdlg.py
@@ -141,11 +141,17 @@ class CheckWorker(Qt.QThread):
                return (False, None)

        def run(self):
+               result = None
+
                if self.addon[2].startswith("http://www.curse.com"):
                        result = self.needsUpdateCurse()
                elif self.addon[2].endswith(".git"):
                        result = self.needsUpdateGit()
-               self.checkFinished.emit(self.addon, result[0], result[1])
+
+               if result != None:
+                       self.checkFinished.emit(self.addon, result[0], result[1])
+               else:
+                       self.checkFinished.emit(self.addon, False, False)

 class UpdateDlg(Qt.QDialog):
        updateFinished = Qt.pyqtSignal(Qt.QVariant, bool)

Randomly installs classic versions

Using the latest version of lcurse it is randomly chosing to install "classic" versions of mods rather than the live versions. It has done this to, among others, AdvancedInterfaceOptions, DBM Voicepack VEM, Details! Damage Meter, GTFO and Prat 3.0

Issue with PyQt5

Complete newb to Python. Been using lcurse for a while and I installed Python (3?) to learn more and broke lcurse I now get the following error:

sprice@xfce:~/Desktop$ lcurse
Traceback (most recent call last):
File "/usr/bin/lcurse", line 8, in
from PyQt5 import Qt
ModuleNotFoundError: No module named 'PyQt5'

sprice@xfce:~/Desktop$ pip3 install PyQt5
Requirement already satisfied: PyQt5 in /home/sprice/.local/lib/python3.5/site-packages
Requirement already satisfied: sip<4.20,>=4.19.4 in /home/sprice/.local/lib/python3.5/site-packages (from PyQt5)

sprice@xfce:~/Desktop$

I was wondering if you would be interested in making this work on Windows.

I was able to get it up and running on Windows by installing the requirements. It fails when I click import addons with a charmap error which seems like it would be simple to fix. My coding is limited though so i'm not sure how to fix it. Also, if I remove some addon it seems to work but I think it would be related to how many are in the addons folder.

pip install bs4
pip -m install "C:\Path\to\file\lxml-3.6.4-cp35-cp35m-win32.whl" lxml-3.6.4-cp35-cp35m-win32.whl
pip install PyQt5
python lcurse

lcurse

errors

"Update catalog" hangs

Version from 2015 had the following error:
$ lcurse Traceback (most recent call last): File "/opt/lcurse/modules/waitdlg.py", line 252, in run self.retrieveListOfAddons() File "/opt/lcurse/modules/waitdlg.py", line 242, in retrieveListOfAddons lastpage = self.retrievePartialListOfAddons(page) File "/opt/lcurse/modules/waitdlg.py", line 225, in retrievePartialListOfAddons lastpage = self.parsePager(pager[0].string) IndexError: list index out of range

At least it updated some addons. I installed the latest commit but it is not working at all.

Error with latest commit:
lcurse Opening http://www.curse.com/addons/wow?page=1 Traceback (most recent call last): File "/opt/lcurse/modules/waitdlg.py", line 351, in run self.retrieveListOfAddons() File "/opt/lcurse/modules/waitdlg.py", line 341, in retrieveListOfAddons lastpage = self.retrievePartialListOfAddons(page) File "/opt/lcurse/modules/waitdlg.py", line 318, in retrievePartialListOfAddons soup = BeautifulSoup(response.read(), "lxml") File "/usr/lib/python3/dist-packages/bs4/__init__.py", line 152, in __init__ % ",".join(features)) bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

A search on stackoverflow shows several reports about that error in conjunction with BeautifulSoup. I'm on debian jessie and have libxslt1.1 libxml2. Do I need libxslt1-dev?

Update catalog on initial install?

Thank you so much for making this!

I might be able to send in a PR for this at some point, but what do you think of prompting to do an initial pull of the catalog when you first launch it?

Rescan/Update Addons from Folder

Hello, Great help having this. Thank you so much for making it.
I do have annoyances deleting mods. It would be nice to just manage that definitively by deleting the folders from my /interface directory and have lcurse just re-scan what is in there and remove no-longer existing entries. Is that possible/reasonable?

Thanks

cannot get addon catalog

Hello,
built the git version on arch linux today and it runs, however when i click update catalog, all I get is this in the console:

retrieved list of addons: 0

The selected folder wasn't an installation directory of wow. Please select the wow folder

Hello. I am very new to Linux and I am running into an issue trying to get this to recognize my WoW installation folder.

Installation Path: /home/user/Games/world-of-warcraft/drive_c/Program Files (x86)/World of Warcraft/

Resulting Error: The selected folder wasn't an installation directory of wow.
Please select the wow folder

I am sure it is something simple (such as the linking mentioned in the Read Me) however with all attempts to set up linking and get it to accept this folder as the actual WoW installation folder; I have failed.

Help is greatly appreciated and thank you.

Download link has been modified

The update of the addons was no longer successful. The download link has been modified.
La mise à jour des addons n'aboutit plus. Le lien de téléchargement a été modifié.

Can't change wow folder

When i'm try to change the default wow folder i got the following error

Traceback (most recent call last):
File "/home/fabricio/bin/lcurse/modules/preferences.py", line 48, in browseForWoWFolder
self.wowInstallFolder.setText(dir)
TypeError: QLineEdit.setText(str): argument 1 has unexpected type 'QDir'

python version: 3.4.2

Give fullpath in settings.conf

You should be able to give your full path in settings.conf, instead of this mixing with .wine.
(I for one have WOW not installed in the default .wine folder because of space issues)

Can't Update Addons

Updating the catalog works fine, but I am unable to update any addons. I've tried several versions of lcurse, but I get the same results. When I go to update either a single or all addons, the update dialog shows for a split second. No errors are returned in the GUI or terminal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.