https://github.com/junker/ua-parser
User Agent Parser for Common Lisp
https://github.com/junker/ua-parser
common-lisp ua-parser user-agent user-agent-parser
Last synced: 3 months ago
JSON representation
User Agent Parser for Common Lisp
- Host: GitHub
- URL: https://github.com/junker/ua-parser
- Owner: Junker
- License: mit
- Created: 2023-11-18T05:06:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-18T04:55:23.000Z (over 1 year ago)
- Last Synced: 2025-01-01T01:45:36.442Z (5 months ago)
- Topics: common-lisp, ua-parser, user-agent, user-agent-parser
- Language: Common Lisp
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UA-Parser
User Agent Parser for Common Lisp.
## Installation
This system can be installed from [UltraLisp](https://ultralisp.org/) like this:
```common-lisp
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload "ua-parser")
```## Usage
```common-lisp
(defvar *ua* "Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36")
;; *UA*(ua-parser:parse *ua*)
;; (:UA (:FAMILY "Chrome Mobile" :MAJOR "112" :MINOR "0" :PATCH "0")
;; :OS (:FAMILY "Android" :MAJOR "13" :MINOR NIL :PATCH NIL)
;; :DEVICE (:FAMILY "Pixel 6" :BRAND "Google" :MODEL "Pixel 6"))(ua-parser:os-parse *ua*)
;; (:FAMILY "Android" :MAJOR "13" :MINOR NIL :PATCH NIL)(ua-parser:family-parse *ua*)
;; (:FAMILY "Chrome Mobile" :MAJOR "112" :MINOR "0" :PATCH "0")(ua-parser:device-parse *ua*)
;; (:FAMILY "Pixel 6" :BRAND "Google" :MODEL "Pixel 6")```
## Credits
Using regexp list from https://github.com/ua-parser/uap-core
## License
- The system is licensed under the MIT license
- The data contained in `regexes.lisp` is Copyright 2009 Google Inc. and available under the Apache License, Version 2.0.