Comments (14)
I'm going to take a shot at adding this feature. I'm new to curses so this might take me a bit of time for learning so if anyone else already has curses experience and wants to take care of this just let me know so I don't continue working on it. :)
from rtv.
Ohh I just started testing/implementing it...
Can I take care of it?
yskmt@77c6d59
from rtv.
Yep no problem.
On Mar 12, 2015, at 18:48, Yusuke Sakamoto [email protected] wrote:
Ohh I just started testing/implementing it...
Can I take care of it?
yskmt/rtv@77c6d59β
Reply to this email directly or view it on GitHub.
from rtv.
OK I implemented add_comment
function. Right now it's only good for a one-line comment, but I am thinking I should create a message box in the middle of screen for commenting. What do you think?
master...yskmt:post-comment
I am also trying to implement add_reply
function too. It seems much more difficult because I need to specify the object that I want to reply to.
from rtv.
I would also try out splitting the screen in half and using the bottom half for the comment. That way you could get away with just a horizontal bar ---------
instead of a full box outline. For add reply, I think you could just select whichever comment the cursor is focused on. Something like
content.get(cursor_position)['object'].add_reply()
Also, don't forget to check if the user is logged in before opening the textbox!
from rtv.
I added the reply
functionality too. Press c
on the submission page and you can post some comment or reply to a comment.
There are a lot of rooms for improvements, such as:
- Better
textbox
for editing comment. - Error handling.
- Prompt to log in if you are not.
- Refresh the page and jump to your comment after you post it.
3 and 4 should be implemented in different functions though.
from rtv.
The comment box now occupies the bottom half of the terminal. However I found a bug in curses
, in which I can only use overwrite-mode for textbox
.
The bug has been reported and patch was suggested, but somehow it has never merged to the core Python.
http://bugs.python.org/issue13051
from rtv.
curses is just full of fun surprises!
from rtv.
Merged in #38
The current textpad has the following limitations:
- Can't resize the window while entering text
- Can't type characters in insert mode (http://bugs.python.org/issue13051)
- Text doesn't scroll up when you reach the end of the textpad.
In the future we may want to look into an alternate solution (not curses) to handle text input for comments.
from rtv.
How about using a temporary text file, and them opening it in your default editor ($EDITOR). The same way git does commit messages. This actually sounds decently easy to implement. And would allow the user to enter the text anyway they want.
Just a thought, might look into writing a pull request for it tomorrow. (I'm going to Boston, so it wouldn't be till late).
from rtv.
Go for it, I think its a cool idea!
from rtv.
I actually started writing some module that is intended to replace curses.textpad
with more functionality such as page scrolling, loading text, refreshing on resize, etc. It is little buggy right now, but I'll let you know if it works out.
https://github.com/yskmt/texteditpad
from rtv.
@yskmt keep me updated on this!
from rtv.
@michael-lazar I might be late on this matter, but take a look on this pull request #49
from rtv.
Related Issues (20)
- add Twitch mime parser HOT 5
- Crash when hitting G on empty thread HOT 1
- RTV development is shutting down HOT 30
- Offering to help with the project HOT 1
- ConnectionError upon first launch
- no confirmation on exit HOT 1
- Program exited with status 127 HOT 1
- When you set $RTV_BROWSER variable to a program with options like "mybrowser -u" it basicly doesn't work HOT 1
- [1.2.7] Where is the configuration option to toggle whether to open web browser links in a new tab or a new window?
- Not being able to view remote image url via iTerm2's imgcat HOT 6
- How do I change it that rtv uses leafpad instead of nano as its default text editor?
- Save option for posts.
- Option to edit a posted comment.
- Where does rtv store the credentials or session/cookie file so I could just take a rtv install to another OS/new install and donβt have to reopen Firefox for allowing the app access?
- Version 1.27.0_1 (from brew) crashed when opening url HOT 5
- Fix incase mpv is not opening anymore
- When pressing < o > key on a reddit post rtv crashes, "Can't pickle local object" HOT 1
- Crash while trying to sign in HOT 1
- Crash while trying to open a submission link HOT 2
- Archiving Github Repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtv.