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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8135362fc30d17c36825811d9aecd21ef2df236e
4
- data.tar.gz: ac1583ba61a9f384c03bc1426666983fa42e540f
3
+ metadata.gz: 00557d02529304ed9e1d0d407a4179cd502c8dd0
4
+ data.tar.gz: ac9024b8f8ab90f3740eab75997fd527d4d79bc1
5
5
  SHA512:
6
- metadata.gz: bb0799206638fcab8bb4ad97c10d82576951d624def15c8ade2c1a6402eef064b420fae455180724b210959c3d3d7d07268afa40aefe900cb6a6eb20ff502968
7
- data.tar.gz: 84cdfbfc78b482ea6ba117fee81d8c9ba1b92aebdde840cf9c9f07f14699b0074472d3c607f413ce61deefb44bff350b2166456ed0af5c63615ab6eefc142c3c
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
@@ -1,3 +1,3 @@
1
1
  module JupyterToScrapbox
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  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.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