jupyter_to_scrapbox 0.2.2 → 0.2.3
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/lib/cli.rb +33 -0
- data/lib/jupyter_to_scrapbox/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00557d02529304ed9e1d0d407a4179cd502c8dd0
|
4
|
+
data.tar.gz: ac9024b8f8ab90f3740eab75997fd527d4d79bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75e11d33b41ddc01ff82f999dbf3c0dc404484901ccdd6632bae9612e3237b1bfe8ce9ab7479c5d298f4d51f798a876debefc8392f97e9a738196706567e8a70
|
7
|
+
data.tar.gz: 32d6e6fc473d4c770319ce56a360b56f74234c71c84376c875dc3c7572a424a1edc1bfd49cfac3c3e0ca59c930ed2b546fb2f72b865aba7342ea480fd863ba60
|
data/lib/cli.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
require "jupyter_to_scrapbox"
|
5
|
+
require 'thor'
|
6
|
+
|
7
|
+
module JupyterToScrapbox
|
8
|
+
class CLI < Thor
|
9
|
+
class_option :help, type: :boolean, aliases: '-h', desc: 'help message.'
|
10
|
+
class_option :version, type: :boolean, desc: 'version'
|
11
|
+
default_task :help
|
12
|
+
|
13
|
+
method_option :verbose, type: :boolean, aliases: '-v', desc: 'verbose message', :default => false
|
14
|
+
method_option :image, type: :boolean, aliases: '-i', desc: 'register images', :default => false
|
15
|
+
method_option :markdown, type: :boolean, aliases: '-m', desc: 'process markdown', :default => true
|
16
|
+
desc 'converts FILES [options]', 'Convert jupyter-notebook files to scrapbox-json'
|
17
|
+
|
18
|
+
def convert(*paths)
|
19
|
+
JupyterToScrapbox::Converter.set_verbose(options[:verbose])
|
20
|
+
JupyterToScrapbox::Converter.set_register_images(options[:image])
|
21
|
+
JupyterToScrapbox::Converter.set_parse_markdown(options[:markdown])
|
22
|
+
paths.each do |path|
|
23
|
+
JupyterToScrapbox::Converter.add(path)
|
24
|
+
end
|
25
|
+
JupyterToScrapbox::Converter.perform()
|
26
|
+
end
|
27
|
+
|
28
|
+
desc 'version', 'version'
|
29
|
+
def version
|
30
|
+
p JupyterToScrapbox::VERSION
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jupyter_to_scrapbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroharu Sugawara
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- bin/setup
|
69
69
|
- exe/jupyter_to_scrapbox
|
70
70
|
- jupyter_to_scrapbox.gemspec
|
71
|
+
- lib/cli.rb
|
71
72
|
- lib/jupyter_to_scrapbox.rb
|
72
73
|
- lib/jupyter_to_scrapbox/version.rb
|
73
74
|
homepage: https://github.com/hsugawa8651/jupyter_to_scrapbox_gem
|