wq 1.0.0
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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/data/quotes.json +6502 -0
- data/data/words.json +9590 -0
- data/exe/wq +6 -0
- data/lib/wq/cli/colors_ext.rb +40 -0
- data/lib/wq/cli/commands/inspire.rb +26 -0
- data/lib/wq/cli/commands/list.rb +32 -0
- data/lib/wq/cli/commands/random.rb +43 -0
- data/lib/wq/cli/commands/today.rb +54 -0
- data/lib/wq/cli.rb +27 -0
- data/lib/wq/data.rb +23 -0
- data/lib/wq/version.rb +5 -0
- data/lib/wq.rb +12 -0
- metadata +74 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 97b67fbe7a9ee93081926bbaa0e58f8b0be3b1b8cde5feae0b1478027b702206
|
|
4
|
+
data.tar.gz: '05072079e2ce8e1a205b7d8b1499db30fabe1be738c941aa08e203c09ece2a85'
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 87c3c4cf659fcb1ce5dc97005a148bbbb94c263a6364a2b32db829899f9ee1088045a7f1e22b6eedb9f2473fc1b73dd314a4acf5781ea8e4ca27d3caf26a2fd2
|
|
7
|
+
data.tar.gz: 15b1d28e2707c8bfa7402152ecfebb495573aa49cb25f6c2a94ee92ff8b7f755ec5500ade17fff708a5ea62a13d7b53c4e8ea6f1501b3e55a442d87df9811d3b
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Javier Julio
|
|
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
|
|
13
|
+
all 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
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Wq
|
|
2
|
+
|
|
3
|
+
`wq` is a CLI built with [command_kit](https://github.com/postmodern/command_kit.rb), to help you (me) learn ~500 words you should know but probably don't and find inspiration from a curated list of quotes.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Run `gem install wq` then `wq` for the CLI.
|
|
8
|
+
|
|
9
|
+
- `wq today` shows the word and quote of the day
|
|
10
|
+
- `wq random` shows a random word
|
|
11
|
+
- `wq inspire` shows a random inspirational quote
|
|
12
|
+
- `wq list [A-Z]` lists all or filtered words
|
|
13
|
+
|
|
14
|
+
## Development
|
|
15
|
+
|
|
16
|
+
Run `bundle install` and then `bundle exec rspec` to run tests.
|
|
17
|
+
|
|
18
|
+
Only a list of words were extracted from the book ["500 Words You Should Know" by Caroline Taggart](https://www.goodreads.com/book/show/23359837-500-words-you-should-know). From there [Google Gemini (2.5 Pro)](https://gemini.google.com) was used to generate the meanings per word in JSON format.
|
|
19
|
+
|
|
20
|
+
This is an example of the Gemini prompt template used:
|
|
21
|
+
> Generate a JSON array of objects that provide the meanings for the words listed below. A word can have multiple meanings. Each meaning should include the definition, part of speech, example, and synonyms.
|
|
22
|
+
>
|
|
23
|
+
> bacchanalian, badinage, bathos, bellwether, benevolent, blatant, blighting, bombastic, boorish, bucolic, burgeoning, byzantine
|
|
24
|
+
|
|
25
|
+
The quotes data source is [the dwyl/quotes repository](https://github.com/dwyl/quotes/blob/main/quotes.json). Run `bin/update-quotes` to update the data file and commit the changes.
|
|
26
|
+
|
|
27
|
+
## Releases
|
|
28
|
+
|
|
29
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`.
|
|
30
|
+
|
|
31
|
+
## Resources
|
|
32
|
+
|
|
33
|
+
- https://www.datamuse.com/api/#md
|
|
34
|
+
- https://github.com/agmmnn/datamuse-cli/blob/master/datamuse_cli/cli.py
|
|
35
|
+
|
|
36
|
+
```ruby
|
|
37
|
+
response = Net::HTTP.get_response(URI.parse("https://api.datamuse.com/words?rel_jjb=ocean&max=20"))
|
|
38
|
+
JSON.parse(response.body, symbolize_names: true)
|
|
39
|
+
```
|