Skip to content

Commit

Permalink
Add custom server patch version of YaLafi
Browse files Browse the repository at this point in the history
Copied from [0] but reapplied to the newer version of YaLafi.

[0]: torik42/YaLafi#222

Signed-off-by: Kenny Ballou <[email protected]>
  • Loading branch information
kennyballou committed Jan 16, 2023
1 parent 3b2c046 commit 69b39e0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions kbg/packages/python-xyz.scm
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,16 @@
(synopsis "Yet another LaTeX filter")
(description "Yet another LaTeX filter")
(license license:gpl3)))

(define-public python-yalafi-custom-server
(package
(inherit python-yalafi)
(name "python-yalafi-custom-server")
(version "1.4.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "yalafi" version))
(sha256
(base32
"02bn21prgd81gr28vl211dp9mkqfgrrbiz2sqp29y72av6p88lfj"))
(patches (search-patches "./kbg/patches/allow-setting-a-custom-server.patch"))))))
21 changes: 21 additions & 0 deletions kbg/patches/allow-setting-a-custom-server.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- /yalafi/shell/shell.py
+++ /yalafi/shell/shell.py
@@ -152,7 +152,7 @@ parser.add_argument('--enablecategories',
parser.add_argument('--lt-options', default='')
parser.add_argument('--single-letters')
parser.add_argument('--equation-punctuation')
-parser.add_argument('--server', choices=['my', 'lt', 'stop'], default='')
+parser.add_argument('--server', default='')
parser.add_argument('--lt-server-options', default='')
parser.add_argument('--textgears')
parser.add_argument('--multi-language', action='store_true')
@@ -246,6 +246,9 @@ if cmdline.server == 'stop':
+ ltserver_local_cmd + '"\n')
sys.exit()
tex2txt.fatal('could not kill LT server "' + ltserver_local_cmd + '"')
+elif cmdline.server not in ['lt', 'my', 'stop']:
+ ltserver = cmdline.server
+ cmdline.server = 'lt'


# option --add-modules: read declarations from root document

0 comments on commit 69b39e0

Please sign in to comment.