1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[doc] Wrapper for elinks binary under dosemu

It filters out startup messages of dosemu.
This commit is contained in:
Witold Filipczyk 2023-07-08 18:21:50 +02:00
parent 86be32f9f7
commit 7b2932354e

16
doc/tools/elinks_dos.py Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/python3
import os
import sys
if __name__ == '__main__':
was_elinks = False
d = os.path.dirname(os.getenv('ELINKS_BINARY'))
with os.popen('dosemu -dumb -K {0} -E "elinks {1}"'.format(d, sys.argv[1]), 'r') as fi:
for line in fi:
if not was_elinks:
if not line.startswith('ELinks'):
continue
was_elinks = True
print(line, end='')
sys.exit(0)