Skip to content

Commit 24ddbe5

Browse files
committed
Version 1.0
Huge edits, removed nearly 1,000 lines and it works the same with more efficient code.
1 parent 6c0806b commit 24ddbe5

File tree

6 files changed

+432
-1473
lines changed

6 files changed

+432
-1473
lines changed

build/lib/cleanco.py

Lines changed: 206 additions & 720 deletions
Large diffs are not rendered by default.

cleanco.py

Lines changed: 206 additions & 720 deletions
Large diffs are not rendered by default.

cleanco.pyc

-7.93 KB
Binary file not shown.

cleancotest.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
from cleanco import cleanco
22

3-
companyname = "GlaxoSmithKline plc."
4-
cleanco = cleanco(companyname)
3+
business_name = "Merck Pharmaceutials - Corporate (formerly Not Merck) LLC"
54

6-
bustype = cleanco.type()
7-
busind = cleanco.industry()
8-
cleanname = cleanco.cleanname()
9-
short = cleanco.shortname()
10-
country = cleanco.country()
5+
processing = cleanco(business_name)
6+
x = processing.cleaner()
117

128
print
13-
print("String: %s") % companyname
9+
print business_name
1410
print
15-
print("Clean Name: %s") % cleanname
16-
print("Short Name: %s") % short
17-
print("Possible Business Types: %s") % bustype
18-
print("Possible Industry: %s") % busind
19-
print("Possible Country: %s") % country
11+
print("Clean Name: %s") % (x.clean_name)
12+
print("Possible Industries: %s") % (x.industry)
13+
print("Possible Business Types: %s") % (x.type)
14+
print("Possible Countries: %s") % (x.country)
2015
print

readme.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#cleanco
1+
#cleanco - 1.0
22

33
## What is it / what does it do?
44
This is a Python module that processes company names.
@@ -8,9 +8,6 @@ Download it from this site and unzip the directory.
88

99
* Mac: `cd` into it, and enter `sudo python setup.py install` along with your system password.
1010
* Windows: Same thing but without `sudo`.
11-
* Linux: ???
12-
13-
There may also be a way to do `pip install` but I can't guarantee this.
1411

1512
## How does the module work?
1613
Let's look at some sample code. First, initialize the module:
@@ -19,37 +16,32 @@ Let's look at some sample code. First, initialize the module:
1916

2017
Now, come up with a company name that you want to process:
2118

22-
>>> companyname = "Paul Pharmaceutical, Inc."
19+
>>> business_name = "Some Big Pharma, LLC"
2320

2421
Throw it into the module:
2522

26-
>>> processing = cleanco(companyname)
23+
>>> processing = cleanco(business_name)
24+
>>> x = processing.cleaner()
2725

2826
You can now get the company types:
2927

30-
>>> cotype = processing.type()
31-
>>> print cotype
32-
['Corporation']
28+
>>> x.type
29+
['Limited Liability Company']
3330

3431
...the possible countries...
3532

36-
>>> country = processing.country()
37-
>>> print country
38-
['Philippines', 'United States']
33+
>>> x.country
34+
['United States of America', 'Philippines']
3935

4036
...the possible industries...
4137

42-
>>> industry = processing.industry()
43-
>>> print industry
38+
>>> x.industry
4439
['Pharmaceutical']
4540

4641
...and a clean version of the company name.
4742

48-
>>> clean = processing.cleanname()
49-
>>> print clean
50-
Paul Pharmaceutical
51-
52-
There is also a short version of the company name for times when you want to remove things in parenthesis or everything after a hyphen. You can access this with `.shortname()`.
43+
>>> x.clean_name
44+
'Some Big Pharma'
5345

5446
## Are there bugs?
5547
You better believe it. Please let me know or fork this project. I'm sure some of the company suffixes are way incorrect and I'm missing a lot more information.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from distutils.core import setup
44
setup(name='cleanco',
5-
version='0.4',
5+
version='1.0',
66
py_modules=['cleanco'],
77
)

0 commit comments

Comments
 (0)