magic
Version, currently 0.1.01 version
- 0.1.0latestJun 8, 2021
github.com/naqvis/magic.cr
Crystal bindings to libmagic
7 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
magic:
github: naqvis/magic.cr
version: ~> 0.1.0Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Ali Naqvi <syed.alinaqvi@gmail.com>
Dependencies
This version declares no dependencies.
README
# magic.cr
Crystal bindings to `libmagic`.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
magic:
github: naqvis/magic.cr
```
2. Run `shards install`
## Usage
```crystal
require "magic"
# File Name
puts Magic.detect("README.md")
# File object
File.open("README.md") do |file|
puts Magic.detect(file)
end
# Contents
puts Magic.detect(File.read("README.md").to_slice)
```
## Contributing
1. Fork it (<https://github.com/naqvis/magic.cr/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Ali Naqvi](https://github.com/naqvis) - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jun 8, 2021
- Commit
48388767a31b- Crystal
1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/naqvis/magic.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1