aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-24 16:18:03 -0500
committerBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-24 16:18:03 -0500
commit86e91102ebe676a989f27784057002bd664805b0 (patch)
tree414c574db80d95b1a87ae0fbadf91cf504b07335
parent10a65c2d7c507c77495f9d99d59436065e17f5a9 (diff)
downloadbbj-86e91102ebe676a989f27784057002bd664805b0.tar.gz
add [dim] to help text; change format help dimensions
-rw-r--r--clients/urwid/main.py9
-rw-r--r--src/formatting.py1
2 files changed, 6 insertions, 4 deletions
diff --git a/clients/urwid/main.py b/clients/urwid/main.py
index 4b0e934..c1b2af0 100644
--- a/clients/urwid/main.py
+++ b/clients/urwid/main.py
@@ -97,7 +97,7 @@ format_help = [
"[red: Colors, Bold, Underline & Expressions]",
"You can use [rainbow: rainbow], [red: red], [yellow: yellow], [green: green], "
- "[blue: blue], [cyan: cyan], [magenta: and magenta], **bold**, and __underline__ "
+ "[blue: blue], [cyan: cyan], [magenta: and magenta], [dim: dim], **bold**, and __underline__ "
"inside of your posts. \**bold works like this\**, \__and underlines like this\__. "
"You can escape these expressions \\\**like this\\\**. They can span up to the full width "
"of the same line. They are best used on shorter phrases. "
@@ -118,7 +118,7 @@ format_help = [
"not a directive. [red this will pass too] because the colon is missing.",
"The following directives may be used in this form: red, yellow, green, blue, cyan, "
- "magenta, bold, underline, and rainbow. Nesting expressions into eachother will "
+ "magenta, bold, underline, dim, and rainbow. Nesting expressions into eachother will "
"override the parent directives until the innermost expression closes. Thus, nesting "
"is valid but doesn't produce layered results on the command line client.",
@@ -950,12 +950,13 @@ class App(object):
**frame_theme()
)
+ v = 25 if self.window_split else 50
app.loop.widget = urwid.Overlay(
widget, app.loop.widget,
align=("relative", 50),
- valign=("relative", 50),
+ valign=("relative", v),
width=app.prefs["max_text_width"],
- height=("relative", 60)
+ height=("relative", v)
)
diff --git a/src/formatting.py b/src/formatting.py
index a3eb73d..0a50d3f 100644
--- a/src/formatting.py
+++ b/src/formatting.py
@@ -81,6 +81,7 @@ underline = re.compile(r"(?<!\\)_{2}(.+?)(?<!\\)_{2}")
escapes = re.compile(r"\\([*_]{2})")
+
def apply_directives(text):
# is there a better way to do this? smh....
text = quotes.sub(lambda m: "[quote: %s]" % m.group(1), text)
Un proyecto texto-plano.xyz