Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plandes/clj-tools-misc
Miscellaneous utilities used by other repos
https://github.com/plandes/clj-tools-misc
clojure excel miscellaneous-utilities spreadsheet
Last synced: 23 days ago
JSON representation
Miscellaneous utilities used by other repos
- Host: GitHub
- URL: https://github.com/plandes/clj-tools-misc
- Owner: plandes
- License: apache-2.0
- Created: 2016-07-22T21:15:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-25T19:03:59.000Z (about 6 years ago)
- Last Synced: 2024-11-08T21:27:29.577Z (3 months ago)
- Topics: clojure, excel, miscellaneous-utilities, spreadsheet
- Language: Clojure
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Miscellaneous utilities used by other repos
[![Travis CI Build Status][travis-badge]][travis-link]
[travis-link]: https://travis-ci.org/plandes/clj-tools-misc
[travis-badge]: https://travis-ci.org/plandes/clj-tools-misc.svg?branch=masterSimple small file containing various low (library) footprint dependencies.
This contains a library for helping with
* Spreadsheets (CSV and Excel)
* Zip files/streams## Obtaining
In your `project.clj` file, add:
[![Clojars Project](https://clojars.org/com.zensols.tools/misc/latest-version.svg)](https://clojars.org/com.zensols.tools/misc/)
## Documentation
Additional [documentation](https://plandes.github.io/clj-tools-misc/codox/index.html).
## Usage
Create a spreadsheet with all column adjusted to largest size of largest cell
and make a stylized header.
```clojure
user=> (require '[clj-excel.core :as excel])
user=> (require '[zensols.util.spreadsheet :as ss])
user=> (-> (excel/build-workbook
(excel/workbook-hssf)
{"Animal Stats"
(-> [["Animal" "Really Big Col" "Size"]
["cat" 1 "small"]
["dog" 0 "big"]]
(ss/headerize))})
(ss/autosize-columns)
(excel/save (res/resource-path :analysis-report "test.xls")))
user=> (-> (clojure.java.io/file "test.xls")
ss/excel-or-csv-by-columns
pprint)
(("Animal" "Really Big Col" "Size")
("cat" 1.0 "small")
("dog" 0.0 "big"))
```## Building
To build from source, do the folling:
- Install [Leiningen](http://leiningen.org) (this is just a script)
- Install [GNU make](https://www.gnu.org/software/make/)
- Install [Git](https://git-scm.com)
- Download the source: `git clone https://github.com/clj-mkproj && cd clj-mkproj`
- Download the make include files:
```bash
mkdir ../clj-zenbuild && wget -O - https://api.github.com/repos/plandes/clj-zenbuild/tarball | tar zxfv - -C ../clj-zenbuild --strip-components 1
```
- Build the distribution binaries: `make dist`Note that you can also build a single jar file with all the dependencies with: `make uber`
## Changelog
An extensive changelog is available [here](CHANGELOG.md).
## License
Copyright © 2017 Paul Landes
Apache License version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.