Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscaro/fleming
Small library for browser user agent identification, based on the UADetector Java library.
https://github.com/oscaro/fleming
clojure library user-agent-parser
Last synced: 3 months ago
JSON representation
Small library for browser user agent identification, based on the UADetector Java library.
- Host: GitHub
- URL: https://github.com/oscaro/fleming
- Owner: oscaro
- License: epl-1.0
- Created: 2014-11-30T15:30:43.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-11T13:23:14.000Z (over 7 years ago)
- Last Synced: 2024-06-27T14:43:15.526Z (8 months ago)
- Topics: clojure, library, user-agent-parser
- Language: Clojure
- Homepage: https://cljdoc.org/d/com.oscaro/fleming/0.1.0/doc/readme
- Size: 7.81 KB
- Stars: 5
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fleming
Small library for browser user agent identification, based on the UADetector
Java library.[![Build Status](https://travis-ci.org/oscaro/fleming.svg?branch=master)](https://travis-ci.org/oscaro/fleming)
## Installation
Latest stable version:
[![Clojars Project](http://clojars.org/com.oscaro/fleming/latest-version.svg)](http://clojars.org/com.oscaro/fleming)
Add this to your dependencies in `project.clj`.
## Usage
```clojure
(use 'fleming.core)
(def parse-ua (make-cached-parser 1000))
(parse-ua "Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0")
;;=>
{:device-category {:category :PERSONAL_COMPUTER, :icon "desktop.png", :info-url "/list-of-ua/device-detail?device=Personal computer",
:name "Personal computer"},
:family :FIREFOX, :icon "firefox.png", :name "Firefox",
:operating-system {:family :LINUX, :family-name "Linux", :icon "linux.png", :name "Linux", :producer "", :producer-url "",
:url "http://en.wikipedia.org/wiki/Linux",
:version-number {:bugfix "", :extension "", :groups ["" "" ""], :major "", :minor ""}},
:producer "Mozilla Foundation", :producer-url "http://www.mozilla.org/", :type :BROWSER, :type-name "Browser", :url "http://www.firefox.com/",
:version-number {:bugfix "", :extension "", :groups ["33" "0" ""], :major "33", :minor "0"}}
```## License
Copyright © 2014-2017 Oscaro.com
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.