This commit changes the functionality of the Content class (and its
subclasses) by removing the text from the comments and score fields of
Reddit data dictionaries created by Content.strip*. data['comments'] is
now an integer, but data['score'] remains a string to preserve using '-'
when the score is hidden.
It is now the responsibility of wherever this data is used to provide
the extra text that these variables used to include, and modifications
have been made to the Submission and Subreddit classes to preserve the
previous way the data was displayed.
Tests modified to expect these changes.
SubredditPage._draw_item_format now explicitly converts everything it
prints to a string. This fixes crashing on Redditor pages when the
Redditor object was split() before converting it to a string. Modified
variable names to reflect different types.
New test function for the new SubredditPage._url_str() function added to
test_subreddit.py. Being able to see the information this specifier adds
makes it trivial to tell if a post is a Reddit crosspost from a
SubredditPage (more trivial than manually parsing a full URL from %U,
anyway).
Most notably, test functions for _submission_attr, _url_attr, _gold_str,
and _create_format have been added. The constructor test has been
modified into two functions that test the default view and nondefault
views.
Users can now specify a format string in their config file that
determines the internal layout of subwindows of a SubredditPage. The
config string is passed to SubredditPage._create_format(), and internal
details can be found in its docstring. SubredditPage._draw_item_format()
then draws the format produced by SubredditPage._create_format().
With this addition, simplication could be made with the compact format.
Instead of its own dedicated draw function, it now uses
_draw_item_format() with a format that produces the same result as
_draw_item_compact(). With this, _draw_item_compact() will be removed
as its functionality has been replaced.
If the user specifies a look_and_feel and a subreddit_format in their
config, the latter overrides the formatting of the former.
Relevant to #3
This includes Alex Jarmoszuk's telnet/ssh RTV test, as TUIR is not RTV;
and the package manager installation section, as TUIR is not in any
distribution repositories.
Add config item clipboard_cmd, with a default of 'pbcopy w' on Darwin
and 'xclip' on everything else. This will allow the user to use any
command for the clipboard, including 'wl-copy' for Wayland (addressing
issue #693 on Github). With his change, significant simplifications
could be made to clipboard.py - the copy_*() functions have been removed
and combined into copy().
With this simplification, the old OSX test is obsolete, and new OSX
tests are needed (need a way to simulate sys.platform).