prompt-lists 0.0.5 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/prompt_lists.rb +24 -9
- data/lists/music/track.yml +137 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1081fe5953e84622f8d0a63263278649d9fbb86da553c0651993c31a155a597d
|
4
|
+
data.tar.gz: c1a7c7e0655eff637358ea805d52dab76d149d8bee0513d6549987eaeaf0dd4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81b1bb8bf974b77490ee745f99bf10c69829c0a406ee198bbada2f70ed6966531ea0c77d24c3fedff2c0d1429dccf9c0e2ca5bcbc436b13f1750b76b7241b618
|
7
|
+
data.tar.gz: 921bf43b191ce9b0739a21e23edf6759dc1974380c39db1ba73e1ff47281703a45dcd168cf4ebfaf7ba4084d8778b139ef10ee4d39eef936d5b3807abef4d9f2
|
data/Gemfile.lock
CHANGED
data/lib/prompt_lists.rb
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
2
|
require 'yaml'
|
4
3
|
|
5
4
|
module PromptLists
|
6
|
-
VERSION = '0.
|
5
|
+
VERSION = '0.1.1'
|
7
6
|
|
8
7
|
class List
|
8
|
+
attr_reader :id, :sublist_names
|
9
|
+
|
9
10
|
def initialize(list_name, sublist_names)
|
10
11
|
@id = list_name.to_sym
|
11
|
-
@
|
12
|
+
@sublist_names = sublist_names
|
12
13
|
end
|
13
14
|
|
14
15
|
def method_missing(method_name, *args)
|
15
|
-
sublist = @
|
16
|
+
sublist = @sublist_names.find { |sublist| sublist == method_name }
|
16
17
|
if sublist
|
17
18
|
sublist_filename = method_name.to_s.gsub(/_/, "-")
|
18
19
|
path = File.expand_path("../lists/#{@id}/#{sublist_filename}.yml", __dir__)
|
@@ -23,14 +24,18 @@ module PromptLists
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def respond_to_missing?(method_name, include_private = false)
|
26
|
-
sublist = @
|
27
|
+
sublist = @sublist_names.find { |sublist| sublist == method_name }
|
27
28
|
sublist || super
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
31
32
|
class Sublist
|
33
|
+
attr_reader :id
|
34
|
+
attr_accessor :metadata, :items
|
35
|
+
|
32
36
|
def initialize(file_path)
|
33
37
|
@file_path = file_path
|
38
|
+
@id = File.basename(file_path, ".yml").gsub(/-/, "_").to_sym
|
34
39
|
@content = File.read(@file_path)
|
35
40
|
if @content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
36
41
|
@items = @content[($1.size + $2.size)..-1].split("\n")
|
@@ -38,21 +43,31 @@ module PromptLists
|
|
38
43
|
end
|
39
44
|
@metadata = (@metadata || {})
|
40
45
|
end
|
41
|
-
attr_accessor :metadata, :items
|
42
46
|
end
|
43
47
|
|
44
48
|
class << self
|
45
49
|
def all
|
46
50
|
Dir[File.expand_path("../lists/*", __dir__)].map do |list|
|
47
51
|
list_name = File.basename(list)
|
48
|
-
|
52
|
+
find(list_name)
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
52
56
|
def find(list_name)
|
53
|
-
|
54
|
-
|
57
|
+
@lists ||= {}
|
58
|
+
|
59
|
+
if list_name.to_s.include?('.')
|
60
|
+
main_list, sublist = list_name.to_s.split('.')
|
61
|
+
if list_exists?(main_list)
|
62
|
+
list = find(main_list)
|
63
|
+
sublist_sym = sublist&.gsub(/-/, '_')&.to_sym
|
64
|
+
return list.send(sublist_sym) if list.sublist_names.include?(sublist_sym)
|
65
|
+
end
|
66
|
+
elsif list_exists?(list_name)
|
67
|
+
@lists[list_name.to_sym] ||= List.new(list_name, load_sublists(list_name))
|
68
|
+
return @lists[list_name.to_sym]
|
55
69
|
end
|
70
|
+
nil
|
56
71
|
end
|
57
72
|
|
58
73
|
def method_missing(method_name, *args)
|
@@ -0,0 +1,137 @@
|
|
1
|
+
---
|
2
|
+
title: Names of music tracks
|
3
|
+
category: music
|
4
|
+
---
|
5
|
+
Mørke Skoger
|
6
|
+
Caves
|
7
|
+
Black Spot
|
8
|
+
La forêt
|
9
|
+
Horse
|
10
|
+
Blood Will Prevail
|
11
|
+
Her & the Sea
|
12
|
+
A Sacred Place
|
13
|
+
Balder
|
14
|
+
He's Back
|
15
|
+
Is It or Isn't It Happening?
|
16
|
+
The Opening
|
17
|
+
The State of the World
|
18
|
+
Beginnings Are Such Delicate Times
|
19
|
+
Gratandi Jeg thig Beiði
|
20
|
+
Lívstræðrir
|
21
|
+
Trampoline
|
22
|
+
The Return
|
23
|
+
Boreal Forest
|
24
|
+
In Cold Light
|
25
|
+
Pan’s Labyrinth
|
26
|
+
Variation on Black Spot
|
27
|
+
Death of Aethelflaed
|
28
|
+
Tears
|
29
|
+
Corals Under the Sun
|
30
|
+
The Spirit Song
|
31
|
+
Fall
|
32
|
+
Pilot's Journey
|
33
|
+
Ancient Fathers
|
34
|
+
Rosary
|
35
|
+
Everything in Its Right Place
|
36
|
+
Les Montargis
|
37
|
+
Checkpoint Ethiopia
|
38
|
+
Helvegen
|
39
|
+
Arise
|
40
|
+
Blood in the Bayou
|
41
|
+
The Traveller
|
42
|
+
Vivace
|
43
|
+
I Walk With Ghosts
|
44
|
+
Hymn 49
|
45
|
+
The Bridge Of Khazad-Dum
|
46
|
+
She Loves the Rain
|
47
|
+
Elephant Waltz
|
48
|
+
Partners in Crime
|
49
|
+
Learning to Take Care of Within
|
50
|
+
Prospect
|
51
|
+
Under Giant Trees
|
52
|
+
Teil I
|
53
|
+
The Road Less Travelled
|
54
|
+
Tears
|
55
|
+
The Ocean
|
56
|
+
River Oblivion
|
57
|
+
Threads
|
58
|
+
Drean
|
59
|
+
The Trouble
|
60
|
+
Learning to Take Care of Within
|
61
|
+
Light Between the Leaves
|
62
|
+
Whale Tale
|
63
|
+
Bells in the Box
|
64
|
+
Sound of Violence
|
65
|
+
Wave Atlas
|
66
|
+
Leaving
|
67
|
+
Color Me
|
68
|
+
In the Belly of the Moon
|
69
|
+
Hideaway
|
70
|
+
Antechamber
|
71
|
+
All this Time
|
72
|
+
The Subterranean Heart
|
73
|
+
Colours
|
74
|
+
Alone in Kyoto
|
75
|
+
Fortanach
|
76
|
+
Holding her is where
|
77
|
+
Corals Under the Sun
|
78
|
+
NeoPoly
|
79
|
+
We Could Stay
|
80
|
+
Tongues
|
81
|
+
Beneath Waves
|
82
|
+
To My Love
|
83
|
+
Bohemia
|
84
|
+
Silence
|
85
|
+
Pockets of Light
|
86
|
+
Undone
|
87
|
+
Wrapped in Rain
|
88
|
+
Cello for the New Moon
|
89
|
+
7 Stars
|
90
|
+
Essentia
|
91
|
+
Longing
|
92
|
+
In Bloom
|
93
|
+
Let Her Go
|
94
|
+
The Space Between
|
95
|
+
Wavering Heart
|
96
|
+
A Fallen Kingdom
|
97
|
+
Re Entry
|
98
|
+
Ambrosia
|
99
|
+
Filigree
|
100
|
+
Lumi
|
101
|
+
Fog
|
102
|
+
Starry Night
|
103
|
+
You're Gonna Learn About Loss
|
104
|
+
Agape
|
105
|
+
Mirrored
|
106
|
+
Beyond the Horizon
|
107
|
+
tzimtzum
|
108
|
+
1123
|
109
|
+
We Will Be Found
|
110
|
+
Conflux
|
111
|
+
Midway
|
112
|
+
The Girl in the Dark
|
113
|
+
Lonely Mourning
|
114
|
+
Unsolved Pleasure
|
115
|
+
Fragments
|
116
|
+
lull
|
117
|
+
Barneville
|
118
|
+
Never Over
|
119
|
+
Outer Edges
|
120
|
+
At the Edge of Everything
|
121
|
+
an angel will be with you shortly
|
122
|
+
Ten Thousand Times Before
|
123
|
+
Bliss
|
124
|
+
We Are Born When We Die
|
125
|
+
The Fallen
|
126
|
+
Earth Melodies
|
127
|
+
Dead Gods
|
128
|
+
Each Man is a little War
|
129
|
+
Persephone
|
130
|
+
10 Feet Down
|
131
|
+
Guts
|
132
|
+
Cortège
|
133
|
+
mangata
|
134
|
+
In Dreams
|
135
|
+
Into the Black
|
136
|
+
River of Levi
|
137
|
+
Blinding Lights
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prompt-lists
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dreaming Tulpa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- lists/music/recording.yml
|
172
172
|
- lists/music/rhythm.yml
|
173
173
|
- lists/music/song-section.yml
|
174
|
+
- lists/music/track.yml
|
174
175
|
- lists/music/vocal.yml
|
175
176
|
- lists/nature/area-of-natural-beauty.yml
|
176
177
|
- lists/nature/flower.yml
|
@@ -290,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
291
|
- !ruby/object:Gem::Version
|
291
292
|
version: '0'
|
292
293
|
requirements: []
|
293
|
-
rubygems_version: 3.
|
294
|
+
rubygems_version: 3.5.18
|
294
295
|
signing_key:
|
295
296
|
specification_version: 4
|
296
297
|
summary: Categorised lists of things for AI image and media generation on promptcache.com.
|