md2slides 0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/md2slides +64 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 12551985c4e0c6e7f6f9ce31b27a275646ec17db9c9d8b05126d8ae08c15e643
4
+ data.tar.gz: 94448d9c4ffe77da49be0fcade0d448dc280b01a0972fc17208ff5118c1feea3
5
+ SHA512:
6
+ metadata.gz: 1aed59d8f309f1a29f0aa16561428c11a2d4c03d159e16625c3421f4870f615697264f60a52645580c125ea83fd7ed23ec483e59361b43ef68f27a619deac3e1
7
+ data.tar.gz: 18de9e2866c8a658f7f8de8bf7f73ae818ce7b4f835f7fa6225e42bf558fc53ab8f13923aa031fed35426716abb05c17937945a52aa867ef4fb66afd6187dcf6
data/bin/md2slides ADDED
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ # Copyright (c) 2025 Motoyuki OHMORI All rights reserved.
5
+
6
+ $:.unshift File.join(File.dirname(File.dirname(File.realpath(__FILE__))), 'lib')
7
+
8
+ require 'presentation'
9
+ require 'md'
10
+
11
+ def usage(errmsg = nil)
12
+ puts "ERROR: #{errmsg}" if errmsg
13
+ puts <<~EOF
14
+ Usage:
15
+ #{$progname} [-f] <file> [<id>]
16
+ #{$progname} -h
17
+
18
+ Description:
19
+ generate a Google Presentation file.
20
+
21
+ Argument:
22
+ -h: output this message.
23
+ <file>: a file written in markdown
24
+ <id>: a ID of a presentation
25
+
26
+ BUGS:
27
+ only .md is allowed for an input file for now.
28
+
29
+ EOF
30
+ exit 1
31
+ end
32
+
33
+ v = ARGV.shift
34
+ case v
35
+ when '-h'
36
+ usage
37
+ when nil
38
+ usage
39
+ end
40
+
41
+ path = v
42
+ filename = File.basename(path)
43
+ if filename =~ /^(.*)\.(md)$/i
44
+ name, ext = $1, $2
45
+ else
46
+ raise("cannot find the file name extention: #{filename}")
47
+ end
48
+
49
+ md = MD.new(path)
50
+ id = md.attributes[:id]
51
+ if id.nil?
52
+ id = ARGV.shift
53
+ usage("No ID specified in the presentation and the argument") if ARGV.size != 0
54
+ else
55
+ usage("ID duplicatedly specified!!") if ARGV.size != 0
56
+ end
57
+
58
+ presentation = Presentation.new(id)
59
+ presentation.list
60
+ presentation.update(md)
61
+ #presentation.stick_out_check
62
+ presentation.download
63
+ presentation.generate_audio
64
+ presentation.generate_video
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: md2slides
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Motoyuki OHMORI
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-04-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Markdown to presentation slides in ruby
14
+ email: ohmori@tottori-u.ac.jp
15
+ executables:
16
+ - md2slides
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/md2slides
21
+ homepage: https://github.com/ohmori7/md2slides
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.0.3.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Markdown to presentation slides in ruby
44
+ test_files: []