slidict 0.1.2 → 0.1.5
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 +4 -4
- data/.github/workflows/bump-version.yml +101 -0
- data/.github/workflows/changelog.yml +13 -1
- data/CHANGELOG.md +4 -4
- data/README.md +12 -8
- data/lib/slidict/cli.rb +13 -3
- data/lib/slidict/markdown_renderer.rb +13 -2
- data/lib/slidict/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c07fd82f0702ff65d92397554df1518e46f13e63093136fa0292176e5e860882
|
|
4
|
+
data.tar.gz: 07b52dad44e1839a00cc15dd5c9215d8cc15334137943c0b8fd3dba0fd06835b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b415f46322b58ddc1ce327f8e6eb867afddd8b1cb5a264558882ffcf07adc2218022b6c8a6848b7b46fe184fc703ff5e425baecf622087c9812390f15d57097
|
|
7
|
+
data.tar.gz: bdd12522edd002b6d9c170f2a0b88b8fe9dc4c222513f4cd5f4d3a58eeba9b57d1fcbefeb93a8a8e0e057ee7d8f729903ccec46f795810abdd67c99161519277
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Bump Version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: Version segment to bump.
|
|
8
|
+
required: true
|
|
9
|
+
default: patch
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- patch
|
|
13
|
+
- minor
|
|
14
|
+
- major
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
bump-version:
|
|
22
|
+
name: Bump gem version
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Check out repository
|
|
27
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Set up Ruby
|
|
32
|
+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
|
|
33
|
+
with:
|
|
34
|
+
ruby-version: "3.4"
|
|
35
|
+
|
|
36
|
+
- name: Calculate next version
|
|
37
|
+
id: version
|
|
38
|
+
env:
|
|
39
|
+
BUMP: ${{ inputs.bump }}
|
|
40
|
+
run: |
|
|
41
|
+
ruby <<'RUBY' >> "$GITHUB_OUTPUT"
|
|
42
|
+
version_file = "lib/slidict/version.rb"
|
|
43
|
+
content = File.read(version_file)
|
|
44
|
+
current = content[/VERSION\s*=\s*"(\d+\.\d+\.\d+)"/, 1]
|
|
45
|
+
abort "Could not find current version in #{version_file}" unless current
|
|
46
|
+
|
|
47
|
+
major, minor, patch = current.split(".").map(&:to_i)
|
|
48
|
+
case ENV.fetch("BUMP")
|
|
49
|
+
when "major"
|
|
50
|
+
major += 1
|
|
51
|
+
minor = 0
|
|
52
|
+
patch = 0
|
|
53
|
+
when "minor"
|
|
54
|
+
minor += 1
|
|
55
|
+
patch = 0
|
|
56
|
+
when "patch"
|
|
57
|
+
patch += 1
|
|
58
|
+
else
|
|
59
|
+
abort "Unsupported bump value: #{ENV.fetch("BUMP")}"
|
|
60
|
+
end
|
|
61
|
+
target = [major, minor, patch].join(".")
|
|
62
|
+
|
|
63
|
+
puts "current=#{current}"
|
|
64
|
+
puts "next=#{target}"
|
|
65
|
+
RUBY
|
|
66
|
+
|
|
67
|
+
- name: Update version file
|
|
68
|
+
env:
|
|
69
|
+
NEXT_VERSION: ${{ steps.version.outputs.next }}
|
|
70
|
+
run: |
|
|
71
|
+
ruby -e 'path = "lib/slidict/version.rb"; version = ENV.fetch("NEXT_VERSION"); content = File.read(path); updated = content.sub(/VERSION\s*=\s*"\d+\.\d+\.\d+"/, "VERSION = \"#{version}\""); abort "Version was not updated" if updated == content; File.write(path, updated)'
|
|
72
|
+
|
|
73
|
+
- name: Verify gemspec
|
|
74
|
+
run: gem build slidict.gemspec
|
|
75
|
+
|
|
76
|
+
- name: Commit version bump
|
|
77
|
+
env:
|
|
78
|
+
NEXT_VERSION: ${{ steps.version.outputs.next }}
|
|
79
|
+
run: |
|
|
80
|
+
git config user.name "github-actions[bot]"
|
|
81
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
82
|
+
git checkout -B bump-version
|
|
83
|
+
git add lib/slidict/version.rb
|
|
84
|
+
git commit -m "chore: bump version to v${NEXT_VERSION}"
|
|
85
|
+
git push --force-with-lease origin bump-version
|
|
86
|
+
|
|
87
|
+
- name: Create pull request
|
|
88
|
+
env:
|
|
89
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
90
|
+
NEXT_VERSION: ${{ steps.version.outputs.next }}
|
|
91
|
+
run: |
|
|
92
|
+
if gh pr view bump-version --json number >/dev/null 2>&1; then
|
|
93
|
+
echo "Pull request for bump-version already exists"
|
|
94
|
+
exit 0
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
gh pr create \
|
|
98
|
+
--base "${GITHUB_REF_NAME}" \
|
|
99
|
+
--head bump-version \
|
|
100
|
+
--title "chore: bump version to v${NEXT_VERSION}" \
|
|
101
|
+
--body "Bump slidict gem version to v${NEXT_VERSION}."
|
|
@@ -12,14 +12,25 @@ jobs:
|
|
|
12
12
|
steps:
|
|
13
13
|
- name: Checkout Code
|
|
14
14
|
uses: actions/checkout@v3
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
15
17
|
|
|
16
18
|
- name: Extract version
|
|
17
19
|
id: version
|
|
18
20
|
run: |
|
|
19
|
-
version=$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" lib/
|
|
21
|
+
version=$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" lib/slidict/version.rb | head -n 1)
|
|
20
22
|
echo "version=v$version" >> $GITHUB_ENV
|
|
21
23
|
echo "VERSION_TAG=v$version" >> $GITHUB_ENV
|
|
22
24
|
|
|
25
|
+
- name: Check if version file changed
|
|
26
|
+
id: version_file
|
|
27
|
+
run: |
|
|
28
|
+
if git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -qx "lib/slidict/version.rb"; then
|
|
29
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
30
|
+
else
|
|
31
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
32
|
+
fi
|
|
33
|
+
|
|
23
34
|
- name: Check if version tag exists
|
|
24
35
|
id: check_tag
|
|
25
36
|
run: |
|
|
@@ -46,5 +57,6 @@ jobs:
|
|
|
46
57
|
uses: release-drafter/release-drafter@v5
|
|
47
58
|
with:
|
|
48
59
|
config-name: release-drafter.yml
|
|
60
|
+
publish: ${{ steps.version_file.outputs.changed == 'true' }}
|
|
49
61
|
env:
|
|
50
62
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
## [v0.1.
|
|
1
|
+
## [v0.1.5] - 2026-06-23
|
|
2
2
|
### :wrench: Chores
|
|
3
|
-
- [`
|
|
4
|
-
- [`
|
|
3
|
+
- [`52f3d94`](https://github.com/slidict/slidict-cli/commit/52f3d942c06577b6bf75d1c7ab38f8607b36e9fb) - Delete .github/workflows/version-bump.yml *(commit by [@abechan1](https://github.com/abechan1))*
|
|
4
|
+
- [`ef6f799`](https://github.com/slidict/slidict-cli/commit/ef6f799b18c272ce670264959abf0b2e4c6041b4) - bump version to v0.1.5 *(commit by [@github-actions[bot]](https://github.com/apps/github-actions))*
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
## [0.1.0] - 2026-06-21
|
|
10
10
|
|
|
11
11
|
- Initial release
|
|
12
|
-
[v0.1.
|
|
12
|
+
[v0.1.5]: https://github.com/slidict/slidict-cli/compare/v0.1.3...v0.1.5
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Slidict
|
|
2
2
|
|
|
3
|
-
Generate presentation
|
|
3
|
+
Generate presentation source files from a simple conversation.
|
|
4
4
|
|
|
5
5
|
Slidict is a CLI tool that helps you turn rough ideas into presentations through AI-guided conversations.
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ Unlike traditional slide generators, Slidict focuses on communication before sli
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
11
|
- Interactive CLI conversation
|
|
12
|
-
- Generate
|
|
12
|
+
- Generate slides for Slidev, Marp, Asciidoctor Reveal.js, and other OSS presentation frameworks
|
|
13
13
|
- Local-first MVP implemented in Ruby
|
|
14
14
|
- OpenAI Compatible API support, so you can point Slidict at OpenAI, Ollama, LM Studio, vLLM, or any other server implementing the same `/chat/completions` endpoint
|
|
15
15
|
|
|
@@ -25,10 +25,10 @@ Run the executable directly from this repository:
|
|
|
25
25
|
bin/slidict
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Slidict asks a few questions and
|
|
28
|
+
Slidict asks a few questions and generates presentation source files. For example, this creates a Marp Markdown deck:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
$ bin/slidict
|
|
31
|
+
$ bin/slidict --framework marp --output slides.md
|
|
32
32
|
|
|
33
33
|
What would you like to talk about?
|
|
34
34
|
> PDF Difference Monitoring Service
|
|
@@ -49,14 +49,18 @@ bin/slidict \
|
|
|
49
49
|
--duration "5 minutes" \
|
|
50
50
|
--audience "Engineering managers" \
|
|
51
51
|
--goal "Approve an MVP pilot" \
|
|
52
|
-
--framework
|
|
53
|
-
--output slides.
|
|
52
|
+
--framework asciidoctor-revealjs \
|
|
53
|
+
--output slides.adoc
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Output
|
|
56
|
+
## Output files
|
|
57
|
+
|
|
58
|
+
Choose the framework and output path that match the presentation tool you want to use. If you omit `--output`, Slidict chooses a framework-specific default:
|
|
57
59
|
|
|
58
60
|
```text
|
|
59
|
-
slides.md
|
|
61
|
+
Slidev -> slides.md
|
|
62
|
+
Marp -> slides.md
|
|
63
|
+
Asciidoctor Reveal.js -> slides.adoc
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
## Configuration
|
data/lib/slidict/cli.rb
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
module Slidict
|
|
4
4
|
class CLI
|
|
5
5
|
DEFAULT_OUTPUT = "slides.md"
|
|
6
|
+
DEFAULT_OUTPUT_BY_FRAMEWORK = {
|
|
7
|
+
"slidev" => "slides.md",
|
|
8
|
+
"marp" => "slides.md",
|
|
9
|
+
"asciidoctor-revealjs" => "slides.adoc"
|
|
10
|
+
}.freeze
|
|
6
11
|
|
|
7
12
|
def initialize(input: $stdin, output: $stdout, renderer: MarkdownRenderer.new)
|
|
8
13
|
@input = input
|
|
@@ -53,7 +58,7 @@ module Slidict
|
|
|
53
58
|
private
|
|
54
59
|
|
|
55
60
|
def parse(argv)
|
|
56
|
-
options = {
|
|
61
|
+
options = { framework: "slidev" }
|
|
57
62
|
args = argv.dup
|
|
58
63
|
|
|
59
64
|
until args.empty?
|
|
@@ -85,6 +90,7 @@ module Slidict
|
|
|
85
90
|
end
|
|
86
91
|
end
|
|
87
92
|
|
|
93
|
+
options[:output] ||= default_output_for(options[:framework])
|
|
88
94
|
options
|
|
89
95
|
end
|
|
90
96
|
|
|
@@ -130,7 +136,7 @@ module Slidict
|
|
|
130
136
|
@output.puts <<~HELP
|
|
131
137
|
Usage: slidict [options]
|
|
132
138
|
|
|
133
|
-
Generate presentation
|
|
139
|
+
Generate presentation source files from a short conversation.
|
|
134
140
|
|
|
135
141
|
Options:
|
|
136
142
|
--topic TEXT Presentation topic
|
|
@@ -143,10 +149,14 @@ module Slidict
|
|
|
143
149
|
--llm-api-key KEY API key for the LLM endpoint (env: SLIDICT_LLM_API_KEY)
|
|
144
150
|
--llm-model NAME Model name to request (env: SLIDICT_LLM_MODEL, default: gpt-4o-mini)
|
|
145
151
|
--no-llm Skip the LLM call and use the built-in slide template
|
|
146
|
-
-o, --output PATH Output file (default
|
|
152
|
+
-o, --output PATH Output file (default depends on --framework)
|
|
147
153
|
-h, --help Show this help
|
|
148
154
|
HELP
|
|
149
155
|
0
|
|
150
156
|
end
|
|
157
|
+
|
|
158
|
+
def default_output_for(framework)
|
|
159
|
+
DEFAULT_OUTPUT_BY_FRAMEWORK.fetch(framework.to_s.downcase, DEFAULT_OUTPUT)
|
|
160
|
+
end
|
|
151
161
|
end
|
|
152
162
|
end
|
|
@@ -4,11 +4,12 @@ module Slidict
|
|
|
4
4
|
class MarkdownRenderer
|
|
5
5
|
FRONTMATTER_BY_FRAMEWORK = {
|
|
6
6
|
"slidev" => "theme: default\nclass: text-center",
|
|
7
|
-
"marp" => "marp: true\ntheme: default"
|
|
8
|
-
"asciidoctor-revealjs" => "revealjs_theme: white"
|
|
7
|
+
"marp" => "marp: true\ntheme: default"
|
|
9
8
|
}.freeze
|
|
10
9
|
|
|
11
10
|
def render(deck)
|
|
11
|
+
return render_asciidoctor_revealjs(deck) if deck.framework == "asciidoctor-revealjs"
|
|
12
|
+
|
|
12
13
|
[frontmatter(deck.framework), deck.slides.map { |slide| render_slide(slide) }.join("\n---\n\n")].join("\n")
|
|
13
14
|
end
|
|
14
15
|
|
|
@@ -24,5 +25,15 @@ module Slidict
|
|
|
24
25
|
lines.concat(slide.bullets.map { |bullet| "- #{bullet}" })
|
|
25
26
|
lines.join("\n")
|
|
26
27
|
end
|
|
28
|
+
|
|
29
|
+
def render_asciidoctor_revealjs(deck)
|
|
30
|
+
lines = ["= #{deck.topic}", ":revealjs_theme: white", ":slidict_generated: #{Time.now.utc.iso8601}", ""]
|
|
31
|
+
lines.concat(deck.slides.flat_map { |slide| render_asciidoctor_slide(slide) })
|
|
32
|
+
lines.join("\n")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def render_asciidoctor_slide(slide)
|
|
36
|
+
["== #{slide.title}", "", *slide.bullets.map { |bullet| "* #{bullet}" }, ""]
|
|
37
|
+
end
|
|
27
38
|
end
|
|
28
39
|
end
|
data/lib/slidict/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slidict
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yusuke Abe
|
|
@@ -19,6 +19,7 @@ extra_rdoc_files: []
|
|
|
19
19
|
files:
|
|
20
20
|
- ".github/dependabot.yml"
|
|
21
21
|
- ".github/release-drafter.yml"
|
|
22
|
+
- ".github/workflows/bump-version.yml"
|
|
22
23
|
- ".github/workflows/changelog.yml"
|
|
23
24
|
- ".github/workflows/gem-push.yml"
|
|
24
25
|
- ".github/workflows/test.yml"
|