Skip to content
This repository was archived by the owner on Jun 4, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leereilly/swot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ze/swot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 22 files changed
  • 1 contributor

Commits on Apr 24, 2018

  1. Port to Python

    ze committed Apr 24, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    28ab210 View commit details
  2. Update version

    ze committed Apr 24, 2018
    Copy the full SHA
    2ce0afa View commit details
Showing with 398 additions and 8,986 deletions.
  1. +0 −24 .github/PULL_REQUEST_TEMPLATE.md
  2. +7 −0 .gitignore
  3. +0 −1 .ruby-version
  4. +0 −3 .travis.yml
  5. +0 −64 CONTRIBUTING.md
  6. +0 −13 Gemfile
  7. +3 −0 MANIFEST.in
  8. +0 −117 README.md
  9. +48 −0 README.rst
  10. +0 −101 Rakefile
  11. +1 −1 VERSION
  12. +0 −93 lib/swot.rb
  13. +0 −249 lib/swot/academic_tlds.rb
  14. +0 −20 lib/swot/collection_methods.rb
  15. +37 −0 setup.py
  16. +0 −8,114 swot.gemspec
  17. +243 −0 swot.py
  18. +0 −32 test/helper.rb
  19. +0 −44 test/test_collection_methods.rb
  20. +0 −110 test/test_swot.rb
  21. +55 −0 test/tests.py
  22. +4 −0 tox.ini
24 changes: 0 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,10 @@ Gemfile.lock
*.gem
.bundle
.idea
.vscode
.mypy_cache
.tox/
__pycache__/
build/
dist/
swot.egg-info/
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

64 changes: 0 additions & 64 deletions CONTRIBUTING.md

This file was deleted.

13 changes: 0 additions & 13 deletions Gemfile

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.md
include LICENSE.txt
recursive-include lib *
117 changes: 0 additions & 117 deletions README.md

This file was deleted.

48 changes: 48 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
swot
----

If you have a product or service and offer **academic discounts**,
there's a good chance there's some manual component to the approval
process. Perhaps ``.edu`` email addresses are automatically approved
because, for the most part at least, they're associated with American
post-secondary educational institutions. Perhaps ``.ac.uk`` email
addresses are automatically approved because they're guaranteed to
belong to British universities and colleges. Unfortunately, not every
country has an education-specific TLD (Top Level Domain) and plenty of
schools use ``.com`` or ``.net``.

Swot is a community-driven or crowdsourced library for verifying that
domain names and email addresses are tied to a legitimate university of
college - more specifically, an academic institution providing higher
education in tertiary, quaternary or any other kind of post-secondary
education in any country in the world.

Installation
------------

Install swot with pip::

pip install swot

Usage
-----
::

>>> import swot

>>> swot.is_academic("student@rutgers.edu")
True
>>> swot.is_academic("coolboy1998@hotmail.com")
False

# Url's work as well
>>> swot.is_academic("https://www.brown.edu")
True
>>> swot.is_academic("http://web.mit.edu:8080")
True

# We can also get school names
>>> swot.get_school_name("ze@cornell.edu")
["Cornell University"]
>>> swot.get_school_name("harvard.edu")
["Harvard University"]
101 changes: 0 additions & 101 deletions Rakefile

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
Loading