Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc doc changes #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
35 changes: 30 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# Where third-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez

# Ignore package tarball (built via "mix hex.build").
exmagick-*.tar

# Temporary files, for example, from tests.
/tmp/

# Misc.
.dialyzer.plt
/lib/c/*.o
/lib/c/*.so
/lib/c/*.lo
/lib/c/*.la
priv/
/priv/
.libs/
_build/
/deps/
/doc/
.dialyzer.plt
21 changes: 0 additions & 21 deletions CHANGELOG

This file was deleted.

26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.0.6 - 2018-05-17
* add optional dirty scheduler support;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces

* bugfix: memory leak on `image_dump/1`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces


## v0.0.5 - 2016-09-05
* add num_pages

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces


## v0.0.4 - 2016-08-30
* dump and load using binaries

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces

* magick attribute is read-write

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces


## v0.0.3 - 2016-08-25
* crop function

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces


## v0.0.2 - 2016-08-24
* thumbnail and scale functions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces


## v0.0.1 - 2016-04-25
* first version

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation before bullet: remove 2 spaces

12 changes: 0 additions & 12 deletions COPYING

This file was deleted.

28 changes: 28 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# BSD 3-Clause "New" or "Revised" License

Copyright (c) 2015 Diego Souza. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect list-item indent: add 1 space

list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect list-item indent: add 1 space

this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect list-item indent: add 1 space

may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,81 @@
ExMagick
========
# ExMagick

USAGE
-----
[![Module Version](https://img.shields.io/hexpm/v/exmagick.svg)](https://hex.pm/packages/exmagick)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/exmagick/)
[![Total Download](https://img.shields.io/hexpm/dt/exmagick.svg)](https://hex.pm/packages/exmagick)
[![License](https://img.shields.io/hexpm/l/exmagick.svg)](https://github.com/Xerpa/exmagick/blob/master/LICENSE.md)
[![Last Updated](https://img.shields.io/github/last-commit/Xerpa/exmagick.svg)](https://github.com/Xerpa/exmagick/commits/master)

ExMagick is a library for manipulating images interfacing with GraphicsMagick.
It's implemented using Erlang NIFs (Native Implemented Functions).

## Installation

The package can be installed by adding `:exmagick` to your list of dependencies
in `mix.exs`:

```elixir
defp deps do
[{:exmagick, "~> 0.0.1"}]
def deps do
[
{:exmagick, "~> 1.0.0"}
]
end
```

DEPENDENCIES
------------
## Dependencies

### Linux ###
### GNU/Linux

* `libtool`
* `c compiler`
* `graphicsmagick`

#### Example: Arch Linux ####
#### Arch Linux ####

```bash
$ pacman -S gcc make libtool graphicsmagick
```

#### Example: Debian ####
#### Debian ####

```bash
$ apt-get install gcc make libtool-bin libgraphicsmagick1-dev
```

OSX:
### macOS

```bash
$ brew install libtool
$ brew install graphicsmagick
```

INSTALLING
----------
## Testing

If you have all dependencies satisfied then the following should pass:

```
```bash
$ mix test
```

DIRTY SCHEDULER
---------------
## Dirty Scheduler

The library has support for using dirty scheduler but it is disabled
by default. To enable it, define an environment variable before
compiling:

```
```bash
$ env exm_dirty_sched=auto mix compile
```

It will enable dirty scheduler support when the machine provides
support for it.

LINKS
-----
## See Also

* http://www.graphicsmagick.org/

LICENSE
-------
## Copyright and License

Copyright (c) 2015 Diego Souza

* BSD3
This library licensed under the [BSD 3-Clause "New" or "Revised" License](./LICENSE.md).
2 changes: 1 addition & 1 deletion lib/exmagick.ex
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ defmodule ExMagick do
Saves an image to one or multiple files.

If the attr `:adjoin` is `false`, multiple files will be created and the
filename is expected to have a printf-formatting sytle (ex.: `foo%0d.png`).
filename is expected to have a printf-formatting style (ex.: `foo%0d.png`).
"""
@spec image_dump(handle, Path.t()) :: {:ok, handle} | exm_error
def image_dump(handle, path), do: image_dump_file(handle, path)
Expand Down
53 changes: 39 additions & 14 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ end
defmodule ExMagick.Mixfile do
use Mix.Project

@source_url "https://github.com/Xerpa/exmagick"
@version "1.0.0"

def project do
[
app: :exmagick,
version: "1.0.0",
name: "ExMagick",
version: @version,
elixir: "~> 1.3",
description: description(),
package: package(),
deps: deps(),
docs: docs(),
aliases: aliases(),
dialyzer: [
paths: ["_build/dev/lib/exmagick/ebin/Elixir.ExMagick.beam"],
Expand All @@ -42,27 +46,48 @@ defmodule ExMagick.Mixfile do
]
end

defp description do
"""
ExMagick is a library for manipulating images interfacing with GraphicsMagick.
It's implemented using Erlang NIFs (Native Implemented Functions).
"""
end

defp package do
[
description:
"ExMagick is a library for manipulating images interfacing " <>
"with GraphicsMagick. It's implemented using Erlang NIFs " <>
"(Native Implemented Functions).",
maintainers: ["Guilherme nirev", "Diego Dsouza", "Renan Milhouse"],
licenses: ["BSD-3"],
links: %{"GitHub" => "https://github.com/Xerpa/exmagick"},
files: ["AUTHOR", "bin", "COPYING", "lib", "makefile", "mix.exs", "README.md"]
licenses: ["BSD-3-Clause"],
files: [
"AUTHOR",
"bin",
"lib",
"makefile",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
],
links: %{
"Changelog" => "https://hexdocs.pm/exmagick/changelog.html",
"GitHub" => @source_url
}
]
end

defp deps do
[
{:dialyxir, "~> 0.3.5", only: [:dev]},
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.11", only: :dev}
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end

defp docs do
[
extras: [
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"]
],
main: "readme",
source_url: @source_url,
formatters: ["html"]
]
end

Expand Down
13 changes: 10 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
%{"dialyxir": {:hex, :dialyxir, "0.3.5", "eaba092549e044c76f83165978979f60110dc58dd5b92fd952bf2312f64e9b14", [:mix], []},
"earmark": {:hex, :earmark, "0.1.19", "ffec54f520a11b711532c23d8a52b75a74c09697062d10613fa2dbdf8a9db36e", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.11.0", "da23408bf4fb4dec1250cd4785c82f240d05d81ca1c121b075d513f57661452c", [:mix], [{:earmark, "~> 0.1.17 or ~> 0.2", [hex: :earmark, optional: true]}]}}
%{
"dialyxir": {:hex, :dialyxir, "0.3.5", "eaba092549e044c76f83165978979f60110dc58dd5b92fd952bf2312f64e9b14", [:mix], [], "hexpm", "61e0fb45140079a2d40b4db617b3431dc9bb29dca7e5039d271eeaca733ed0c3"},
"earmark": {:hex, :earmark, "0.2.1", "ba6d26ceb16106d069b289df66751734802777a3cbb6787026dd800ffeb850f3", [:mix], [], "hexpm", "c86afb8d22a5aa8315afd4257c7512011c0c9a48b0fea43af7612836b958098b"},
"earmark_parser": {:hex, :earmark_parser, "1.4.15", "b29e8e729f4aa4a00436580dcc2c9c5c51890613457c193cc8525c388ccb2f06", [:mix], [], "hexpm", "044523d6438ea19c1b8ec877ec221b008661d3c27e3b848f4c879f500421ca5c"},
"ex_doc": {:hex, :ex_doc, "0.25.1", "4b736fa38dc76488a937e5ef2944f5474f3eff921de771b25371345a8dc810bc", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3200b0a69ddb2028365281fbef3753ea9e728683863d8cdaa96580925c891f67"},
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
}