nydp-caxlsx 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -1
- data/README.md +5 -7
- data/lib/lisp/caxlsx-000-core.nydp +10 -4
- data/lib/nydp/caxlsx.rb +12 -4
- data/lib/nydp/caxlsx/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 19afad8199bae5b8dc15a2bdc829e1f3880f7a32f0e05bf25f86829988a1b089
|
4
|
+
data.tar.gz: 02e9143589cb791e98a86cc3be075ec3575af68a14a0f522bf5fb52f5f6e9ca1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4125ce412bca399f31440f0f724c7e981a3fb5544b9b1f6ebba32b852002336a10b9d002d9cc978c63b81464995b1510ef53fbcce82f42813665c6769336a073
|
7
|
+
data.tar.gz: 5ead9c0b7e685446246e3af8bac1fa4d20e6752039d2ed1627be6e6e3cfa423e49aed07ad0de054a2032274a641e4a2a2d5d334e925350a66e621aa6ec102a0a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Nydp::Caxlsx
|
2
2
|
|
3
|
-
This gem provides a nydp wrapper for the
|
3
|
+
This gem provides a nydp wrapper for the [`caxlsx`](https://github.com/caxlsx/caxlsx) gem, allowing you finally generate excel (or libreoffice) spreadsheets from lisp!! The future has arrived!
|
4
4
|
|
5
5
|
|
6
6
|
## Installation
|
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
24
24
|
```lisp
|
25
25
|
(xls
|
26
26
|
(sheet "big sheet"
|
27
|
-
(let s0 (style {})
|
27
|
+
(let s0 (style { b t bg_color "FFCCFFDD" })
|
28
28
|
(each item items
|
29
29
|
(row (list item.created_at
|
30
30
|
item.name
|
@@ -32,11 +32,9 @@ Or install it yourself as:
|
|
32
32
|
item.lorentz_factor
|
33
33
|
item.wave_function
|
34
34
|
item.polarity)
|
35
|
-
{ style
|
35
|
+
{ style s0 })))))
|
36
36
|
```
|
37
37
|
|
38
|
-
TODO: Write usage instructions here
|
39
|
-
|
40
38
|
## Development
|
41
39
|
|
42
40
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -45,7 +43,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
45
43
|
|
46
44
|
## Contributing
|
47
45
|
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/conanite/nydp-caxlsx. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
49
47
|
|
50
48
|
## License
|
51
49
|
|
@@ -53,4 +51,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
53
51
|
|
54
52
|
## Code of Conduct
|
55
53
|
|
56
|
-
Everyone interacting in the Nydp::Caxlsx project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
54
|
+
Everyone interacting in the Nydp::Caxlsx project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/conanite/nydp-caxlsx/blob/master/CODE_OF_CONDUCT.md).
|
@@ -3,16 +3,22 @@
|
|
3
3
|
(assign xls-dsl {})
|
4
4
|
|
5
5
|
(def xls-dsl.sheet (name . body)
|
6
|
-
`(
|
6
|
+
`(with (xls-worksheet (xls/worksheet/new xls-package ,name)
|
7
|
+
xls-row-number 1)
|
7
8
|
,@body))
|
8
9
|
|
9
10
|
(def xls-dsl.style (rules)
|
10
11
|
`(xls/style/new xls-package ,rules))
|
11
12
|
|
12
13
|
(def xls-dsl.row (items options)
|
13
|
-
(
|
14
|
-
|
15
|
-
|
14
|
+
`(do
|
15
|
+
,(if options
|
16
|
+
`(xls/row/new xls-worksheet ,items ,options)
|
17
|
+
`(xls/row/new xls-worksheet ,items))
|
18
|
+
(++ xls-row-number)))
|
19
|
+
|
20
|
+
(def xls-dsl.column-widths (widths)
|
21
|
+
`(xls/worksheet/column-widths xls-worksheet widths))
|
16
22
|
|
17
23
|
(mac xls workbooks
|
18
24
|
`(returnlet xls-package (xls/package/new)
|
data/lib/nydp/caxlsx.rb
CHANGED
@@ -27,10 +27,11 @@ module Nydp
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def setup ns
|
30
|
-
Nydp::Symbol.mk("xls/package/new"
|
31
|
-
Nydp::Symbol.mk("xls/worksheet/new"
|
32
|
-
Nydp::Symbol.mk("xls/
|
33
|
-
Nydp::Symbol.mk("xls/
|
30
|
+
Nydp::Symbol.mk("xls/package/new" , ns).assign(Nydp::Caxlsx::Builtin::NewPackage.instance)
|
31
|
+
Nydp::Symbol.mk("xls/worksheet/new" , ns).assign(Nydp::Caxlsx::Builtin::NewWorksheet.instance)
|
32
|
+
Nydp::Symbol.mk("xls/worksheet/column-widths", ns).assign(Nydp::Caxlsx::Builtin::SetColumnWidths.instance)
|
33
|
+
Nydp::Symbol.mk("xls/row/new" , ns).assign(Nydp::Caxlsx::Builtin::NewRow.instance)
|
34
|
+
Nydp::Symbol.mk("xls/style/new" , ns).assign(Nydp::Caxlsx::Builtin::NewStyle.instance)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -60,6 +61,13 @@ module Nydp
|
|
60
61
|
end
|
61
62
|
end
|
62
63
|
|
64
|
+
class SetColumnWidths
|
65
|
+
include Nydp::Builtin::Base, Singleton
|
66
|
+
def builtin_invoke_3 vm, sheet, values
|
67
|
+
vm.push_arg sheet.column_widths(n2r(values))
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
63
71
|
class NewStyle
|
64
72
|
include Nydp::Builtin::Base, Singleton
|
65
73
|
def builtin_invoke_3 vm, package, rules
|
data/lib/nydp/caxlsx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nydp-caxlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- conanite
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nydp
|
@@ -122,8 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
|
126
|
-
rubygems_version: 2.5.2.3
|
125
|
+
rubygems_version: 3.0.3
|
127
126
|
signing_key:
|
128
127
|
specification_version: 4
|
129
128
|
summary: nydp wrapper for caxlsx gem
|