swot

package module
v0.0.0-...-bd6130d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 7 Imported by: 0

README ¶

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.

Pop quiz: Which of the following domain names should be eligible for an academic discount? stanford.edu, america.edu, duep.edu, gla.ac.uk, unizar.es, usask.ca, hil.no, unze.ba, fu-berlin.de, ecla.de, bvb.de, lsmu.com. Answers at the foot of the page.

Installation

go get -u github.com/Mathpix/swot

Usage
import "github.com/Mathpix/swot"
Verify Email Addresses
swot.IsAcademic("lreilly@stanford.edu")           // true
swot.IsAcademic("lreilly@strath.ac.uk")           // true
swot.IsAcademic("lreilly@soft-eng.strath.ac.uk")  // true
swot.IsAcademic("pedro@ugr.es")                   // true
swot.IsAcademic("lee@uottawa.ca")                 // true
swot.IsAcademic("lee@leerilly.net")               // false
Verify Domain Names
swot.IsAcademic("harvard.edu")              // true
swot.IsAcademic("www.harvard.edu")          // true
swot.IsAcademic("http://www.harvard.edu")   // true
swot.IsAcademic("http://www.github.com")    // false
swot.IsAcademic("http://www.rangers.co.uk") // false
Find School Names
swot.GetSchoolName("lreilly@cs.strath.ac.uk")
// "University of Strathclyde"

swot.GetSchoolName("http://www.stanford.edu")
// "Stanford University"
Known Issues
  • You can search by email and domain names only. You cannot search by IP.
  • You don't know if the email address belongs to a student, faculty, staff member, alumni, or a contractor.
  • There may be a few false positives, missing institutions... maybe even a couple of typos. Contributions welcome!

Please note: just because someone has verified that they own lreilly@stanford.edu does not mean that they're a student. They could be faculty, staff, alumnni, or maybe even an external contractor. If you're suddenly getting a lot of traffic from websites like FatWallet or SlickDeals, you might want to find out why. If you're suddenly getting a lot of requests from a particular school, you should look into that too. It may be good business, word of mouth, or someone may have found a loophole. Swot gives you a high confidence level - not a guarantee. I recommend putting some controls in place or at least monitor how it's doing from time to time.

Pop Quiz Answers

Hopefully, you'll be surprised by some of this:

Domain Academic? Comments
stanford.edu ✔ OK, this was an easy one so you could get at least one right
america.edu ✖ Prior to October 29th 2001, anyone could register a .edu domain name (details)
duep.edu ✔ Alfred Nobel University is a Ukranian University in the Ukraine i.e. not in the USA 🇺🇸
gla.ac.uk ✔ Glasgow University in Scotland
unizar.es ✔ The University of Zaragoza in Spain
usask.ca ✔ The University of Saskatchewan in Canada
hil.no ✔ Lillehammer University College in Norway
unze.ba ✔ University of Zenica in Bosnia and Herzegovina
fu-berlin.de ✔ Free University of Berlin in Germany
ecla.de ✔ ECLA of Bard is a state recognized liberal arts university in Berlin, Germany
bvb.de ✖ It's a soccer team from Germany
lsmu.com ✔ Lugansk State Medical University in the Ukraine

If you verified this by visiting all of the websites, how long did it take you? Did you have fun? Imagine you had to do this 10 - 100 times every day. Now you know a little something about the inspiration for Swot. Swot can verify them all in a fraction of a second and remove a 💩 part of someone's job.

See Also

Documentation ¶

Overview ¶

Code generated by broccoli at 2021-12-14T03:24:33Z.

Package swot finds academic domains and emails

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var (
	// ErrDomainNotFound happens when a domain is not found
	ErrDomainNotFound = errors.New("Domain name not found")

	// ErrSchoolNotFound happens whan a school name is not found
	ErrSchoolNotFound = errors.New("School name not found")
)

Functions ¶

func GetSchoolName ¶

func GetSchoolName(address string) string

GetSchoolName returns the name of the academic institution or an empty string if the name of the institution is not found.

func IsAcademic ¶

func IsAcademic(address string) bool

IsAcademic returns true if the email address or URL belongs to an academic institution.

Types ¶

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL