telescope-term 0.6.0 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/telescope +24 -20
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1f96d4afdd39035d8aff14031e43034607bd6772e71b57b46a6aca7280e372d
4
- data.tar.gz: 99560838dfcc2488495387672c46976a2a9131d9196aceaea2a4307b219dd01a
3
+ metadata.gz: 408d3c474e9618022c328cdf98a68d2c0d1922951ab422229158ed8ca882d022
4
+ data.tar.gz: 84f8679e4d86425f948c0a314ab5e7a8bedef62af0c170dafe3370d3f0317551
5
5
  SHA512:
6
- metadata.gz: ab7ea6182535bdfd32f7ef8394630e1c3f17e73716d7ad175c19a7b05a75ea54f9cee7a45a9c69786d1f60d6a2acb55a16b18d97f660601bc2208762b0517286
7
- data.tar.gz: 83587a7ec14ecf772f49542f2fb491ca3f86e87d1c86c1e5065ef4ed502816f0e09a0ac517778048ecff9e76d37a6ddc748c70fbbc215593445171c7521add29
6
+ metadata.gz: 3f0150614eeb44975ea19fd3bd61a7caf43349f5d9c7de50e6d174780c589926476ad77408cfa1cb9a4ae873dcd832994a18725b252a7aee4b5f2f575a5ba5d7
7
+ data.tar.gz: 3ed63758d445eeaf494c14ebdc13543c1c2060a798230f7b16e55101beb7c777187e29c8c0e17e3e5a0ddeefb3cc3d0ca4688b98b375fe1faecb9e7e67635cec
data/bin/telescope CHANGED
@@ -158,7 +158,7 @@ class Curses::Window # CLASS EXTENSION
158
158
  end
159
159
  end
160
160
  def getchr # PROCESS KEY PRESSES
161
- c = STDIN.getch
161
+ c = STDIN.getch(min: 0, time: 1)
162
162
  case c
163
163
  when "\e" # ANSI escape sequences
164
164
  case $stdin.getc
@@ -437,34 +437,34 @@ def w_ts_show
437
437
  attr = attr | Curses::A_UNDERLINE if @tstag.include?(i)
438
438
  @w_ts.pa(254, 0, attr, out) # Basic info (Name, APP, FL)
439
439
  out = (f.to_f/d.to_f).truncate(1).to_s.rjust(6)
440
- @w_ts.pa(254, 0, 0, out) # F/?
440
+ @w_ts.pa(254, 0, attr, out) # F/?
441
441
  out = (5 * Math::log(d/10, 10) + 7.5).truncate(1).to_s.rjust(6)
442
- @w_ts.pa(229, 0, 0, out) # <MAG
442
+ @w_ts.pa(229, 0, attr, out) # <MAG
443
443
  out = (d**2/49).to_i.to_s.rjust(6)
444
- @w_ts.pa(229, 0, 0, out) # xEYE
444
+ @w_ts.pa(229, 0, attr, out) # xEYE
445
445
  out = magx(d, f, 1/7.to_f)
446
- @w_ts.pa(194, 0, 0, out) # MINx
446
+ @w_ts.pa(157, 0, attr, out) # MINx
447
447
  out = magx(d, f, 2)
448
- @w_ts.pa(194, 0, 0, out) # MAXx
448
+ @w_ts.pa(157, 0, attr, out) # MAXx
449
449
  out = magx(d, f, 1/6.4)
450
- @w_ts.pa(189, 0, 0, out) # *FIELD
450
+ @w_ts.pa(195, 0, attr, out) # *FIELD
451
451
  out = magx(d, f, 1/3.6)
452
- @w_ts.pa(189, 0, 0, out) # GX/NEB
452
+ @w_ts.pa(195, 0, attr, out) # GX/NEB
453
453
  out = magx(d, f, 1/2.1)
454
- @w_ts.pa(189, 0, 0, out) # PL/GCL
454
+ @w_ts.pa(195, 0, attr, out) # PL/GCL
455
455
  out = magx(d, f, 1/1.3)
456
- @w_ts.pa(189, 0, 0, out) # PLd/2*
456
+ @w_ts.pa(195, 0, attr, out) # PLd/2*
457
457
  out = magx(d, f, 1/0.7)
458
- @w_ts.pa(189, 0, 0, out) # TGHT2*
458
+ @w_ts.pa(195, 0, attr, out) # TGHT2*
459
459
  out = (115.824/d).truncate(2).dec2.to_s.rjust(7)
460
- @w_ts.pa(219, 0, 0, out) # DL-SEP
460
+ @w_ts.pa(219, 0, attr, out) # DL-SEP
461
461
  out = (3600*Math::asin(671E-6/d).rad).truncate(2).dec2.to_s.rjust(8)
462
- @w_ts.pa(219, 0, 0, out) # RC-SEP
462
+ @w_ts.pa(219, 0, attr, out) # RC-SEP
463
463
  moon = (384E6*Math::tan((115.824.deg/d)/3600))
464
464
  out = moon.to_i.to_s.rjust(6) + "m"
465
- @w_ts.pa(225, 0, 0, out) # MOON
465
+ @w_ts.pa(225, 0, attr, out) # MOON
466
466
  out = (moon/2.5668).to_i.to_s.rjust(5) + "km"
467
- @w_ts.pa(225, 0, 0, out) # SUN
467
+ @w_ts.pa(225, 0, attr, out) # SUN
468
468
  @w_ts.p("\n")
469
469
  end
470
470
  @w_ts.clr_from_cur_line
@@ -509,9 +509,9 @@ def w_ep_show
509
509
  d = scope[1]
510
510
  f = scope[2]
511
511
  mag = (f.to_f/m)
512
- @w_ep.pa(254, 0, 0, " │")
512
+ @w_ep.pa(254, 0, attr, " │")
513
513
  out = mag.truncate(1).to_s.rjust(6)
514
- @w_ep.pa(156, 0, 0, out)
514
+ @w_ep.pa(156, 0, attr, out)
515
515
  fov = a/mag
516
516
  deg = fov.to_i
517
517
  mins = ((fov - fov.to_i) * 60)
@@ -521,9 +521,9 @@ def w_ep_show
521
521
  mno = min.to_s.rjust(2, " ") + "'"
522
522
  sco = sec.to_s.rjust(2, " ") + "\""
523
523
  out = (dgo + mno + sco).rjust(10)
524
- @w_ep.pa(222, 0, 0, out)
524
+ @w_ep.pa(222, 0, attr, out)
525
525
  out = (d/mag).truncate(1).to_s.rjust(6)
526
- @w_ep.pa(209, 0, 0, out)
526
+ @w_ep.pa(209, 0, attr, out)
527
527
  end
528
528
  @w_ep.p("\n")
529
529
  end
@@ -623,7 +623,11 @@ loop do # OUTER LOOP - (catching refreshes via 'r')
623
623
  w_cm_show
624
624
  main_getkey # Get key from user
625
625
  break if @break # Break to outer loop, redrawing windows, if user hit 'r'
626
- break if Curses.cols != maxx or Curses.lines != maxy # break on terminal resize
626
+ if Curses.cols != maxx or Curses.lines != maxy # break on terminal resize
627
+ close_screen
628
+ puts " You must run Telescope with a minimum tarminal width of 140 chracters."
629
+ break
630
+ end
627
631
  end
628
632
  ensure # On exit: close curses, clear terminal
629
633
  close_screen
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telescope-term
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2022-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -33,7 +33,8 @@ dependencies:
33
33
  description: 'With this program you can list your telescopes and eyepieces and get
34
34
  a set of calculations done for each scope and for the combination of scope and eyepiece.
35
35
  Easy interface. Run the program, then hit ''?'' to show the help file. New in v0.6.0:
36
- Added sorting of telescopes (via ''T'') and eyepieces (''E'').'
36
+ Added sorting of telescopes (via ''T'') and eyepieces (''E''). New in 1.7: Highlighted
37
+ all of current selection for better readability.'
37
38
  email: g@isene.com
38
39
  executables:
39
40
  - telescope