atlas2ipynb 0.0.8 → 0.0.9
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 +8 -8
- data/atlas2ipynb.gemspec +1 -1
- data/bin/atlas2ipynb +2 -5
- data/lib/atlas2ipynb.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjI3YzYzNTI3Nzg2OThmZGViZTRhMWM0MzQxOTJkMGUxNTIxNTlhOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDNiNThiZGQ1MmY2ODE3MzMxZjU5MDI0NzEzNTAxMzcwMmU1NDhiMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjM4NmNiYjI2MzhiZmQxN2Q4ZGZkOGUzZTY2MTdhNDZiMGU3NTgwZTViMmY5
|
10
|
+
YjYzNzc5MTdjOTJjZWY4YTc5MTE5YjM2MGU4ZDA0MTA4OTg2ZDcyYWY5YjJl
|
11
|
+
N2RkMzVjOTg2MjgxYTVlZjM5MDY3ZDY1ZjViMzhiM2JhYWU5YjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjM0ZWQzNTdkYzIxMDgwNWMzNGViYTFhMmM2OTY2MGJkNWI1NmI2MjMxODNm
|
14
|
+
M2FkMjU3MWVlNTVjYmNhNDUzNmEwMjJlZjBjMGQ1N2U5OTA1ZTQ2MTQ3MTNm
|
15
|
+
OGIyNThkYTk3ZmExMzFlNDNkMjUxMjViM2U3MmE1YzI4Zjk4NTk=
|
data/atlas2ipynb.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "atlas2ipynb"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.9"
|
8
8
|
spec.authors = ["Andrew Odewahn"]
|
9
9
|
spec.email = ["odewahn@oreilly.com"]
|
10
10
|
spec.summary = %q{Converts Atlas HTML build into iPythyon Notebooks.}
|
data/bin/atlas2ipynb
CHANGED
@@ -57,11 +57,8 @@ end
|
|
57
57
|
@last_response.status.each do |format|
|
58
58
|
puts "Downloading #{project}"
|
59
59
|
`curl #{format.download_url} > #{fn}.zip`
|
60
|
-
`unzip #{fn}.zip
|
61
|
-
|
62
|
-
converter = Atlas2ipynb::Converter.new
|
63
|
-
converter.convert!
|
64
|
-
}
|
60
|
+
`unzip #{fn}.zip`
|
61
|
+
converter = Atlas2ipynb::Converter.new
|
65
62
|
end
|
66
63
|
|
67
64
|
puts "\nAssuming things when ok, you can view the notebook by:"
|
data/lib/atlas2ipynb.rb
CHANGED
@@ -54,11 +54,18 @@ module Atlas2ipynb
|
|
54
54
|
"source" => c.text
|
55
55
|
}
|
56
56
|
when "pre", "code"
|
57
|
+
# test for the code type. If it's not python, then insert the
|
58
|
+
# appropriate cell magics
|
59
|
+
listing = c.text
|
60
|
+
code_type = c.attributes["data-code-language"] || "python"
|
61
|
+
if code_type != "python"
|
62
|
+
listing = "%%#{code_type}\n#{listing}"
|
63
|
+
end
|
57
64
|
out << {
|
58
65
|
"cell_type" => "code",
|
59
66
|
"collapsed" => false,
|
60
|
-
"input" =>
|
61
|
-
"language" =>
|
67
|
+
"input" => listing,
|
68
|
+
"language" => code_type,
|
62
69
|
"metadata" => {},
|
63
70
|
"outputs" => []
|
64
71
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlas2ipynb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Odewahn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|