rodo 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rodo.rb +17 -23
  3. data/lib/rodo/version.rb +1 -1
  4. data/plan.md +24 -7
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 487a6e9b19726480cf908c38c5f2e0f41682417194d66b9982aafb0b55e5ac77
4
- data.tar.gz: f85cd03a76622958b2871b6d3a9588d254ac1fdab94caf194a2a19b8b9a86a94
3
+ metadata.gz: 3a074a241d3d27bd3a0deb9c84e01ed3ab64d236fa5c54eb8d3aa289d5fa397a
4
+ data.tar.gz: e398735b491b13fa2a23c1cc1f176fcd1834e20da46747eaa1799dfd3184de48
5
5
  SHA512:
6
- metadata.gz: db2e621b24e3d84959495ef04a9c53126cb02f0acad446bac2eb0394a527bd6c4640eb8adca294107f18c2191987621edd06d6a76082a96f59395aa881275e31
7
- data.tar.gz: 3faa3e5e9fc7ec63fab25745a12d6dd6606d118080d348c2b36abdefd61aaa63aa07c07a20e51ea2befe9bef928ea6c75d260b1a5b688275bc4c52e3a4509eed
6
+ metadata.gz: '09802a25f28d4f0bb710b6a299cf46af3cdcc20325a66c96b71a80961b1c1d901f8bde22c89be7286b118f3407631dc7ad10df80255c9fad6a7c2ba849043d0d'
7
+ data.tar.gz: ab4395ff7a9117cab8b6173a6bf6625934b20aaf298bf09b5f5b007eb25e4eafeb3463385332b9570e186871d8ff33e18dffa182fa4c3c69eb4992cc98953f51
data/lib/rodo.rb CHANGED
@@ -112,6 +112,17 @@ class Rodo
112
112
  end
113
113
  end
114
114
 
115
+ def save
116
+ FileUtils.mkdir_p "_bak"
117
+ FileUtils.cp(@file_name,
118
+ File.join(
119
+ File.dirname(@file_name),
120
+ "_bak",
121
+ File.basename(@file_name) + "-#{Time.now.strftime("%Y-%m-%dT%H-%M-%S")}.bak"))
122
+ File.write(@file_name, @journal.to_s)
123
+ return :close
124
+ end
125
+
115
126
  def build_windows
116
127
 
117
128
  @win1.close if @win1
@@ -349,13 +360,13 @@ class Rodo
349
360
 
350
361
  when Curses::KEY_RIGHT
351
362
 
352
- if @cursor.x >= lines[@cursor.line].length - 1
363
+ if @cursor.x >= lines[@cursor.line].length
353
364
  if @cursor.line < lines.size - 1
354
365
  @cursor.line += 1
355
366
  @cursor.x = 0
356
367
  end
357
368
  else
358
- @cursor.x += 1 if @cursor.x < lines[@cursor.line].length - 1
369
+ @cursor.x += 1 if @cursor.x < lines[@cursor.line].length
359
370
  end
360
371
 
361
372
  when Curses::KEY_CTRL_LEFT
@@ -493,13 +504,6 @@ class Rodo
493
504
  when CTRLC, CTRLC.chr
494
505
  return :close
495
506
 
496
- #when CTRLA then buffer.beginning_of_line
497
- #when CTRLE then buffer.end_of_line
498
- #when Curses::KEY_UP
499
- # @cursor.line -= 1 if @cursor.line > 0
500
- #when Curses::KEY_DOWN
501
- # @cursor.line += 1 if @cursor.line < lines.size - 1
502
-
503
507
  when "\u0001" # CTRL+A
504
508
 
505
509
  @cursor.x = 0
@@ -514,7 +518,7 @@ class Rodo
514
518
 
515
519
  when Curses::KEY_RIGHT
516
520
 
517
- @cursor.x += 1 if @cursor.x < lines[@cursor.line].length - 1
521
+ @cursor.x += 1 if @cursor.x < lines[@cursor.line].length
518
522
 
519
523
  when Curses::KEY_CTRL_LEFT
520
524
 
@@ -591,21 +595,15 @@ class Rodo
591
595
 
592
596
  case char
593
597
  when 'q'
594
- FileUtils.mkdir_p "_bak"
595
- FileUtils.cp(@file_name, File.join(File.dirname(@file_name), "_bak", File.basename(@file_name) + "-#{Time.now.strftime("%Y-%m-%dT%H-%M-%S")}.bak"))
596
- File.write(@file_name, @journal.to_s)
598
+ return self.save
597
599
 
600
+ when CTRLC, CTRLC.chr
598
601
  return :close
599
602
 
600
603
  when '~'
601
604
  @debug = !@debug
602
605
  build_windows
603
606
 
604
- when CTRLC, CTRLC.chr
605
- return :close
606
-
607
- #when CTRLA then buffer.beginning_of_line
608
- #when CTRLE then buffer.end_of_line
609
607
  when Curses::KEY_UP
610
608
  @cursor.line -= 1 if @cursor.line > 0
611
609
 
@@ -764,11 +762,7 @@ class Rodo
764
762
 
765
763
  case char
766
764
  when 'q'
767
- FileUtils.mkdir_p "_bak"
768
- FileUtils.cp(@file_name, "_bak/" + @file_name + "-#{Time.now.strftime("%Y-%m-%dT%H-%M-%S")}.bak")
769
- File.write(@file_name, @journal.to_s)
770
-
771
- return :close
765
+ return self.save
772
766
 
773
767
  when CTRLC, CTRLC.chr
774
768
  return :close
data/lib/rodo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Rodo
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/plan.md CHANGED
@@ -1,13 +1,11 @@
1
- # 2021-06-08
1
+ # 2021-06-09
2
2
 
3
- Todos until Rodo 0.1.0
4
- - [x] Release
5
- - [x] Test on Mac
6
- - [x] Update README.md
7
- - [x] Silence warnings about pattern matching
3
+ Todos until Rodo 0.1.1
4
+ - [x] Fix discrepancy for save
5
+ - [x] Fix end of line one of errors with cursor movements
6
+ - [x] Release 0.1.1
8
7
 
9
8
  Todos for Rodo 0.2.0 and later
10
- - [x] When postponing copy section headers and parent todos
11
9
  - [ ] Short intro video
12
10
  - [ ] When closing days, use a checkmark to mark the day as done
13
11
  - [ ] Multiline/wrap support
@@ -17,6 +15,25 @@ Todos for Rodo 0.2.0 and later
17
15
  - [ ] Copy and Paste from <ul>/<ol> and OneNote
18
16
  - [ ] Improve command palette with support for cursor keys
19
17
 
18
+ # 2021-06-08
19
+
20
+ Todos until Rodo 0.1.0
21
+ - [x] Release
22
+ - [x] Test on Mac
23
+ - [x] Update README.md
24
+ - [x] Silence warnings about pattern matching
25
+
26
+ Todos for Rodo 0.2.0 and later
27
+ - [x] When postponing copy section headers and parent todos
28
+ - [>] Short intro video
29
+ - [>] When closing days, use a checkmark to mark the day as done
30
+ - [>] Multiline/wrap support
31
+ - [>] Autosave
32
+ - [>] Add migration mode
33
+ - [>] Montly Log Mode
34
+ - [>] Copy and Paste from <ul>/<ol> and OneNote
35
+ - [>] Improve command palette with support for cursor keys
36
+
20
37
  # 2021-06-02
21
38
 
22
39
  Todos until Rodo 0.1.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Oezbek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-08 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses