-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Plumage is a library to obtain trademark status information from the United States Patent & Trademark Office's (PTO) Trademark Status & Document Retrieval (TSDR) system.
Plumage takes as input either a 7-digit registration number ("r") or an 8-digit application serial number ("s"), fetches the corresponding XML data from the PTO's TSDR website, and returns a dictionary of data associated with the specified TSDR entry.
Plumage is currently implemented as a Python module (Plumage-py); and as a .NET (C#) DLL, (Plumage-dotnet). I plan to additionally implement it in Java to allow access on Android.
#Examples ##Python
from Plumage import plumage
t = plumage.TSDRReq()
t.getTSDRInfo("2564831", "r") # get info on reg. no 2,564,831
if t.TSDRMapIsValid:
print "Application serial no: ", t.TSDRMap["ApplicationNumber"]
print "Trademark text: ", t.TSDRMap["MarkVerbalElementText"]
print "Application filing date: ", t.TSDRMap["ApplicationDate"]
print "Registration no: ", t.TSDRMap["RegistrationNumber"]
print "Status: ", t.TSDRMap["MarkCurrentStatusExternalDescriptionText"]
# Owner info is in most recent (0th) entry in ApplicantList
applicant_list = t.TSDRMap["ApplicantList"]
current_owner_info = applicant_list[0]
print "Owner:", current_owner_info["ApplicantName"]
print "Owner address: ", current_owner_info["ApplicantCombinedAddress"]
# Get most recent event: 0th entry in event list
event_list = t.TSDRMap["MarkEventList"]
most_recent_event = event_list[0]
print "Most recent event: ", most_recent_event["MarkEventDescription"]
print "Event date: ", most_recent_event["MarkEventDate"]
##C#
Plumage.TSDRReq t = new Plumage.TSDRReq();
t.getTSDRInfo("2564831", "r"); // get info on reg. no 2,564,831
if (t.TSDRMapIsValid){
Console.WriteLine("Application serial no: " + t.TSDRMap["ApplicationNumber"]);
Console.WriteLine("Trademark text: " + t.TSDRMap["MarkVerbalElementText"]);
Console.WriteLine("Application filing date: " + t.TSDRMap["ApplicationDate"]);
Console.WriteLine("Registration no: " + t.TSDRMap["RegistrationNumber"]);
Console.WriteLine("Status: " + t.TSDRMap["MarkCurrentStatusExternalDescriptionText"]);
// Owner info is in most recent (0th) entry in ApplicantList
ArrayList applicant_list = (ArrayList)t.TSDRMap["ApplicantList"];
Dictionary<string, Object> current_owner_info = (Dictionary<string, Object>)applicant_list[0];
Console.WriteLine("Owner: " + current_owner_info["ApplicantName"]);
Console.WriteLine("Owner address: " + current_owner_info["ApplicantCombinedAddress"]);
// Get most recent event: 0th entry in event list
ArrayList event_list = (ArrayList)t.TSDRMap["MarkEventList"];
Dictionary<string, Object> most_recent_event = (Dictionary<string, Object>)event_list[0];
Console.WriteLine("Most recent event: " + most_recent_event["MarkEventDescription"]);
Console.WriteLine("Event date: " + most_recent_event["MarkEventDate"]);
Although coded in C#, Plumage is a .NET library, and can be invoked from other .NET languages, e.g. Visual Basic .NET and C++ .NET. (Note, I learned just enough VB and C++ to write and test these examples; they are likely not idiomatic code.)
##Visual Basic .NET
Dim t As Plumage.TSDRReq = New Plumage.TSDRReq
t.getTSDRInfo("2564831", "r") ' get info on reg. no 2,564,831
If t.TSDRMapIsValid Then
Console.WriteLine("Application serial no: " + t.TSDRMap("ApplicationNumber"))
Console.WriteLine("Trademark text: " + t.TSDRMap("MarkVerbalElementText"))
Console.WriteLine("Application filing date: " + t.TSDRMap("ApplicationDate"))
Console.WriteLine("Registration no: " + t.TSDRMap("RegistrationNumber"))
Console.WriteLine("Status: " + t.TSDRMap("MarkCurrentStatusExternalDescriptionText"))
' Owner info is in most recent (0th) entry in ApplicantList
Dim applicant_list As ArrayList = t.TSDRMap("ApplicantList")
Dim current_owner_info As Dictionary(Of String, Object) = applicant_list(0)
Console.WriteLine("Owner: " + current_owner_info("ApplicantName"))
Console.WriteLine("Owner address: " + current_owner_info("ApplicantCombinedAddress"))
' Get most recent event: 0th entry in event list
Dim event_list As ArrayList = t.TSDRMap("MarkEventList")
Dim most_recent_event As Dictionary(Of String, Object) = event_list(0)
Console.WriteLine("Most recent event: " + most_recent_event("MarkEventDescription"))
Console.WriteLine("Event date: " + most_recent_event("MarkEventDate"))
End If
##C++ .NET
Plumage::TSDRReq^ t = gcnew Plumage::TSDRReq;
t->getTSDRInfo("2564831", "r"); // get info on reg. no 2,564,831
if (t->TSDRMapIsValid){
Console::WriteLine("Application serial no: " + t->TSDRMap["ApplicationNumber"]);
Console::WriteLine("Trademark text: " + t->TSDRMap["MarkVerbalElementText"]);
Console::WriteLine("Application filing date: " + t->TSDRMap["ApplicationDate"]);
Console::WriteLine("Registration no: " + t->TSDRMap["RegistrationNumber"]);
Console::WriteLine("Status: " + t->TSDRMap["MarkCurrentStatusExternalDescriptionText"]);
// Owner info is in most recent (0th) entry in ApplicantList
ArrayList^ applicant_list = (ArrayList^)(t->TSDRMap["ApplicantList"]);
Dictionary<String^, Object^>^ current_owner_info = (Dictionary<String^, Object^>^)applicant_list[0];
Console::WriteLine("Owner: " + current_owner_info["ApplicantName"]);
Console::WriteLine("Owner address: " + current_owner_info["ApplicantCombinedAddress"]);
// Get most recent event: 0th entry in event list
ArrayList^ event_list = (ArrayList^)(t->TSDRMap["MarkEventList"]);
Dictionary<String^, Object^>^ most_recent_event = (Dictionary<String^, Object^>^)event_list[0];
Console::WriteLine("Most recent event: " + most_recent_event["MarkEventDescription"]);
Console::WriteLine("Event date: " + most_recent_event["MarkEventDate"]);
};
##Sample output In any case, the above examples will print the following information (as of August 2014) on U.S. trademark reg. no. 256,4831 (application serial number 75/181,334).
Application serial no: 75181334
Trademark text: MONTY PYTHON'S FLYING CIRCUS
Application filing date: 1996-10-15-04:00
Registration no: 2564831
Status: Registration cancelled because registrant did not file an acceptable de
claration under Section 8. To view all documents in this file, click on the Tra
demark Document Retrieval link at the top of this page.
Owner: Python (Monty) Pictures Ltd.
Owner address: Room 537/538, The Linen Hall//London//W1R 5TB/GB
Most recent event: CANCELLED SEC. 8 (6-YR)
Event date: 2009-02-07-05:00
The same data would have been displayed if, instead of requesting TSDR data by registration number 2,564,831 (i.e., getTSDRInfo("2564831", "r")
), the request had been by the corresponding application serial number 75/181,334: getTSDRInfo("75181334", "s")
.
#Licenses
- ASL V2.0 (code)
- CC BY-SA 3.0 (documentation)
See the page License Information for license details.