From 2134a268734b558cffb8f2630dc17d5f8203d69c Mon Sep 17 00:00:00 2001
From: Steve Howell Webathena is the easiest way to use Zulip. With Webathena, you don't need
-to run any software in a screen session. Your Athena password never leaves
-your computer and the only access that any Zulip computer ever receives is the
-ability to send/receive zephyrs as you.
+ Webathena is the easiest way to use Zulip. With Webathena, you don't need
+ to run any software in a screen session. Your Athena password never leaves
+ your computer and the only access that any Zulip computer ever receives is the
+ ability to send/receive zephyrs as you.
+ We recommend that you use Webathena instead of following these instructions.
-Please only follow these instructions if you know that you want to run the zephyr
-mirror script instead of using Webathena.
+ We recommend that you use Webathena instead of following these instructions.
+ Please only follow these instructions if you know that you want to run the zephyr
+ mirror script instead of using Webathena.
+ On an Athena dialup
- (linerva.mit.edu,
- athena.dialup.mit.edu,
- etc.), run the Zephyr mirroring script inside a screen
- session. IMPORTANT: You must keep the Zephyr mirroring script
- always running in a session with unexpired Kerberos
- tickets. The script forwards personals you receive on
- Zephyr to Zulip, and forwards messages you send in Zulip to
- Zephyr. If it is not running, only other Zulip users
- will receive messages you send from Zulip!. The Zulip
- web application will warn you if the Zephyr mirroring script is
- not running.
+ On an Athena dialup
+ (linerva.mit.edu,
+ athena.dialup.mit.edu,
+ etc.), run the Zephyr mirroring script inside a screen
+ session.
+
+
+ IMPORTANT: You must keep the Zephyr mirroring script
+ always running in a session with unexpired Kerberos
+ tickets.
+
+ The script forwards personals you receive on
+ Zephyr to Zulip, and forwards messages you send in Zulip to
+ Zephyr.
+
+ If it is not running, only other Zulip users
+ will receive messages you send from Zulip!
+ .
+ The Zulip web application will warn you if the Zephyr
+ mirroring script is not running.
+ If you already have BarnOwl running in screen/tmux somewhere,
you can just run:The Zephyr mirror script (not recommended)
-Running the Zephyr mirror script
- Running the Zephyr mirror script
-
If you are not already running a screen/tmux for BarnOwl, you - can set up a screen session to run the Zephyr mirroring script by - running the following on a dialup such - as linerva.mit.edu:
- -kinit -l7d && aklog
env ZEPHYR_SCREEN_CLIENT=/mit/tabbott/zulip/zephyr_mirror.py
- SCREEN_SESSION_NAME=zulip athrun kchen owl-screen
-
This will run the Zephyr mirroring script inside a screen - session, and use `/mit/kchen/bin/cont-renew-notify` to continually - renew your Kerberos tickets for up to a week; each week, it will - send you a Zephyr/Zulip letting you know that you need to renew - your tickets. To do so, log in to the server that you set up the - screen session on and use the following procedure:
++ If you are not already running a screen/tmux for BarnOwl, you + can set up a screen session to run the Zephyr mirroring script by + running the following on a dialup such + as linerva.mit.edu: +
screen -x zulip
to connect to the mirroring
- screen session created above.Ctrl-A c
to switch to a new terminal in your screen session.kinit -l7d && aklog
kinit -l7d && aklog
env ZEPHYR_SCREEN_CLIENT=/mit/tabbott/zulip/zephyr_mirror.py
+ SCREEN_SESSION_NAME=zulip athrun kchen owl-screen
+
+ Don't run multiple copies of the Zephyr mirroring script; - doing so will result in messages you sent being forwarded to - Zephyr twice.
++ This will run the Zephyr mirroring script inside a screen + session, and use `/mit/kchen/bin/cont-renew-notify` to continually + renew your Kerberos tickets for up to a week; each week, it will + send you a Zephyr/Zulip letting you know that you need to renew + your tickets. To do so, log in to the server that you set up the + screen session on and use the following procedure: +
+ +screen -x zulip
to connect to the mirroring
+ screen session created above.
+ Ctrl-A c
to switch to a new terminal in your screen session.kinit -l7d && aklog
+ Don't run multiple copies of the Zephyr mirroring script; + doing so will result in messages you sent being forwarded to + Zephyr twice. +
{% endblock %} diff --git a/tools/check-templates b/tools/check-templates index d3809a1417..e8e985da85 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -115,30 +115,11 @@ def check_html_templates(templates: Iterable[str], all_dups: bool, fix: bool) -> sys.exit(1) for fn in templates: - # Many of our Django templates have strange indentation. The - # indentation errors are often harmless, even stylistically - # harmless, but they tend to be in files that might be old - # and might eventually require more scrutiny for things like - # localization. See GitHub #1236. - bad_files = [ - # These use various whitespace-dependent formatting that - # prevent cleaning them. - "templates/corporate/zephyr-mirror.html", - ] - validate(fn=fn, check_indent=(fn not in bad_files)) + validate(fn) - # Ignore these files since these have not been cleaned yet :/ - IGNORE_FILES = [ - # zephyr-mirror.html has some whitespace-dependent formatting - # for code blocks that prevent cleaning it. Might make sense - # to convert it to a /help/ Markdown article. - "templates/corporate/zephyr-mirror.html", - ] - # TODO: Clean these files for fn in templates: - if fn not in IGNORE_FILES: - if not validate_indent_html(fn, fix): - sys.exit(1) + if not validate_indent_html(fn, fix): + sys.exit(1) def check_handlebar_templates(templates: Iterable[str], fix: bool) -> None: @@ -146,7 +127,7 @@ def check_handlebar_templates(templates: Iterable[str], fix: bool) -> None: templates = [fn for fn in templates if fn.endswith(".hbs")] for fn in templates: - validate(fn=fn, check_indent=True) + validate(fn) for fn in templates: if not validate_indent_html(fn, fix): diff --git a/tools/lib/template_parser.py b/tools/lib/template_parser.py index c829f3ceb4..f5e9692c11 100644 --- a/tools/lib/template_parser.py +++ b/tools/lib/template_parser.py @@ -242,9 +242,7 @@ def indent_level(s: str) -> int: return len(s) - len(s.lstrip()) -def validate( - fn: Optional[str] = None, text: Optional[str] = None, check_indent: bool = True -) -> None: +def validate(fn: Optional[str] = None, text: Optional[str] = None) -> None: assert fn or text if fn is None: @@ -318,7 +316,7 @@ def validate( elif start_tag != end_tag: problem = "Mismatched tag." - if not problem and check_indent and (end_line > start_line + max_lines): + if not problem and (end_line > start_line + max_lines): if end_col != start_col: problem = "Bad indentation." diff --git a/tools/tests/test_template_parser.py b/tools/tests/test_template_parser.py index 09acbd68f3..11b7c89d47 100644 --- a/tools/tests/test_template_parser.py +++ b/tools/tests/test_template_parser.py @@ -20,10 +20,9 @@ class ParserTest(unittest.TestCase): error: str, fn: Optional[str] = None, text: Optional[str] = None, - check_indent: bool = True, ) -> None: with self.assertRaisesRegex(TemplateParserException, error): - validate(fn=fn, text=text, check_indent=check_indent) + validate(fn=fn, text=text) def test_is_django_block_tag(self) -> None: self.assertTrue(is_django_block_tag("block")) @@ -93,7 +92,7 @@ class ParserTest(unittest.TestCase): foo """ - self._assert_validate_error("Bad indentation.", text=my_html, check_indent=True) + self._assert_validate_error("Bad indentation.", text=my_html) def test_validate_state_depth(self) -> None: my_html = """