xres2tlx 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0d48e4b5d808590cb77164ceb4ab458f1429cd9ecd6b355aa8ec0e79fc7b4b4
4
- data.tar.gz: b6d80cc139aa98cf591c90af1506b0445190a5026e8cc52e17ce109c8a4826bb
3
+ metadata.gz: 0aefd922bebb7e08195ea7ddc757bffdc23ff592ba4b55d38d1a9ed89222b06d
4
+ data.tar.gz: ab96c735b32fb7f912f3314c98fbc94f5d803cca1f3bee275cd4fb1dc193ef75
5
5
  SHA512:
6
- metadata.gz: a27832dc94816018784844a58ce33b1420dfadebdc29c9c21e44784811181bad4ee7ebebbeab8995f98a0a21db85748d31553d8808310a5caf7b0a3538df8dc9
7
- data.tar.gz: 7660a2fe91fa848afa6e47466e58f1d1d0a578a3bec9c2ab9881a4f9a62355600fede98fdac79ff7fdd79231161dd04dc6a95c6f0fc976197027e434ac92ba5c
6
+ metadata.gz: 58c2e5e3a05f96851495f68c086edbdbaf354e492380fbd6258a1a5822dd45678b20400c2810ae472fe2d1f7587eeedf7d392f52ece1a2eeb1b923692fbe7d8c
7
+ data.tar.gz: 58b6e8f3760c3b5e3dd00183caa82b0d4b6ffc68aa358963094f8690fcc14474ba72145e7afa9268da157d57da9bcb6fe629c759535fffb1de03519dca266c91
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Rory Dudley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -15,12 +15,15 @@ gem install xres2tlx
15
15
  __From source__
16
16
  ##### One-liner
17
17
  ```
18
- # Coming soon
18
+ git clone git@github.com:pinecat/xres2tlx.git && cd xres2tlx && gem build && gem install xres2tlx-*.gem
19
19
  ```
20
20
  ##### Manual
21
21
  ```
22
- # Coming soon
22
+ $ git clone git@github.com:pinecat/xres2tlx.git
23
+ $ cd xres2tlx
24
+ $ gem build
25
+ $ gem install xres2tlx-*.gem
23
26
  ```
24
27
 
25
28
  ## License
26
- xres2tlx is licensed under the MIT license. For more information, please see the (LICENSE)[https://github.com/pinecat/xres2tlx/blob/master/LICENSE].
29
+ This program is licensed under the MIT license. For more information, please see the [LICENSE](https://github.com/pinecat/xres2tlx/blob/master/LICENSE).
@@ -12,7 +12,7 @@ class Converter
12
12
 
13
13
  # Set the xres_filepath
14
14
  @xres_filepath = filepath
15
- @unordered_pref = {palette: []}
15
+ @unordered_pref = {palette: {}}
16
16
  @tlx_pref = nil
17
17
  end
18
18
 
@@ -37,10 +37,13 @@ class Converter
37
37
  # Palette
38
38
  # Only set palette if line just includes "color", NOT "colorBD"
39
39
  unless line.include? "colorBD"
40
- @unordered_pref[:palette].push(color) if line.include? "color"
40
+ @unordered_pref[:palette][line.split(":").first.scan(/\d/).join("").to_i] = color if line.include? "color"
41
41
  end
42
42
  end
43
43
  end
44
+
45
+ # Sort colors
46
+ @unordered_pref[:palette] = @unordered_pref[:palette].sort.to_h
44
47
  end
45
48
 
46
49
  def set_tlx_pref
@@ -55,7 +58,7 @@ class Converter
55
58
  "highlight-background-color": "#000000",
56
59
  "highlight-foreground-color": "#FFFFFF",
57
60
  name: @xres_filepath.split("/").last.strip.chomp,
58
- palette: @unordered_pref[:palette],
61
+ palette: @unordered_pref[:palette].values,
59
62
  "use-badge-color": false,
60
63
  "use-bold-color": true,
61
64
  "use-cursor-color": true,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Xres2tlx
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xres2tlx
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
  - Rory Dudley
@@ -21,6 +21,7 @@ extra_rdoc_files: []
21
21
  files:
22
22
  - ".standard.yml"
23
23
  - Gemfile
24
+ - LICENSE
24
25
  - README.md
25
26
  - Rakefile
26
27
  - bin/xres2tlx