Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump version to 0.5.1 #36

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

Closed
wants to merge 694 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
694 commits
Select commit Hold shift + click to select a range
1fdb0de
Fixing travis.yml
lstrojny Nov 9, 2013
2a79e36
Add link to whatsmy.info to README.
sandinmyjoints Nov 9, 2013
2f623a7
New CLI tools for travis
lstrojny Nov 10, 2013
e4c410d
Updating README
lstrojny Nov 10, 2013
ebf8ba1
Merge pull request #305 from enemaerke/master
enemaerke Nov 18, 2013
0ab719d
identify bingbot as a Spider
Nov 19, 2013
732c106
Kindle Fire HDX support
Oct 31, 2013
92ab148
Merge pull request #308 from lstrojny/feature/modernization
tobie Dec 2, 2013
8a39909
Using regexes.php file instead of regexes.json
lstrojny Dec 8, 2013
fb7e296
Updating maintainer
lstrojny Dec 8, 2013
06dd149
Merge pull request #316 from lstrojny/feature/php-array-file
lstrojny Dec 8, 2013
78e6c3f
Smaller cleanups
lstrojny Dec 8, 2013
fef7f3f
Excluding performance test
lstrojny Dec 8, 2013
be831b4
OCD
lstrojny Dec 9, 2013
38d209d
Merge pull request #303 from gregorydanko/kindlefire
commenthol Dec 10, 2013
4972b73
Test case for Issue #297
Dec 11, 2013
21dc0a6
Issue 297: Move Firefox patterns between IE11 and other IE
Dec 11, 2013
7c978e1
Adding entry for LinkedInBot
niklasae Dec 12, 2013
0f36164
Clean out extra space
niklasae Dec 12, 2013
11aa16b
Use packaged regexes.yaml and not fetch it from remote
lstrojny Dec 18, 2013
b42ddd0
Merge pull request #311 from rottenbytes/bingbot
lstrojny Dec 18, 2013
d15a0f7
Updating docs
lstrojny Dec 21, 2013
904b4f3
Merge branch 'master' into feature/split-parsers
lstrojny Dec 21, 2013
82e87a8
Merge pull request #317 from tobie/feature/split-parsers
lstrojny Dec 21, 2013
6ae0d60
Airmail,Outlook,Thunderbird new. Lightning updated
epgrubmair Jan 8, 2014
81d0788
Outlook,Airmail,Thunderbird,Applemail unit tests for js fixed
epgrubmair Jan 9, 2014
767ffa8
Merge pull request #325 from epgrubmair/mail_clients_1
tobie Jan 10, 2014
64d1194
Merge pull request #321 from tobie/feature/simplified-constructor
lstrojny Jan 19, 2014
3dcb264
Merge pull request #327 from antonioribeiro/patch-1
lstrojny Jan 19, 2014
a839825
Update npmignore
jakub-g Jan 27, 2014
b405175
Include tablets in 'Firefox OS' os detection.
Jan 21, 2014
b56f634
Merge pull request #337 from jakub-g/npmignore
tobie Jan 28, 2014
2c90baa
Merge pull request #331 from miketaylr/fx-tablet
tobie Jan 28, 2014
887fc0d
Merge pull request #335 from ChrisMcKee/master
enemaerke Jan 31, 2014
371b524
Add Google+ Bot detection
spadgos Mar 5, 2014
4508649
Adds test for Google Plus bot
spadgos Mar 5, 2014
d24541b
Merge pull request #345 from spadgos/patch-1
lstrojny Mar 5, 2014
0b2fd75
Merge pull request #292 from lcalvy/master
lstrojny Mar 20, 2014
6c15275
Better detection of QQ browsers.
lostsnow Mar 27, 2014
ed7f575
Merge pull request #353 from lostsnow/master
lstrojny Mar 27, 2014
3e3d2f3
Vodafone is not a Browser
commenthol Mar 30, 2014
064c574
Merge pull request #359 from commenthol/vodafone
lstrojny Mar 31, 2014
d779ce0
Detection of iBrowser, iRapp
commenthol Mar 30, 2014
ab63d80
Detect Windows NT 6.3 as Windows 8.1
commenthol Mar 31, 2014
e64bad0
Corrects detection of Symbian-OS
commenthol Mar 31, 2014
66f3140
Merge pull request #364 from commenthol/ossymbian
lstrojny Apr 1, 2014
4ce232d
Better detection of iOS from In-App Browsing
commenthol Mar 31, 2014
09a3feb
Merge pull request #358 from commenthol/ibrowserirapp
lstrojny Apr 1, 2014
5afa518
Merge pull request #363 from commenthol/oswin8.1
lstrojny Apr 1, 2014
27d5c3e
Merge pull request #365 from commenthol/osiosapp
lstrojny Apr 1, 2014
92670a2
Detect OS for OperaMini on Bada
commenthol Mar 31, 2014
bc68149
simplified regex operamini
commenthol Mar 30, 2014
b66236d
testcases for Opera Mini/att/ added
commenthol Mar 31, 2014
c8b309b
better detection of opera mobile
commenthol Mar 30, 2014
948c24b
testcase fixed
commenthol Apr 1, 2014
538e098
Merge pull request #367 from commenthol/osoperaminibada
lstrojny Apr 2, 2014
fb3cfce
Merge pull request #357 from commenthol/operamini
lstrojny Apr 2, 2014
a998d15
Merge pull request #356 from commenthol/operamobi
lstrojny Apr 2, 2014
727e062
Better detection of Android Version; Simplified regex
commenthol Mar 31, 2014
c39532b
Merge pull request #360 from commenthol/osandroid
lstrojny Apr 2, 2014
f072f6b
Better detection of Linux Distributions, Versions
commenthol Mar 31, 2014
24a0230
Merge pull request #334 from selwin/master
elsigh Apr 2, 2014
dcb543a
Merge pull request #369 from commenthol/oslinux
lstrojny Apr 2, 2014
e4ad1b2
Better OS detection for UCBrowser
commenthol Mar 31, 2014
cf01b22
qqbrowser: refactored regexes; mqqbrowser/mini added
commenthol Mar 30, 2014
46efef5
Better Detection of GoogleTV; Joined Regex
commenthol Mar 31, 2014
b9bbd24
Better OS-detection for Windows Phone and other Windows Os
commenthol Mar 31, 2014
8ea73d1
Merge pull request #361 from commenthol/osucweb
lstrojny Apr 4, 2014
4adaff3
Merge pull request #355 from commenthol/qqbrowser
lstrojny Apr 4, 2014
1e5d218
Merge pull request #366 from commenthol/osgoogletv
lstrojny Apr 4, 2014
5950b67
Merge pull request #362 from commenthol/oswindows
lstrojny Apr 4, 2014
a0ae29c
Delete doubled test cases
commenthol Apr 6, 2014
978240e
Detection of Dolphin Browser (Android + iOs)
commenthol Apr 6, 2014
af0f8c2
Detection of Nokia Series 30Plus added
commenthol Apr 6, 2014
af7c0cd
Merge pull request #372 from commenthol/os-series30
lstrojny Apr 7, 2014
4622d6c
Adding Googlebot/2.1 as spider
yurigorokhov Apr 14, 2014
1539740
Removing unnecessary line change
yurigorokhov Apr 14, 2014
aff83c1
Making version a regex
yurigorokhov Apr 15, 2014
b86b2e8
Removing regex groups
yurigorokhov Apr 15, 2014
0471f07
Merge pull request #377 from yurigorokhov/googlebot-spider
lstrojny Apr 16, 2014
40eab92
Adding Netvibes as Spider
commenthol Apr 16, 2014
61b90af
Merge pull request #379 from commenthol/device-spider-netvibes
lstrojny Apr 17, 2014
2ea5508
Detection of CFNetwork and iOS Applications
commenthol Apr 23, 2014
b397a3a
Merge pull request #381 from commenthol/ua-cfnetwork
lstrojny Apr 23, 2014
9ee943d
add Sogou Pic Spider to the regexes
Ironholds Apr 27, 2014
c5342b9
add test for Sogu Pic Spider
Ironholds Apr 27, 2014
29c617c
Clarify copyright status of the project(s)
Ironholds Apr 28, 2014
cff05c9
Merge pull request #383 from Ironholds/master
lstrojny May 3, 2014
341b8fd
Squashed spider additions
May 6, 2014
9c5ad9d
Merge pull request #388 from Ironholds/master
lstrojny May 6, 2014
5eb58f4
Merge pull request #391 from atifaziz/net35
enemaerke May 21, 2014
d0dc607
Merge pull request #393 from atifaziz/issue-390
enemaerke May 21, 2014
73e003a
Merge pull request #394 from atifaziz/cs-app-top
enemaerke May 21, 2014
1582762
Merge pull request #395 from atifaziz/cs-app
enemaerke May 21, 2014
bb080b3
Modify several regexes to accept more UA strings.
keshonok May 21, 2014
eb8d91c
Merge pull request #398 from atifaziz/cs-funk
enemaerke May 24, 2014
2dea937
Merge pull request #400 from enemaerke/master
enemaerke May 25, 2014
1e5ff4c
Added Android 4.4.2 tests to user agent. Added Nexus 5 test to devices.
markchalloner May 27, 2014
86e3f57
Updated parser to expect Chrome Mobile for Nexus 5 instead of the OS …
markchalloner May 27, 2014
1e39b66
Update the Haskell section in the README
basvandijk Jul 9, 2014
1d44ed5
Update haskell example
deckool Aug 13, 2014
93f91f6
Merge pull request #424 from deckool/patch-1
tobie Aug 15, 2014
333046f
Revert "Update haskell example"
tobie Aug 15, 2014
0ae8194
Merge pull request #425 from tobie/revert-424-patch-1
tobie Aug 15, 2014
e611e3b
Merge pull request #416 from basvandijk/update-haskell-docs
tobie Aug 15, 2014
a529bab
Merge pull request #402 from markchalloner/master
tobie Aug 15, 2014
d83daa1
Merge pull request #397 from keshonok/keshonok_regexes
tobie Aug 15, 2014
0b29c99
Merge pull request #384 from Ironholds/patch-1
tobie Aug 15, 2014
ebae315
Merge pull request #312 from teambob/master
tobie Aug 15, 2014
f5936f7
Fixed regex for Opera Mobile to work with preg_match in php.
Aug 17, 2014
de9b5a6
Merge pull request #426 from ryancwarren/master
Ironholds Aug 17, 2014
321039c
New entries for Spiders, Espial Smart TV, plus fixes for Windows Phon…
gquinones Aug 21, 2014
c302657
Merge pull request #429 from gquinones/master
Ironholds Aug 21, 2014
a10a95d
add new spider regex definitions and associated tests
Aug 22, 2014
39e9571
Merge pull request #430 from Ironholds/master
Ironholds Aug 22, 2014
95d0d9a
Refined descriptions of CFNetwork versions of iOS. Added PlayStation …
gquinones Aug 22, 2014
3a3cde8
merged tobie
gquinones Aug 22, 2014
f06245d
Merge pull request #431 from gquinones/master
Ironholds Aug 22, 2014
bd32948
Merge pull request #347 from asuhan/master
Ironholds Aug 22, 2014
b209449
Merge pull request #401 from atifaziz/cs-app-cleanup
Ironholds Aug 22, 2014
1b5f67b
Merge pull request #309 from sandinmyjoints/link-readme-to-whatsmyua-…
Ironholds Aug 23, 2014
4304448
Merge pull request #434 from emidln/emidln/add_dollar1_os_replacement…
Ironholds Aug 29, 2014
36cb9b6
Merge pull request #439 from tmeryu/add-gae-support
Ironholds Sep 2, 2014
e2704fb
issue #440 - correct nodejs documentation
commenthol Sep 3, 2014
f738948
Merge pull request #441 from commenthol/fix-nodejs-documentation
commenthol Sep 3, 2014
73543da
Add a spider (Riddler) that spams me.
cxmcc Sep 9, 2014
39fed99
Merge pull request #442 from cxmcc/bots
Ironholds Sep 10, 2014
63ac89d
Adding DBot into spider pattern.
Sep 12, 2014
1f892c9
Adding 'wsr-agent/1.0' to spider list.
cxmcc Sep 13, 2014
589c6f8
Merge pull request #443 from openmail/openmail
Ironholds Sep 14, 2014
771195e
simplify the spider-handling regex
Sep 14, 2014
559dc9a
Add manuafacturer info, fix too greedy regexes, improve andoid device…
cjnoyescrisp Sep 17, 2014
ff81242
Add manuafacturer info, fix too greedy regexes, improve andoid device…
cjnoyescrisp Sep 17, 2014
a0b8d13
Merge pull request #447 from cjnoyescrisp/master
Ironholds Sep 18, 2014
0037cea
Merge pull request #449 from ceocoder/generate_valid_json
Ironholds Sep 25, 2014
a472a17
add Xenu to the spider IDing
Sep 28, 2014
6ba5265
it's become clear that the ua-parsing is, at least in Python, not cas…
Sep 28, 2014
b16e246
autocomplete
Sep 28, 2014
a1d06a7
add SeznamBot to Spider IDs
Sep 28, 2014
bffff1d
add PaperLiBot to Spider IDs
Sep 28, 2014
0ca6c35
add SputnikBot to Spider IDs
Sep 28, 2014
3835df2
add CCBot to Spider IDs
Sep 28, 2014
4814714
add ProoXiBot
Sep 30, 2014
9d4a87d
add Scrapy
Sep 30, 2014
2fa4d96
Fix Amazon Silk detection
drucifer Oct 7, 2014
404d290
Fix Mobile Safari version # regex
drucifer Oct 7, 2014
4edf05d
Add test cases
drucifer Oct 7, 2014
34f9021
Retain patch number for Mobile Safari
drucifer Oct 7, 2014
447a3fe
Move Silk even earlier in file to take priority over Chrome Mobile
drucifer Oct 7, 2014
dbaa6f3
Move NetFront to stay a step ahead of the new location of Silk
drucifer Oct 7, 2014
3ef738b
Removing YamlDotNet dependency, replaced with minimal text parsing
enemaerke Oct 7, 2014
3b5b293
Merge pull request #453 from enemaerke/master
enemaerke Oct 9, 2014
0963c3f
Merge pull request #455 from floydsoft/patch-1
Ironholds Oct 15, 2014
46c18ea
Merge pull request #452 from drucifer/master
Ironholds Oct 25, 2014
2afc041
Merge pull request #380 from somechris/java-versioning
Ironholds Oct 27, 2014
b3dbd2f
Merge pull request #457 from onkarjanwa/patch-1
Ironholds Oct 28, 2014
dff9b29
Puffin Browser added
commenthol Oct 30, 2014
82c45eb
fix Puffin Browser missing patch version
commenthol Oct 30, 2014
5e70610
Merge pull request #460 from commenthol/ua-puffin
Ironholds Oct 30, 2014
abaf8e0
add new spiders
Nov 3, 2014
ce18019
Merge pull request #462 from Ironholds/master
Ironholds Nov 3, 2014
3a5181d
more crawlers
Nov 4, 2014
da4c1ff
Merge pull request #463 from Ironholds/master
Ironholds Nov 4, 2014
8957274
Improve Travis testing call
Ironholds Nov 5, 2014
0f67779
Update README.markdown
tobie Nov 7, 2014
bdb7f36
current state brand model parsing
commenthol Nov 6, 2014
1ac96a7
Merge pull request #466 from commenthol/brand-model-progress
Ironholds Nov 7, 2014
4bae085
slight tweak
Ironholds Nov 7, 2014
c78e57c
Revert "Current State Brand-Model Parsing"
tobie Nov 7, 2014
229a772
Merge pull request #469 from tobie/revert-466-brand-model-progress
Ironholds Nov 7, 2014
4a1406d
0.3.4
tobie Nov 8, 2014
830e691
initial project setup
commenthol Nov 28, 2014
2d558b8
IE TechPreview uses Edge
commenthol Nov 29, 2014
94502d5
Add irc notifications on build tests.
tobie Nov 29, 2014
74a8867
Fix package.json after migration.
tobie Nov 29, 2014
3bf98d2
Pick a less verbose test reporter.
tobie Nov 29, 2014
0e4c833
Merge pull request #7 from tobie/cleanup-pkg
commenthol Nov 29, 2014
74ec2fa
Rename README file for consistency.
tobie Nov 29, 2014
7d4ca96
Merge pull request #8 from tobie/rename
commenthol Nov 29, 2014
28ad0ba
Specification 0.1 Draft
commenthol Nov 29, 2014
e5e73ff
Specification
tobie Feb 17, 2014
fcee669
tests README added
tobie Feb 17, 2014
c19a040
minor fix
tobie Feb 17, 2014
5657c92
test suites separated
commenthol Nov 22, 2014
cdd5a67
move Netfront to prevous place
commenthol Nov 29, 2014
dc5e464
Merge pull request #9 from commenthol/specification
Ironholds Nov 29, 2014
5a04429
Merge pull request #11 from commenthol/testsuites
Ironholds Nov 29, 2014
7855e1b
Merge pull request #12 from commenthol/ua-netfront-move
Ironholds Nov 29, 2014
68a36da
Revert "move Netfront to prevous place"
tobie Nov 29, 2014
aed7c69
Revert "Testsuites"
tobie Nov 29, 2014
2d003a5
Merge pull request #15 from ua-parser/revert-11-testsuites
Ironholds Nov 29, 2014
d07f5fc
Merge pull request #14 from ua-parser/revert-12-ua-netfront-move
Ironholds Nov 29, 2014
c38841b
dot removed
commenthol Nov 29, 2014
8ca30c4
Merge pull request #16 from commenthol/dot-removed
tobie Nov 29, 2014
b4b1625
change yaml format to match others
commenthol Nov 29, 2014
0c1abc3
Merge pull request #13 from commenthol/pgts-yaml-format
tobie Dec 3, 2014
d64e9fc
Improve documentation formatting
bnjmnt4n Dec 7, 2014
3bcfde4
Merge pull request #18 from d10/docs
Ironholds Dec 9, 2014
f5a0250
Add new Opera browsers: Coast and Opera Mini
r4fek Dec 13, 2014
c92cdb5
Merge pull request #19 from r4fek/opera-regexes
Ironholds Dec 13, 2014
3021618
brand-model parsing with current test set
commenthol Nov 22, 2014
1600390
testcases brand model
commenthol Nov 22, 2014
b3a6e3e
test_device_brandmodel.yaml merged into test_device.yaml
commenthol Dec 4, 2014
22ef8a1
Merge pull request #10 from commenthol/brand-model
tobie Jan 12, 2015
e3eb7b7
fix-replacement-groups
commenthol Feb 1, 2015
3d089cc
updating ua object to match implementations
diminished Feb 5, 2015
5b03726
Update specification.md
diminished Feb 6, 2015
f6ccc13
Update specification.md
diminished Feb 9, 2015
88eabe5
Merge pull request #26 from diminished/master
commenthol Feb 11, 2015
b928927
test device model and brand values
mrjgreen Mar 29, 2015
c4e479e
Windows 10 detection
Apr 9, 2015
ee28e35
Windows NT 6.4 is also Windows 10
Apr 10, 2015
8f7aae8
Merge pull request #37 from mrjgreen/test-device
elsigh Apr 14, 2015
73be54d
added failing test for thomson hbbtv
Apr 15, 2015
a431239
passing hbbtv test
Apr 15, 2015
207971c
Merge pull request #44 from mrjgreen/hbbtv-thomson
commenthol Apr 15, 2015
69d3a35
Merge pull request #42 from yozik04/master
commenthol Apr 15, 2015
9bb7724
Merge pull request #25 from commenthol/fix-replacement-groups
commenthol Apr 15, 2015
f3000a7
Add regex and test for Vivaldi (https://vivaldi.com/)
Apr 30, 2015
05dc6ff
Merge pull request #47 from bluesmoon/add-vivaldi
commenthol May 1, 2015
553471e
- add Mac OS X Yosemite, CFNetwork/711 and 720 versions;
May 12, 2015
218c268
Merge pull request #52 from obormot/apple_updates
commenthol May 14, 2015
d431bec
MacAppStore added
commenthol May 1, 2015
5d97a93
Merge pull request #48 from commenthol/macappstore
commenthol May 14, 2015
3e69839
iTunes added
commenthol May 1, 2015
783cf47
Merge pull request #50 from commenthol/itunes
commenthol May 14, 2015
42b4eff
better detection of Mac OS X
commenthol May 1, 2015
49d2ed1
Merge pull request #49 from commenthol/osx
commenthol May 14, 2015
edf2249
better bot detection
commenthol Feb 11, 2015
7977294
Merge pull request #27 from commenthol/better-bot-detection
commenthol May 14, 2015
6fd6c26
Fixed HbbTV/Thomson regex
May 14, 2015
27a4703
Merge pull request #53 from russellwhitaker/rw/correct-hbbtv-thomson-14
commenthol May 14, 2015
e1e4b32
Corrected device_parser section example and family_replacement
Jun 1, 2015
1dbefc4
Removed js_ua from browser test fixtures and removed references in te…
Jun 3, 2015
3f2f648
Merge pull request #57 from russellwhitaker/rw/update_specification_d…
elsigh Jun 3, 2015
f3f0be8
Merge pull request #58 from russellwhitaker/rw/remove_js_ua
elsigh Jun 3, 2015
87b6282
Fixed MS Edge detection (Edge != IE)
nicole-ashley Jun 4, 2015
d6488da
Add Java user agent family
housepage Jun 5, 2015
dbe4d49
Add tests for add Java user agent family
housepage Jun 5, 2015
57b37b6
Merge pull request #59 from nikrolls/fix-ms-edge-detection
commenthol Jun 15, 2015
caf64e1
Merge pull request #60 from housepage/add-java-user-agent-family
commenthol Jun 15, 2015
0fdc414
removal of negative lookaheads
commenthol Jun 26, 2015
8433fa6
Merge pull request #64 from commenthol/no-neg-lookahead
elsigh Jul 2, 2015
c9c7483
Fix a bug in one of the Android regexps.
csilvers Jul 31, 2015
146cd3b
Add a test!
csilvers Jul 31, 2015
0adc071
Merge pull request #73 from csilvers/master
elsigh Aug 3, 2015
b017cd0
Merge uap-core
selwin Oct 14, 2015
20abd66
Merge branch 'master' of https://github.com/ua-parser/uap-python
selwin Oct 14, 2015
f4ea8e3
Merge branch 'master' of https://github.com/ua-parser/uap-python
selwin Nov 11, 2015
b6c3dc9
Bump up version to 0.5.1
selwin Nov 11, 2015
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
node_modules/
*.pyc
*.egg-info/
.eggs/
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Contributing Changes to regexes.yaml
------------------------------------

Contributing to the project, especially `regexes.yaml`, is both welcomed and encouraged. To do so just do the following:

1. Fork the project
2. Create a branch for your changes
3. Modify `regexes.yaml` as appropriate
4. Add relevant tests to the following files and follow their format:
* `tests/test_device.yaml`
* `tests/test_os.yaml`
* `tests/test_ua.yaml`
5. Push your branch to GitHub and submit a pull request
6. Monitor the pull request to make sure the Travis build succeeds. If it fails simply make the necessary changes to your branch and push it. Travis will re-test the changes.

That's it. If you don't feel comfortable forking the project or modifying the YAML you can also [submit an issue](https://github.com/ua-parser/uap-core/issues) that includes the appropriate user agent string and the expected results of parsing.

Thanks!
16 changes: 16 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Apache License, Version 2.0
===========================

Copyright 2009 Google Inc.

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

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.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

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

This has an unresolved merge conflict, which is also reflected on pypi. :(

#uap-python
A python implementation of the UA Parser (https://github.com/ua-parser, formerly https://github.com/tobie/ua-parser)

Expand Down Expand Up @@ -87,3 +88,39 @@ make Makefile

Copyright 2008 Google Inc. See ua_parser/LICENSE for more information

=======
uap-core [![Build Status](https://secure.travis-ci.org/ua-parser/uap-core.png?branch=master)](https://travis-ci.org/ua-parser/uap-core)
========

This repository contains the core of [BrowserScope][2]'s original [user agent string parser][3]: data collected over the years by [Steve Souders][4] and numerous other contributors, extracted into a separate [YAML file][5] so as to be reusable _as is_ by implementations in any programming language.

This repo itself does _not_ contain a parser: only the necessary data to build one. There exists a ref implementation, along with multiple, production-ready implementations in various programming languages.

Maintainers
-----------

* [Lindsey Simon](https://github.com/elsigh) ([@elsigh](https://twitter.com/elsigh))
* [Tobie Langel](https://github.com/tobie) ([@tobie](https://twitter.com/tobie))

Communication channels
-----------------------

* \#ua-parser on freenode <irc://chat.freenode.net#ua-parser>
* [mailing list](https://groups.google.com/forum/#!forum/ua-parser)

Contributing Changes to regexes.yaml
------------------------------------

Please read the [contributors' guide](CONTRIBUTING.md)

License
-------

The data contained in `regexes.yaml` is Copyright 2009 Google Inc. and available under the [Apache License, Version 2.0][6].

[2]: http://www.browserscope.org
[3]: http://code.google.com/p/ua-parser/
[4]: http://stevesouders.com/
[5]: https://raw.github.com/ua-parser/uap-core/master/regexes.yaml
[6]: http://www.apache.org/licenses/LICENSE-2.0
>>>>>>> 0adc0716a0976ea0472a43d32e7c7a5f584b4e30
204 changes: 204 additions & 0 deletions docs/specification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# ua-parser Specification

Version 0.2 Draft

This document describes the specification on how a parser must implement the `regexes.yaml` file for correctly parsing user-agent strings on basis of that file.

This specification intends to help maintainers and contributors to correctly use the provided information within the `regexes.yaml` file for obtaining information from the different user-agent strings. Furthermore this specification tries to be the basis for discussions on evolving the projects and the needed parsing algorithms.

This document will not provide any information on how to implement the ua-parser project on your server and how to retreive the user-agent string for further processing.

# `regexes.yaml`

Any information which can be obtained from a user-agent string may contain information on:

* User-Agent aka “the browser”
* OS (Operating System) the User-Agent currently uses (or runs on)
* Device information by means of the physical device the User-Agent is using

This information is provided within the `regexes.yaml` file. Each kind of information requires a different parser which extracts the related type. These are:

* `user_agent_parser`
* `os_parsers`
* `device_parsers`

Each parser contains a list of regular-expressions which are named `regex`. For each `regex` replacements specific to the parser can be named to attribute or change information. A replacement may require a match from the regular-expression which is extracted by an expression enclosed in normal brackets `"()"`. Each match can be addressed with `$1` to `$9` and used in a parser specific replacement.

**TODO**: Provide some insights into the used chars. E.g. escape `"."` as `"\."` and `"("` as `"\("`. `"/"` does not need to be escaped.

## `user_agent_parsers`

The `user_agent_parsers` returns information of the `family` type of the User-Agent.
If available the version infomation specifying the `family` may be extracted as well if available.
Here major, minor and patch version information can be addressed or overwritten.

| match in regex | default replacement | placeholder in replacement | note |
| ---- | ------------------- | ---- | --------------------------------------- |
| 1 | family_replacement | $1 | specifies the User-Agents family |
| 2 | v1_replacement | $2 | major version number/info of the family |
| 3 | v2_replacement | $3 | minor version number/info of the family |
| 4 | v3_replacement | $4 | patch version number/info of the family |

In case that no replacement is specified, the association is given by order of the match. If in the `regex` no first match (within normal brackets) is given, the `family_replacement` shall be specified!
To overwrite the respective value the replacement value needs to be named for a `regex`-item.

**Parser Implementation:**

The list of regular-expressions `regex` shall be evaluated for a given user-agent string beginning with the first `regex`-item in the list to the last item. The first matching `regex` stops processing the list. Regex-matching shall be case sensitive.

In case that no replacement for a match is specified for a `regex`-item, the first match defines the `family`, the second `major`, the third `minor`and the forth `patch` information.
If a `*_replacement` string is specified it shall overwrite or replace the match.

As placeholder for inserting matched characters use within
* `family_replacement`: `$1`
* `v1_replacement`: `$2`
* `v2_replacement`: `$3`
* `v3_replacement`: `$4`

If no matching `regex` is found the value for `family` shall be “Other”. The version information `major`, `minor` and `patch` shall not be defined.

**Example:**

For the User-Agent: `Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b3pre) Gecko/20100727 Minefield/4.0.1pre`
the matching `regex`:

```
- regex: '(Namoroka|Shiretoko|Minefield)/(\d+)\.(\d+)\.(\d+(?:pre)?)'
family_replacement: 'Firefox ($1)'
```

resolves to:

```
family: Firefox (Minefield)
major : 4
minor : 0
patch : 1pre
```

## `os_parsers`

The `os_parsers` return information of the `os` type of the Operating System (OS) the User-Agent runs.
If available the version information specifying the `os` may be extracted as well if available.
Here major, minor and patch version information can be addressed or overwritten.

| match in regex | default replacement | placeholder in replacement | note |
| ---- | ----------------- | ---- | ---------------------------------------- |
| 1 | os_replacement | $1 | specifies the OS |
| 2 | os_v1_replacement | $2 | major version number/info of OS |
| 3 | os_v2_replacement | $3 | minor version number/info of the OS |
| 4 | os_v3_replacement | $4 | patch version number/info of the OS |
| 5 | os_v4_replacement | $5 | patchMinor version number/info of the OS |

In case that no replacement is specified, the association is given by order of the match. If in the `regex` no first match (within normal brackets) is given, the `os_replacement` shall be specified!
To overwrite the respective value the replacement value needs to be named for a `regex`-item.

**Parser Implementation:**

The list of regular-expressions `regex` shall be evaluated for a given user-agent string beginning with the first `regex`-item in the list to the last item. The first matching `regex` stops processing the list. Regex-matching shall be case sensitive.

In case that no replacement for a match is specified for a `regex`-item, the first match defines the `os` family, the second `major`, the third `minor`, the forth `patch` and the fifth `patchMinor` version information.
If a `*_replacement` string is specified it shall overwrite or replace the match.

As placeholder for inserting matched characters use within
* `os_replacement`: `$1`
* `os_v1_replacement`: `$2`
* `os_v2_replacement`: `$3`
* `os_v3_replacement`: `$4`
* `os_v4_replacement`: `$5`

In case that no matching `regex` is found the value for `os` shall be “Other”. The version information `major`, `minor`, `patch` and `patchMinor` shall not be defined.

**Example:**

For the User-Agent: `Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.1) Gecko/20020826`
the matching `regex`:

```
- regex: 'Win(95|98|3.1|NT|ME|2000)'
os_replacement: 'Windows $1'
```

resolves to:

```
os: Windows 95
```

## `device_parsers`

The `device_parsers` return information of the device `family` the User-Agent runs on.
Furthermore `brand` and `model` of the device can be specified.
`brand` names the manufacturer of the device, where model specifies the model of the device.

| match in regex | default replacement | placeholder in replacement | note |
| ---- | ------------------ | ------- | ---------------------------------------- |
| 1 | device_replacement | $1...$9 | specifies the device family |
| any | brand_replacement | $1...$9 | major version number/info of OS |
| 1 | model_replacement | $1...$9 | minor version number/info of the OS |

In case that no replacement is specified the association is given by order of the match.
If in the `regex` no first match (within normal brackets) is given the `device_replacement` together with the `model_replacement` shall be specified!
To overwrite the respective value the replacement value needs to be named for a given `regex`.

For the `device_parsers` some `regex` require case insensitive parsing for proper matching. (E.g. Generic Feature Phones). To distinguish this from the case sensitive default case, the value `regex_flag: 'i'` is used to indicate that the regular-expression matching shall be case-insensitive for this regular expression.

**Parser Implementation:**

The list of regular-expressions `regex` shall be evaluated for a given user-agent string beginning with the first `regex`-item in the list to the last item. The first matching `regex` stops processing the list. Regex-matching shall be case sensitive.

In case that no replacement for a match is given, the first match defines the `family` and the `model`.
If a `*_replacement` string is specified it shall overwrite or replace the match.

As placeholder for inserting matched characters `$1` to `$9` can be used to insert the matched characters from the regex into the replacement string.

In case that no matching `regex` is found the value for `family` shall be “Other”. `brand` and `model` shall not be defined.
Leading and tailing whitespaces shall be trimmed from the result.

**Example:**

For the User-Agent: `Mozilla/5.0 (Linux; U; Android 4.2.2; de-de; PEDI_PLUS_W Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30`
the matching `regex`:

```
- regex: '; *(PEDI)_(PLUS)_(W) Build'
device_replacement: 'Odys $1 $2 $3'
brand_replacement: 'Odys'
model_replacement: '$1 $2 $3'
```

resolves to:

```
family: 'Odys PEDI PLUS W'
brand: 'Odys'
model: 'PEDI PLUS W'
```

# Parser Output

To allow interoperability with code that builds upon ua-parser, it is recommended to provide the parser output in a standardized way. The structure defined in [WebIDL](http://www.w3.org/TR/WebIDL/) may follow:

```
interface ua-parser-output {
attribute string string; // The "user-agent" string
object ua: { // The "user_agent_parsers" result
attribute string family;
attribute string major;
attribute string minor;
attribute string patch;
};
object os: { // The "os_parsers" result
attribute string family;
attribute string major;
attribute string minor;
attribute string patch;
attribute string patchMinor;
};
object device: { // The "device_parsers" result
attribute string family;
attribute string brand;
attribute string model;
};
};
```
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "uap-core",
"description": "The regex file necessary to build language ports of Browserscope's user agent parser.",
"version": "0.4.0",
"maintainers": [
{
"name": "Tobie Langel",
"email": "[email protected]",
"web": "http://tobielangel.com"
},
{
"name": "Lindsey Simon",
"email": "[email protected]",
"web": "http://www.idreamofuni.com"
}
],
"repository": {
"type": "git",
"url": "http://github.com/ua-parser/uap-core.git"
},
"licenses": [
{
"type": "Apache-2.0",
"url": "https://raw.github.com/ua-parser/uap-core/master/LICENSE"
}
],
"devDependencies": {
"yamlparser": ">=0.0.2",
"mocha": "*",
"uap-ref-impl": "*"
},
"scripts": {
"test": "mocha -u tdd -R min ./tests/test.js"
}
}
Loading