Rearrange domain files/diretories
Each level of directory now corresponds to a domain part, instead of having some TLDs represented as top-level directories with dots in them.
This commit is contained in:
parent
c9469b0654
commit
ee5725f701
@ -3,26 +3,26 @@
|
||||
#### Data Contributions
|
||||
|
||||
* All of the school data is stored in a simple filesystem data structure under `lib/domains`.
|
||||
* Every directory name in here is a [TLD](http://en.wikipedia.org/wiki/Top-level_domain) (Top Level Domain) e.g. `edu`.
|
||||
* Every file in these directories is named after the school's [SLD](http://en.wikipedia.org/wiki/Second-level_domain) (Second Level Domain) e.g `stanford`.
|
||||
* The contents of that file are simply the school name e.g. `Stanford University`.
|
||||
* The [working example for Stanford University](https://github.com/leereilly/swot/blob/master/lib/domains/edu/stanford) :eyes:
|
||||
* The directories are nested to match domain parts, starting with the [TLD](http://en.wikipedia.org/wiki/Top-level_domain) (Top Level Domain), then [SLDs](http://en.wikipedia.org/wiki/Second-level_domain) (Second Level Domains) beneath them, etc.
|
||||
* There's a text file named after the school's domain, nested below the appropriate directory, e.g. `strath.ac.uk` would be listed as `lib/domains/uk/ac/strath.txt`.
|
||||
* The contents of that file are simply the school name, e.g. `University of Strathclyde`.
|
||||
* The [working example for University of Strathclyde](https://github.com/leereilly/swot/blob/master/lib/domains/uk/ac/strath.txt) :eyes:
|
||||
* Here's what the data structure looks like:
|
||||
|
||||
```
|
||||
[-] lib
|
||||
[-] domains
|
||||
[-] ac.uk
|
||||
[+] strath
|
||||
[-] edu
|
||||
[+] harvard
|
||||
[+] stanford
|
||||
|
||||
[-] uk
|
||||
[-] ac
|
||||
[+] strath
|
||||
```
|
||||
|
||||
##### Adding a School
|
||||
|
||||
Let's say you want to add the [University of Strathclyde](http://www.strath.ac.uk/). We know the TLD is `ac.uk` and the SLD is `strath`. We'd simply create a file at `lib/domains/ac.uk/strath` containing the text `University of Strathcylde`. You can safely ignores subdomain like `www`, `cis`, whatever. You can see the actual file [here](https://github.com/leereilly/swot/blob/master/lib/domains/ac.uk/strath).
|
||||
Let's say you want to add the [Stanford University](http://www.stanford.edu/). We'd simply create a file at `lib/domains/edu/stanford.txt` containing the text `Stanford University`. You can safely ignores subdomain like `www`, `cis`, whatever. You can see the actual file [here](https://github.com/leereilly/swot/blob/master/lib/domains/edu/stanford.txt).
|
||||
|
||||
#### Updating a School Name
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user