obst 0.1.9 → 0.1.11

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: 8ceae774176f6f2f1ce1b638f7d3dcfd316405421f4942a5d0bb87f9c45a3e74
4
- data.tar.gz: 1a4499843d98a6d4b41cb918c9afc7cabf00ab4a1a82bf10ef40af2a22c688f7
3
+ metadata.gz: cb1ab67448bed4056e7bc000658fbb25a1f39c246edfa25a51a8b751bea7cb9f
4
+ data.tar.gz: a6093ed7116ca55c9c9009ba6d29972a948987780dbe2b0608dcd5d869b76428
5
5
  SHA512:
6
- metadata.gz: ee87ab6d88d959604b220cb9a59203f53ade814af0ad0a6449f182785639891ce6dbcc85e6612394f8427a1a1127bea8137d94a0adf510a48049871bf33d95fc
7
- data.tar.gz: ed0485c9bb2e1b7d07b7efac59ac88819e8290df741878d1e0d5772405690e3722baafb49ffb63d3bf4ad07f335f3567c4c7c95c7f7617d9615b03ad3cf4fa0e
6
+ metadata.gz: f04a1f4ea7e675e97fa9ecd83bcecaaa83c8c6a194dc4d6d5fb255448b0717f22a0dbf5db26221881e89f2d375bef11826b110e3f58c616a07429b25b4a3bc03
7
+ data.tar.gz: 067e2f2ba2b32a4088156a989aa5a0f3c9511bfe8c750e11117de4f1a7425dfc4bae3de9817a781bc30a06a2699ebd06b047b9c0366db65bd81ed465e8d549b7
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /tmp/
9
9
  /Gemfile.lock
10
10
  /*.gem
11
+ .ruby-version
data/lib/obst/notes.rb CHANGED
@@ -34,9 +34,5 @@ module Obst
34
34
  def each(&block)
35
35
  @notes.each(&block)
36
36
  end
37
-
38
- def tags
39
- @gitlog.map(&:tags).flatten.tally.sort{ |t1, t2| [t2[1], t2[0]] <=> [t1[1], t1[0]] }.to_h
40
- end
41
37
  end
42
38
  end
data/lib/obst/pack_log.rb CHANGED
@@ -62,7 +62,7 @@ module Obst
62
62
  [:del, :d, '#c71585'],
63
63
  [:nil, nil, 'grey']
64
64
  ].each do |long, short, color|
65
- files = gbfs[short]
65
+ files = gbfs[short].compact
66
66
  next if files.empty?
67
67
  inline_str = files.sort!.map{ |name| "[[#{name}]]" }.join(' / ')
68
68
  block.call("<font color='#{color}'>#{long} #{files.count}:</font> #{inline_str}")
@@ -8,9 +8,17 @@ module Obst
8
8
 
9
9
  def to_s
10
10
  buffer = ["# Tags\n"]
11
- @notes.map(&:tags).flatten.tally.sort{ |t1, t2| [t2[1], t2[0]] <=> [t1[1], t1[0]] }.each do |(tag, count)|
12
- buffer << "- #{tag}: #{count}"
11
+
12
+ @notes.map(&:tags).flatten.tally.sort do |t1, t2|
13
+ if (compare_count = (t2[1] <=> t1[1])) == 0
14
+ t1[0] <=> t2[0]
15
+ else
16
+ compare_count
17
+ end
18
+ end.each_with_index do |(tag, count), idx|
19
+ buffer << "#{idx + 1}. #{tag}: #{count}"
13
20
  end
21
+
14
22
  buffer.join("\n")
15
23
  end
16
24
  end
data/lib/obst/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Obst
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-02-20 00:00:00.000000000 Z
10
+ date: 2025-03-06 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email:
15
13
  - block24block@gmail.com
16
14
  executables:
@@ -47,7 +45,6 @@ homepage: https://github.com/turnon/obst
47
45
  licenses:
48
46
  - MIT
49
47
  metadata: {}
50
- post_install_message:
51
48
  rdoc_options: []
52
49
  require_paths:
53
50
  - lib
@@ -62,8 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
59
  - !ruby/object:Gem::Version
63
60
  version: '0'
64
61
  requirements: []
65
- rubygems_version: 3.4.10
66
- signing_key:
62
+ rubygems_version: 3.6.3
67
63
  specification_version: 4
68
64
  summary: Obsidian stats
69
65
  test_files: []