wipo-gbd-transformation 1.1.69__py3-none-any.whl → 1.1.71__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wipo-gbd-transformation might be problematic. Click here for more details.

@@ -1,3 +1,7 @@
1
1
  # instruction to render the output to JSON format
2
2
  render = 'JSON'
3
3
  source = 'national'
4
+
5
+ # PH/4/1981/00000115
6
+ appnum_mask = 'PH/\\d/\\d*/(\\d*)'
7
+ regnum_mask = 'PH/\\d/\\d*/(\\d*)'
@@ -13,12 +13,15 @@ ignore_namespace = [
13
13
  def get_appdate(appdate, appnum):
14
14
  return appnum.split('/')[-2].zfill(4)
15
15
 
16
+ """
16
17
  def clean_application_number(number):
17
- # PH/4/1981/00000115 -> 4/1981/00000115
18
+ # PH/4/1981/00000115 -> 00000115
18
19
  if number.startswith("PH/"):
19
20
  number = number.replace("PH/", "")
20
21
  return number
21
22
 
23
+ """
24
+
22
25
  def get_registration_nb(trademark, tmstatus):
23
26
  if trademark.RegistrationNumber:
24
27
  return trademark.RegistrationNumber
@@ -26,9 +29,10 @@ def get_registration_nb(trademark, tmstatus):
26
29
  if not tmstatus in ['Expired', 'Registered']:
27
30
  return None
28
31
 
29
- # 4/1981/00000115
30
- appnum = clean_application_number(trademark.ApplicationNumber)
31
- return appnum
32
+ # a way to deduce the registration number
33
+ appnum_parts = trademark.ApplicationNumber.split('/')
34
+ regnum = '%s/%s' % (appnum_parts[-2], appnum_parts[-1])
35
+ return regnum
32
36
 
33
37
  def get_expiry_date(trademark, tmstatus):
34
38
  return ipas.get_expiry_date(trademark, tmstatus)
@@ -51,6 +55,7 @@ def translate_kind(trademark, header):
51
55
  if subcode == 'Part B': return ['Individual']
52
56
  if subcode == 'National': return ['Individual']
53
57
  if subcode == 'Trademark (national)': return ['Individual']
58
+ if subcode == 'Trademark (Madrid)': return ['Individual']
54
59
 
55
60
  raise Exception('Kind "%s" not mapped.' % subcode)
56
61
 
@@ -38,8 +38,8 @@ publicationDate: {{ (trademark.PublicationDetails.Publication | last).Publicatio
38
38
 
39
39
  markFeature: {{ trademark | translate_feature }}
40
40
 
41
- st13: {{ trademark.ApplicationNumber | clean_application_number | st13(trademark.RegistrationOfficeCode, type=type, appdate=appdate) }}
42
- applicationNumber: {{ trademark.ApplicationNumber | clean_application_number }}
41
+ st13: {{ trademark.ApplicationNumber | st13(trademark.RegistrationOfficeCode, type=type, appdate=appdate) }}
42
+ applicationNumber: {{ trademark.ApplicationNumber }}
43
43
  applicationDate: {{ trademark.ApplicationDate }}
44
44
  registrationNumber: {{ trademark | get_registration_nb(tmstatus) | remove_trailing('-') }}
45
45
  registrationDate: {{ trademark | get_registration_date(tmstatus) }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wipo-gbd-transformation
3
- Version: 1.1.69
3
+ Version: 1.1.71
4
4
  Summary: GBD XML ETL package
5
5
  Home-page: https://github.com/GBD-Wipo/xmlE
6
6
  Author: WIPO GDB team
@@ -319,12 +319,12 @@ gbdtransformation/brands/pgtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRF
319
319
  gbdtransformation/brands/pgtm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
320
320
  gbdtransformation/brands/pgtm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
321
321
  gbdtransformation/brands/pgtm/tests/pgtm.xml,sha256=fAzAz2VtqOFV_2QImDbNxDvuTr-Ue3e5tGx8h-Lnnvg,6533
322
- gbdtransformation/brands/phtm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
323
- gbdtransformation/brands/phtm/filters.py,sha256=jaMELkuv4Expzfl6-mr5JZiDqvMHGc0k2rXs_t-6i3g,6186
322
+ gbdtransformation/brands/phtm/__init__.py,sha256=7OMzcAdPCpMwW9XVZFWbQdeYc-8exeatkcCDCfbKEB0,178
323
+ gbdtransformation/brands/phtm/filters.py,sha256=NmNBnGVzJroC6h9VmZwZhLnvW61Hre6gRIulgaJXWHE,6324
324
324
  gbdtransformation/brands/phtm/schema,sha256=Nb5tI5MUrzn19c8GpLFuJhpiLn0Fa9XPza10eNHeesI,2877
325
325
  gbdtransformation/brands/phtm/schema.classic,sha256=3JOKHUfK0jSo0NBlDmeGFAKqfYdMJOrIPBIoNUMrVFI,808
326
326
  gbdtransformation/brands/phtm/template.classic.yml,sha256=U5th90SpXjspWTPuimqftd8vZfJ3tT90mIud5n7Zv8w,2820
327
- gbdtransformation/brands/phtm/template.yml,sha256=dCUBI8kiipYp6UEU2ebvlCnyCqadJ3I9rMgUhuXGbCw,7707
327
+ gbdtransformation/brands/phtm/template.yml,sha256=cfxCxD4yCJgvFJjgfgKuv4sJ--NYEUdYLJZAKZd899Q,7653
328
328
  gbdtransformation/brands/qatm/__init__.py,sha256=NBdOewZ1F_3eErahjyR-up8bjz1FSxwEiPSJfDw6GxY,79
329
329
  gbdtransformation/brands/qatm/filters.py,sha256=lMPVBX2ProdUtg5LcuQAmlInoGCo1-JZemHrvE1lNvw,2330
330
330
  gbdtransformation/brands/qatm/schema,sha256=AP0MxQyD0hY4APRh8nxitlxMqJYJB4AaaTJ8y20-XBA,3283
@@ -584,9 +584,9 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
584
584
  schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
585
585
  schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
586
586
  schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
587
- wipo_gbd_transformation-1.1.69.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
588
- wipo_gbd_transformation-1.1.69.dist-info/METADATA,sha256=Rffs9LzOfUQ1cBm9Z6wAMK2vxa_XUieOtgXSV2P6gyA,577
589
- wipo_gbd_transformation-1.1.69.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
590
- wipo_gbd_transformation-1.1.69.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
591
- wipo_gbd_transformation-1.1.69.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
592
- wipo_gbd_transformation-1.1.69.dist-info/RECORD,,
587
+ wipo_gbd_transformation-1.1.71.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
588
+ wipo_gbd_transformation-1.1.71.dist-info/METADATA,sha256=wJfYBr4fNZdrl2gH9i-kYOvYty9V3N4TMiexRQgLSik,577
589
+ wipo_gbd_transformation-1.1.71.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
590
+ wipo_gbd_transformation-1.1.71.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
591
+ wipo_gbd_transformation-1.1.71.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
592
+ wipo_gbd_transformation-1.1.71.dist-info/RECORD,,