Giter VIP home page Giter VIP logo

discurses's People

Contributors

ge0 avatar glitchassassin avatar ibpx avatar radek-sprta avatar shrx avatar snixon avatar snus-kin avatar southclaws avatar tkerdonc avatar topisani 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  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

discurses's Issues

Chat and User lists fail to render under certain conditions

Discurses Version: 0.3.3

When in the server panel, and the Space button is pressed the channel list is shown. However if you press Space again on a channel, chat messages and the user list are wiped and will not be shown again no matter what is done. The message bar still switches. Pressing Enter works as intended, however Space causes this bug.

Let me know if you need more information. Thanks!

No PM's

Yup, pretty self explanitory, i gotta fix that

Error when installing with pip3.6 or python 3.6 -m pip

I'm running
sudo -H pip3.6 install discurses
and I get the error:
File "", line 1, in
File "/tmp/pip-install-gawvt9ev/discurses/setup.py", line 5, in
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'


Command "python setup.py egg_info" failed with error code 1 in /tmp/install/gawvt9ev/discurses/

"Yank" command doesn't do anything?

After selecting a message and pressing Y, it displayed an error saying I needed xclip. Having installed xclip, doing this doesn't change the contents of xclip at all.

Member List not working

I am using i3wm, relying heavily on the alt key. So far as I can tell I have not assigned alt+b to anything, so there should not be any conflicts with other programs. When I use it to try and get the member list, nothing happens. I have tried it in several different places, including chat, server list, etc. So far, I have gotten nothing from alt+b.

Bot testing issue #2

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.

The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.

Crash on Typing event

Steps to reproduce:

  1. Go to a channel
  2. Start typing - a "user is typing" message is displayed
  3. Post typed string (press return) - crash happens

I couldn't select the error message to copy it, so here's a screenshot:

screenshot_2016-10-10_11-14-52

The typed string is still posted.

Crash only happens on some servers, not all.

Channel Name Not Displayed When Server Name is Displayed

When I view the chat history for an entire server as opposed to only a single channel, the channel name of each message is prefixed by the name of the server. This blocks the name of the channel from being visible because of the size.
image

Install-Problems

I just cant get the application started, even after checking all dependencies and similar.
npm should add the command discurses, right?

Attribute Error

Traceback (most recent call last):
File "/usr/local/bin/discurses", line 7, in
from discurses import main
File "/usr/local/lib/python3.5/dist-packages/discurses/init.py", line 1, in
from . import discord
File "/usr/local/lib/python3.5/dist-packages/discurses/discord.py", line 10, in
import discurses.ui as ui
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/init.py", line 10, in
from discurses.ui.chat import ChatWindow
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 15, in
class ChatWindow(urwid.WidgetWrap, HasModal):
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 24, in ChatWindow
class FocusTarget(enum.Enum):
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 25, in FocusTarget
CHANNEL_SELECTOR = enum.auto()
AttributeError: module 'enum' has no attribute 'auto'

I checked my PATH and installed the latest version of Python to no avail.

Gives FileNotFoundError

$ discurses

Gives this error

Traceback (most recent call last):
  File "/usr/bin/discurses", line 11, in <module>
    load_entry_point('discurses==0.2.4', 'console_scripts', 'discurses')()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2302, in load
    return self.resolve()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2308, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.5/site-packages/discurses/__init__.py", line 1, in <module>
    import discurses.discord
  File "/usr/lib/python3.5/site-packages/discurses/discord.py", line 10, in <module>
    import discurses.config as config
  File "/usr/lib/python3.5/site-packages/discurses/config.py", line 10, in <module>
    with open(CONFIG_FILE_PATH, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/nagra/.config/discurses.yaml'

Messages fail to show after hitting enter on a channel you aren't allowed to view.

When you hit the enter key on any channel in any server that you do not have permissions to view, it will wipe all the messages already sent, and the messages that are being sent afterwards. You can still send messages though. I'm not sure if any other people have this problem, but it's been pretty notable to me.

If you need anymore information I'd be glad to provide it.

Login issue

When I added my token to the file, I did the rename and everything and I put the file into ~/.config/ I put it in that folder, not any other folder. I am on mac, and all it says when I type discurses into terminal, is: "Logging in... Hang tight!"
I found the log file, and this is what it contained:

18-08-2017 19:29:39 [INFO] discurses: Now logging!
18-08-2017 19:29:39 [INFO] discurses: Now logging!
18-08-2017 19:29:39 [WARNING] discord.client: PyNaCl is not installed, voice will NOT be supported
18-08-2017 19:29:39 [WARNING] discord.client: PyNaCl is not installed, voice will NOT be supported
18-08-2017 19:29:39 [INFO] discord.client: logging in using static token
18-08-2017 19:29:39 [INFO] discord.client: logging in using static token
18-08-2017 19:29:40 [INFO] discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6
18-08-2017 19:29:40 [INFO] discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6
18-08-2017 19:29:40 [INFO] discord.gateway: sent the identify payload to create the websocket
18-08-2017 19:29:40 [INFO] discord.gateway: sent the identify payload to create the websocket
18-08-2017 19:29:43 [ERROR] asyncio: Task exception was never retrieved
future: <Task finished coro=<ConnectionState._delay_ready() done, defined at /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py:166> exception=AttributeError('_member_count',)>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py", line 180, in _delay_ready
    chunks.extend(self.chunks_needed(server))
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py", line 163, in chunks_needed
    for chunk in range(math.ceil(server._member_count / 1000)):
AttributeError: _member_count
18-08-2017 19:29:54 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:29:54 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse press', 1.0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse press', 1.0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse release', 0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse release', 0, 71, 11)
18-08-2017 19:30:02 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:30:02 [DEBUG] discurses.discord: Running 0 event handlers for on_message

Change command system

Commands should be global, instead of widget specific. Then each widget makes some basic fields avaliable for key/mousepress shortcuts.
A command prompt should also be added.

Example command:
select-send-channel <channel>

Example shortcut
MESSAGE_LIST_ITEM("s"): "select-send-channel %m.channel"

This may be done in direct python instead, but it needs to be configurable.

List index out of range after loading server list

Arch x86_64
discurses from pip

I'm in 27 servers if that makes a difference.

Traceback (most recent call last):        │+ /r/Android: 17                                                                                                              │
  File "/usr/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event                                                                                     │
    yield from getattr(self, event)(*args, **kwargs)lehome: 4                                                                                                            │
  File "/usr/lib/python3.6/site-packages/discurses/discord.py", line 36, in eh                                                                                           │
    f(*args, **kwargs)                    │+ Discord Electronics Server: 16                                                                                              │
  File "/usr/lib/python3.6/site-packages/discurses/ui/message_list.py", line 42, in _on_message                                                                          │
    if message.timestamp.date() != self.list_walker[-1].message.timestamp.date():                                                                                        │
IndexError: list index out of range       │+ Facepunch CD/TG/A: 21                            

"Search" in menus

In menus, especially the channel selector, hitting a letter should jump to the first entry starting with that letter.

Configs

A few things that should be configurable

  • Tab layouts (save your channel/tab layouts)
  • Keymaps, fairly easy, there is already a python file, it should just go in the yaml

Name that movie

Nuthin, huh? Shoot, you don't need a million dollars to do nuthin, man... just take a look at my cousin, man... he's broke and don't do sh*t!

Disabling notifications?

Just got Discurses up and running, I like it. but goodness gracious the notification spam is insane if you're in many servers. Is there any way to disabled the notifications entirely?

localStorage to get token no longer exists.

> localStorage.getItem("token")
Uncaught ReferenceError: localStorage is not defined
    at <anonymous>:1:1
(anonymous) @ VM943:1

Unable to get token for .yaml file, the localStorage function is no longer there.

After launching or trying to launch discurses...

The terminal has no characters, as if you're entering a password into something like sudo. If you open discurses or close it(which doesn't work btw) the terminal accepts input but characters don't show up. An easy fix for this is to run "reset" in the shell. https://askubuntu.com/questions/171449/shell-does-not-show-typed-in-commands-reset-works-but-what-happened?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa Open that link, it explains what I mean.

Cant import Channel from discord

When i try to start discurses i get this error:

➜ discurses
Traceback (most recent call last):
  File "/usr/bin/discurses", line 7, in <module>
    from discurses.__main__ import main
  File "/usr/lib/python3.7/site-packages/discurses/__main__.py", line 1, in <module>
    from . import discord
  File "/usr/lib/python3.7/site-packages/discurses/discord.py", line 7, in <module>
    from discord import Channel, Message
ImportError: cannot import name 'Channel' from 'discord' (/usr/lib/python3.7/site-packages/discord/__init__.py)

Error when switching guilds

Hi! Love the project so far. It's the best from the current discord-cli clients I've used, however I can't seem to switch guilds / servers reliably.

Here's a picture of the error since I can't seem to copy-paste it. The error

 $ python3 --version
Python 3.6.3

Let me know if you'd like any other information!

Token/Config argument

Could an argument be added to specify a login token manually? This would be helpful, since I manage multiple Discord accounts.
I figure it could be implemented with an option like discurses --token="ajsdlkjsdanfkjdsanflsdfb728342836423".
If you're planning on doing more stuff with the "config" file as it currently is, then it'd be most convenient if the token could be overridden, along with another option to manually specify a config file. Thanks in advance, this is the one good custom Discord client I've seen so far, so I'm looking forward to seeing it develop.

Unable to properly run Discurses

Hello,
Installed according to the Readme on my RasPi B+, but when I try running it it returns the following:

Traceback (most recent call last):
  File "/usr/local/bin/discurses", line 9, in <module>
    load_entry_point('discurses==0.3.0', 'console_scripts', 'discurses')()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
  File "/usr/local/lib/python3.4/dist-packages/discurses/__init__.py", line 1, in <module>
    from . import discord
  File "/usr/local/lib/python3.4/dist-packages/discurses/discord.py", line 32
    async def eh(*args, **kwargs):
            ^
SyntaxError: invalid syntax

Can you help?

Font issue when running in Docker container

I am trying to run Discurses in a docker container on Windows. It works fine based on a minimal Ubuntu image but the font is not rendered as expected. Any ideas? Do I need to use a specific font/locale?

image

File upload bugs out if more than one line is used in dialogue

I'm not entirely sure this is what causes the bug, but the filename I was trying to use was
~/import/3ffd2e08ab2741ba9faeab1f1c6c4c894004c048.jpg. Absolute paths didn't work, either, so I think it's the length of the filename which causes the bug.
It might be worth nothing that the normal "File not found!" response doesn't appear if you enter an invalid filename of about the same length.

Notify-send spam

On platforms without notify-send (e.g. macOS), "sh: notify-send: command not found" gets spammed within Discurses.

FileNotFoundError on run

When attempting to start discurses for a first time, I receive this error:

Traceback (most recent call last): File "/usr/bin/discurses", line 7, in <module> from discurses.__main__ import main File "/usr/lib/python3.6/site-packages/discurses/__main__.py", line 1, in <module> from . import discord File "/usr/lib/python3.6/site-packages/discurses/discord.py", line 9, in <module> import discurses.config as config File "/usr/lib/python3.6/site-packages/discurses/config.py", line 10, in <module> with open(CONFIG_FILE_PATH, 'r') as file: FileNotFoundError: [Errno 2] No such file or directory: '/home/piqle/.config/discurses.yaml'

This is a fresh Manjaro i3 install.

Proposed UI Changes

When I first log in, I have a choice of servers and channels. If I select a server, everything works. If I expand the tree and select a specific channel, then pushing the down arrow to switch channels does not work. It only displays the current channel. Alt + s still works to go back though. I am not sure if this is a bug, or if it was intended. At the same time, if I select a server but not a channel at the start, all messages from all channels are shown on one screen, even though I am sending to only one channel. I like this, but again am not sure if it is a bug. (Not sending a picture of that for privacy reasons).
screenshot from 2018-04-02 18-09-57

Installation failure

from @warshanks

So I tried to reinstall and I got this

pip3.6 install discurses
Collecting discurses
  Using cached discurses-0.3.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-swwsrz2u/discurses/setup.py", line 5, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-swwsrz2u/discurses/

The concerned line should not appear in setup.py anyway.

Still, I have no problem while setting up discurses.

New day marker is incorrectly placed

The new day marker in red is not displayed before/after the first message of the day is posted, but is delayed for some messages later. See screenshot:
day marker screenshot

Cant launch discurses after installing from pip Ubuntu ARM

Title pretty much describes it. Ive installed it in an chrooted ubuntu. Cant launch it from terminal, command doesent exist
~/.config> python3 -m discurses /usr/bin/python3: No module named discurses.__main__; 'discurses' is a package and cannot be directly executed

TypeError: '<' not supported between instances of 'NoneType' and 'str'

Hi,

Here is my configuration :

  • Discurses 0.3.3 (latest)
  • Debian 9.4 Stretch (latest)
  • Python 3.6.5 (latest)
  • Pip 10.0.1 (latest)
  • Discord token saved in /root/.config/discurses.yaml

But it doesn't work.

gnoring exception in on_ready                                                                                                               
Traceback (most recent call last):                                                                                                          
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event                                 
    yield from getattr(self, event)(*args, **kwargs)                                                                                        
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/discord.py", line 52, in on_ready                                 
    self.ui.on_ready()                                                                                                                      
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/main.py", line 152, in on_ready                                
    self.set_tab(0)                                                                                                                         
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/main.py", line 137, in set_tab                                 
    self.discord, [], None, name=str(tab + 1)))                                                                                             
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/chat.py", line 46, in __init__                                 
    self.w_server_tree = ServerTree(self)                                                                                                   
  File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/server_tree.py", line 15, in __init__                          
    key=lambda s: s.name):                                                                                                                  
TypeError: '<' not supported between instances of 'NoneType' and 'str'                                                                      

sans titre 3

Could you help me please ?

Thanks !

Forbidden channels

When selecting a server (but no channel), you can send messages (in my case, they show up on the default #general channel) but you don't see any messages in the list (because no channels are selected).

I suggest that if a server is selected, but not a channel, a default channel should be selected for viewing as well as for sending messages.

Thanks for the project!

Typing is almost always on

When I have discurses open, the status bar that displays who is currently typing almost always says that I am typing. It is perfectly accurate for other people, but not for me. When I type a message, it will turn on, and then it will stop at the proper time. Then after a few seconds it will turn itself on again and stay on about 90% of the time the application is open. This makes it display me as currently typing for other people as well.

Allow the use of a proxy

Im trying to run discurses behind a proxy
I tried configuring the https proxy in ubuntu but discurses just crashes

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.