just polishing
This commit is contained in:
@@ -45,7 +45,6 @@ class getch:
|
||||
|
||||
class EndProgram( Exception ):
|
||||
''' Nice exit '''
|
||||
print('')
|
||||
pass
|
||||
|
||||
class slide_reader:
|
||||
@@ -601,6 +600,7 @@ def cut_line(s,i):
|
||||
re.sub("\$\{.$","",
|
||||
s)))
|
||||
return s
|
||||
|
||||
def add_highlight(s,opts):
|
||||
""" Add cursor position highlight """
|
||||
if len(s.strip())==0:
|
||||
@@ -706,7 +706,10 @@ def modify_file(reader,offset):
|
||||
)
|
||||
|
||||
def take_screenshot(reader,opts):
|
||||
out_file=os.path.join(opts.screenshots,"slide%03d.png"%(reader.page+1))
|
||||
out_file = os.path.join(
|
||||
opts.screenshots,
|
||||
"slide%03d.png"%(reader.page + 1,)
|
||||
)
|
||||
if not os.path.exists(opts.screenshots):
|
||||
os.mkdir(opts.screenshots)
|
||||
subprocess.call(
|
||||
@@ -722,8 +725,6 @@ def get_open_command():
|
||||
else:
|
||||
return "xdg-open"
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
global bc
|
||||
global getch
|
||||
@@ -732,9 +733,13 @@ def main():
|
||||
getch = getch()
|
||||
opts = setup_options()
|
||||
|
||||
browser(opts,opts.files)
|
||||
browser(
|
||||
opts,
|
||||
opts.files
|
||||
)
|
||||
print("\n\n")
|
||||
if opts.screenshots:
|
||||
print("\n\nCrop the images for terminal tabs, and PDFize e.g.:\n- mogrify -chop 0x50 %s/*png\n- convert %s/*png %s.pdf"%(
|
||||
print("Crop the images for terminal tabs, and PDFize e.g.:\n- mogrify -chop 0x50 %s/*png\n- convert %s/*png %s.pdf"%(
|
||||
opts.screenshots,
|
||||
opts.screenshots,
|
||||
os.path.basename(opts.screenshots),
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user