datamule 1.2.2__py3-none-any.whl → 1.2.4__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.
@@ -0,0 +1,117 @@
1
+ metadata_schedule_13_dict = {
2
+ 'filerInfo_filer_filerCredentials_ccc': 'headerFilerCredentialsCcc',
3
+ 'filerInfo_filer_filerCredentials_cik': 'headerFilerCredentialsCik',
4
+ 'filerInfo_liveTestFlag': 'headerLiveTestFlag',
5
+ 'previousAccessionNumber': 'previousAccessionNumber',
6
+ 'submissionType': 'headerSubmissionType'
7
+ }
8
+
9
+ cover_schedule_13_dict = {
10
+ 'amendmentNo': 'amendmentNo',
11
+ 'authorizedPersons_notificationInfo': 'authorizedPersonsNotificationInfo',
12
+ 'authorizedPersons_notificationInfo_personAddress_city': 'authorizedPersonsNotificationInfoPersonAddressCity',
13
+ 'authorizedPersons_notificationInfo_personAddress_stateOrCountry': 'authorizedPersonsNotificationInfoPersonAddressStateOrCountry',
14
+ 'authorizedPersons_notificationInfo_personAddress_street1': 'authorizedPersonsNotificationInfoPersonAddressStreet1',
15
+ 'authorizedPersons_notificationInfo_personAddress_street2': 'authorizedPersonsNotificationInfoPersonAddressStreet2',
16
+ 'authorizedPersons_notificationInfo_personAddress_zipCode': 'authorizedPersonsNotificationInfoPersonAddressZipCode',
17
+ 'authorizedPersons_notificationInfo_personName': 'authorizedPersonsNotificationInfoPersonName',
18
+ 'authorizedPersons_notificationInfo_personPhoneNum': 'authorizedPersonsNotificationInfoPersonPhoneNum',
19
+ 'dateOfEvent': 'dateOfEvent',
20
+ 'designateRulesPursuantThisScheduleFiled_designateRulePursuantThisScheduleFiled': 'designateRulesPursuantThisScheduleFiledDesignateRulePursuantThisScheduleFiled',
21
+ 'eventDateRequiresFilingThisStatement': 'eventDateRequiresFilingThisStatement',
22
+ 'issuerInfo_address_city': 'issuerInfoAddressCity',
23
+ 'issuerInfo_address_stateOrCountry': 'issuerInfoAddressStateOrCountry',
24
+ 'issuerInfo_address_street1': 'issuerInfoAddressStreet1',
25
+ 'issuerInfo_address_street2': 'issuerInfoAddressStreet2',
26
+ 'issuerInfo_address_zipCode': 'issuerInfoAddressZipCode',
27
+ 'issuerInfo_issuerCIK': 'issuerInfoIssuerCik',
28
+ 'issuerInfo_issuerCUSIP': 'issuerInfoIssuerCusip',
29
+ 'issuerInfo_issuerCik': 'issuerInfoIssuerCik',
30
+ 'issuerInfo_issuerCusip': 'issuerInfoIssuerCusip',
31
+ 'issuerInfo_issuerName': 'issuerInfoIssuerName',
32
+ 'issuerInfo_issuerPrincipalExecutiveOfficeAddress_city': 'issuerInfoIssuerPrincipalExecutiveOfficeAddressCity',
33
+ 'issuerInfo_issuerPrincipalExecutiveOfficeAddress_stateOrCountry': 'issuerInfoIssuerPrincipalExecutiveOfficeAddressStateOrCountry',
34
+ 'issuerInfo_issuerPrincipalExecutiveOfficeAddress_street1': 'issuerInfoIssuerPrincipalExecutiveOfficeAddressStreet1',
35
+ 'issuerInfo_issuerPrincipalExecutiveOfficeAddress_street2': 'issuerInfoIssuerPrincipalExecutiveOfficeAddressStreet2',
36
+ 'issuerInfo_issuerPrincipalExecutiveOfficeAddress_zipCode': 'issuerInfoIssuerPrincipalExecutiveOfficeAddressZipCode',
37
+ 'previouslyFiledFlag': 'previouslyFiledFlag',
38
+ 'securitiesClassTitle': 'securitiesClassTitle'
39
+ }
40
+
41
+ reporting_person_details_schedule_13_dict = {
42
+ 'aggregateAmountExcludesCertainSharesFlag': 'aggregateAmountExcludesCertainSharesFlag',
43
+ 'citizenshipOrOrganization': 'citizenshipOrOrganization',
44
+ 'classPercent': 'classPercent',
45
+ 'comments': 'comments',
46
+ 'memberGroup': 'memberGroup',
47
+ 'reportingPersonBeneficiallyOwnedAggregateNumberOfShares': 'reportingPersonBeneficiallyOwnedAggregateNumberOfShares',
48
+ 'reportingPersonBeneficiallyOwnedNumberOfShares_sharedDispositivePower': 'reportingPersonBeneficiallyOwnedNumberOfSharesSharedDispositivePower',
49
+ 'reportingPersonBeneficiallyOwnedNumberOfShares_sharedVotingPower': 'reportingPersonBeneficiallyOwnedNumberOfSharesSharedVotingPower',
50
+ 'reportingPersonBeneficiallyOwnedNumberOfShares_soleDispositivePower': 'reportingPersonBeneficiallyOwnedNumberOfSharesSoleDispositivePower',
51
+ 'reportingPersonBeneficiallyOwnedNumberOfShares_soleVotingPower': 'reportingPersonBeneficiallyOwnedNumberOfSharesSoleVotingPower',
52
+ 'reportingPersonName': 'reportingPersonName',
53
+ 'typeOfReportingPerson': 'typeOfReportingPerson'
54
+ }
55
+ item_1_schedule_13_dict = {
56
+ 'issuerName': 'issuerName',
57
+ 'issuerPrincipalExecutiveOfficeAddress': 'issuerPrincipalExecutiveOfficeAddress'
58
+ }
59
+
60
+ item_2_schedule_13_dict = {
61
+ 'citizenship': 'citizenship',
62
+ 'filingPersonName': 'filingPersonName',
63
+ 'principalBusinessOfficeOrResidenceAddress': 'principalBusinessOfficeOrResidenceAddress'
64
+ }
65
+
66
+ item_3_schedule_13_dict = {
67
+ 'notApplicableFlag': 'notApplicableFlag',
68
+ 'otherTypeOfPersonFiling': 'otherTypeOfPersonFiling',
69
+ 'typeOfPersonFiling': 'typeOfPersonFiling'
70
+ }
71
+
72
+ item_4_schedule_13_dict = {
73
+ 'amountBeneficiallyOwned': 'amountBeneficiallyOwned',
74
+ 'classPercent': 'classPercent',
75
+ 'numberOfSharesPersonHas_sharedPowerOrDirectToDispose': 'numberOfSharesPersonHasSharedPowerOrDirectToDispose',
76
+ 'numberOfSharesPersonHas_sharedPowerOrDirectToVote': 'numberOfSharesPersonHasSharedPowerOrDirectToVote',
77
+ 'numberOfSharesPersonHas_solePowerOrDirectToDispose': 'numberOfSharesPersonHasSolePowerOrDirectToDispose',
78
+ 'numberOfSharesPersonHas_solePowerOrDirectToVote': 'numberOfSharesPersonHasSolePowerOrDirectToVote'
79
+ }
80
+
81
+ item_5_schedule_13_dict = {
82
+ 'classOwnership5PercentOrLess': 'classOwnership5PercentOrLess',
83
+ 'notApplicableFlag': 'notApplicableFlag'
84
+ }
85
+
86
+ item_6_schedule_13_dict = {
87
+ 'notApplicableFlag': 'notApplicableFlag',
88
+ 'ownershipMoreThan5PercentOnBehalfOfAnotherPerson': 'ownershipMoreThan5PercentOnBehalfOfAnotherPerson'
89
+ }
90
+
91
+ item_7_schedule_13_dict = {
92
+ 'notApplicableFlag': 'notApplicableFlag',
93
+ 'subsidiaryIdentificationAndClassification': 'subsidiaryIdentificationAndClassification'
94
+ }
95
+
96
+ item_8_schedule_13_dict = {
97
+ 'identificationAndClassificationOfGroupMembers': 'identificationAndClassificationOfGroupMembers',
98
+ 'notApplicableFlag': 'notApplicableFlag'
99
+ }
100
+
101
+ item_9_schedule_13_dict = {
102
+ 'groupDissolutionNotice': 'groupDissolutionNotice',
103
+ 'notApplicableFlag': 'notApplicableFlag'
104
+ }
105
+
106
+ item_10_schedule_13_dict = {
107
+ 'certifications': 'certifications',
108
+ 'notApplicableFlag': 'notApplicableFlag'
109
+ }
110
+
111
+ signature_schedule_13_dict = {
112
+ 'reportingPersonName': 'reportingPersonName',
113
+ 'signatureDetails': 'signatureDetails',
114
+ 'signatureDetails_date': 'signatureDetailsDate',
115
+ 'signatureDetails_signature': 'signatureDetailsSignature',
116
+ 'signatureDetails_title': 'signatureDetailsTitle'
117
+ }
@@ -0,0 +1,63 @@
1
+ sdr_dict = {
2
+ 'formData_generalInfo_applicantCategory_applcntTypeConfFlag': 'applicantTypeConfFlag',
3
+ 'formData_generalInfo_applicantCategory_applicantType': 'applicantType',
4
+ 'formData_generalInfo_applicantCategory_applicantTypeOtherDesc': 'applicantTypeOtherDesc',
5
+ 'formData_generalInfo_assetClasses_assetClassesConfFlag': 'assetClassesConfFlag',
6
+ 'formData_generalInfo_assetClasses_assetClassesList': 'assetClassesList',
7
+ 'formData_generalInfo_business_businessAddress_businessAddressConfFlag': 'businessAddressConfFlag',
8
+ 'formData_generalInfo_business_businessAddress_city': 'businessCity',
9
+ 'formData_generalInfo_business_businessAddress_stateOrCountry': 'businessStateOrCountry',
10
+ 'formData_generalInfo_business_businessAddress_street1': 'businessStreet1',
11
+ 'formData_generalInfo_business_businessAddress_zipCode': 'businessZipCode',
12
+ 'formData_generalInfo_business_businessName_nameOnBusinessConfFlag': 'nameOnBusinessConfFlag',
13
+ 'formData_generalInfo_business_previousBusinessName_previousBusinessNameConfFlag': 'previousBusinessNameConfFlag',
14
+ 'formData_generalInfo_consentAddress_city': 'consentCity',
15
+ 'formData_generalInfo_consentAddress_consentAddressConfFlag': 'consentAddressConfFlag',
16
+ 'formData_generalInfo_consentAddress_stateCountry': 'consentStateCountry',
17
+ 'formData_generalInfo_consentAddress_street1': 'consentStreet1',
18
+ 'formData_generalInfo_consentAddress_zipCode': 'consentZipCode',
19
+ 'formData_generalInfo_consentName_applicantNameOrApplcblEntity': 'applicantNameOrApplcblEntity',
20
+ 'formData_generalInfo_consentName_consentNameConfFlag': 'consentNameConfFlag',
21
+ 'formData_generalInfo_consentName_personNameOrOfficerTitle': 'personNameOrOfficerTitle',
22
+ 'formData_generalInfo_consentPhone_consentPhoneConfFlag': 'consentPhoneConfFlag',
23
+ 'formData_generalInfo_consentPhone_phone': 'consentPhone',
24
+ 'formData_generalInfo_corpOrgInfo_corprtnOrgConfFlag': 'corporationOrgConfFlag',
25
+ 'formData_generalInfo_corpOrgInfo_dateOfCoperationOrg': 'dateOfCooperationOrg',
26
+ 'formData_generalInfo_corpOrgInfo_stateCorperationOrOrg': 'stateCorporationOrOrg',
27
+ 'formData_generalInfo_functionDescription_functionDescriptionConfFlag': 'functionDescriptionConfFlag',
28
+ 'formData_generalInfo_functionDescription_functionDescriptionPerformed': 'functionDescriptionPerformed',
29
+ 'formData_generalInfo_officeInfo_officeConfFlag': 'officeConfFlag',
30
+ 'formData_generalInfo_officeInfo_office_city': 'officeCity',
31
+ 'formData_generalInfo_officeInfo_office_officeName': 'officeName',
32
+ 'formData_generalInfo_officeInfo_office_stateOrCountry': 'officeStateOrCountry',
33
+ 'formData_generalInfo_officeInfo_office_street1': 'officeStreet1',
34
+ 'formData_generalInfo_officeInfo_office_zipCode': 'officeZipCode',
35
+ 'formData_generalInfo_partnershipInfo_filingPrtnrConfFlag': 'filingPartnerConfFlag',
36
+ 'formData_generalInfo_successor_predecessorCikFlag': 'predecessorCikFlag',
37
+ 'formData_generalInfo_successor_predecessorNameAddressFlag': 'predecessorNameAddressFlag',
38
+ 'formData_generalInfo_successor_successionDateFlag': 'successionDateFlag',
39
+ 'formData_generalInfo_successor_successionFlag': 'successionFlag',
40
+ 'formData_generalInfo_successor_successorConfFlag': 'successorConfFlag',
41
+ 'formData_principalInfo_amendedItemsList': 'amendedItemsList',
42
+ 'formData_principalInfo_applicantName': 'principalInfoApplicantName',
43
+ 'formData_principalInfo_city': 'principalInfoCity',
44
+ 'formData_principalInfo_prncpalConfFlag': 'principalConfFlag',
45
+ 'formData_principalInfo_stateOrCountry': 'principalInfoStateOrCountry',
46
+ 'formData_principalInfo_street1': 'principalInfoStreet1',
47
+ 'formData_principalInfo_zipCode': 'principalInfoZipCode',
48
+ 'formData_signatureInfo_signature': 'signature',
49
+ 'formData_signatureInfo_signatureApplicantName': 'signatureApplicantName',
50
+ 'formData_signatureInfo_signatureConfflag': 'signatureConfFlag',
51
+ 'formData_signatureInfo_signatureDate': 'signatureInfoDate',
52
+ 'formData_signatureInfo_signatureTitle': 'signatureInfoTitle',
53
+ 'headerData_filerInfo_contact_contactEmailAddress': 'contactEmailAddress',
54
+ 'headerData_filerInfo_contact_contactName': 'contactName',
55
+ 'headerData_filerInfo_contact_contactPhoneNumber': 'contactPhoneNumber',
56
+ 'headerData_filerInfo_filer_filerCredentials_ccc': 'headerFilerCredentialsCcc',
57
+ 'headerData_filerInfo_filer_filerCredentials_cik': 'headerFilerCredentialsCik',
58
+ 'headerData_filerInfo_flags_confirmingCopyFlag': 'headerConfirmingCopyFlag',
59
+ 'headerData_filerInfo_flags_overrideInternetFlag': 'headerOverrideInternetFlag',
60
+ 'headerData_filerInfo_flags_returnCopyFlag': 'headerReturnCopyFlag',
61
+ 'headerData_filerInfo_liveTestFlag': 'headerLiveTestFlag',
62
+ 'headerData_submissionType': 'headerSubmissionType'
63
+ }
File without changes
@@ -0,0 +1,5 @@
1
+
2
+ # 13F-HR (Institutional Investment Manager Holdings) mapping
3
+ thirteenfhr_dict = {
4
+
5
+ }
@@ -0,0 +1,21 @@
1
+ # 25-NSE mapping
2
+ twentyfive_nse_dict = {
3
+ 'descriptionClassSecurity': 'securityDescription',
4
+ 'exchange_cik': 'exchangeCik',
5
+ 'exchange_entityName': 'exchangeName',
6
+ 'issuer_address_city': 'issuerCity',
7
+ 'issuer_address_stateOrCountry': 'issuerStateOrCountry',
8
+ 'issuer_address_stateOrCountryCode': 'issuerStateOrCountryCode',
9
+ 'issuer_address_street1': 'issuerStreet1',
10
+ 'issuer_address_street2': 'issuerStreet2',
11
+ 'issuer_address_zipCode': 'issuerZipCode',
12
+ 'issuer_cik': 'issuerCik',
13
+ 'issuer_entityName': 'issuerName',
14
+ 'issuer_fileNumber': 'issuerFileNumber',
15
+ 'issuer_telephoneNumber': 'issuerPhone',
16
+ 'ruleProvision': 'ruleProvision',
17
+ 'schemaVersion': 'schemaVersion',
18
+ 'signatureData_signatureDate': 'signatureDate',
19
+ 'signatureData_signatureName': 'signatureName',
20
+ 'signatureData_signatureTitle': 'signatureTitle'
21
+ }
@@ -0,0 +1,100 @@
1
+ # Metadata 24F-2NT mapping
2
+ metadata_24f_2nt_dict = {
3
+ 'filerInfo_filer_fileNumber': 'fileNumber',
4
+ 'filerInfo_filer_issuerCredentials_ccc': 'issuerCredentialsCcc',
5
+ 'filerInfo_filer_issuerCredentials_cik': 'issuerCredentialsCik',
6
+ 'filerInfo_flags_confirmingCopyFlag': 'confirmingCopyFlag',
7
+ 'filerInfo_flags_overrideInternetFlag': 'overrideInternetFlag',
8
+ 'filerInfo_investmentCompanyType': 'investmentCompanyType',
9
+ 'filerInfo_liveTestFlag': 'liveTestFlag',
10
+ 'schemaVersion': 'schemaVersion',
11
+ 'submissionType': 'submissionType'
12
+ }
13
+
14
+ # Item 1 24F-2NT mapping (Issuer Information)
15
+ item_1_24f2nt_dict = {
16
+ 'nameOfIssuer': 'nameOfIssuer',
17
+ 'addressOfIssuer_city': 'issuerCity',
18
+ 'addressOfIssuer_country': 'issuerCountry',
19
+ 'addressOfIssuer_state': 'issuerState',
20
+ 'addressOfIssuer_street1': 'issuerStreet1',
21
+ 'addressOfIssuer_street2': 'issuerStreet2',
22
+ 'addressOfIssuer_zipCode': 'issuerZipCode'
23
+ }
24
+
25
+ # Item 2 24F-2NT mapping (Securities Information)
26
+ item_2_24f2nt_dict = {
27
+ 'reportClassName_annualClassNameInfo': 'annualClassNameInfo',
28
+ 'reportClassName_annualClassNameInfo_className': 'className',
29
+ 'reportClassName_rptIncludeAllFlag': 'includeAllFlag',
30
+ 'reportClass_annualClassInfo': 'annualClassInfo',
31
+ 'reportClass_annualClassInfo_classId': 'classId',
32
+ 'reportClass_annualClassInfo_className': 'className',
33
+ 'reportClass_rptIncludeAllClassesFlag': 'includeAllClassesFlag',
34
+ 'reportSeriesClass_rptIncludeAllSeriesFlag': 'includeAllSeriesFlag',
35
+ 'reportSeriesClass_rptSeriesClassInfo': 'seriesClassInfo',
36
+ 'reportSeriesClass_rptSeriesClassInfo_classInfo': 'classInfo',
37
+ 'reportSeriesClass_rptSeriesClassInfo_classInfo_classId': 'classInfoId',
38
+ 'reportSeriesClass_rptSeriesClassInfo_classInfo_className': 'classInfoName',
39
+ 'reportSeriesClass_rptSeriesClassInfo_includeAllClassesFlag': 'includeAllClassesFlag',
40
+ 'reportSeriesClass_rptSeriesClassInfo_seriesId': 'seriesId',
41
+ 'reportSeriesClass_rptSeriesClassInfo_seriesName': 'seriesName'
42
+ }
43
+
44
+ # Item 3 24F-2NT mapping (File Numbers)
45
+ item_3_24f2nt_dict = {
46
+ 'investmentCompActFileNo': 'investmentCompanyActFileNumber',
47
+ 'securitiesActFileNumbers_securitiesActFileNo': 'securitiesActFileNumber',
48
+ 'securitiesActFileNumbers_securitiesActFileNo_fileNumber': 'fileNumber'
49
+ }
50
+
51
+ # Item 4 24F-2NT mapping (Filing Status)
52
+ item_4_24f2nt_dict = {
53
+ 'isThisFormBeingFiledLate': 'isFiledLate',
54
+ 'isThisTheLastTimeIssuerFilingThisForm': 'isLastFiling',
55
+ 'lastDayOfFiscalYear': 'lastDayOfFiscalYear'
56
+ }
57
+
58
+ # Item 5 24F-2NT mapping (Calculation of Registration Fee)
59
+ item_5_24f2nt_dict = {
60
+ 'aggregatePriceOfSecuritiesRedeemedOrRepurchasedAnyPrior': 'priceOfSecuritiesRedeemedPrior',
61
+ 'aggregatePriceOfSecuritiesRedeemedOrRepurchasedInFiscalYear': 'priceOfSecuritiesRedeemedInFiscalYear',
62
+ 'aggregateSalePriceOfSecuritiesSold': 'salePriceOfSecuritiesSold',
63
+ 'multiplierForDeterminingRegistrationFee': 'registrationFeeMultiplier',
64
+ 'netSales': 'netSales',
65
+ 'redemptionCreditsAvailableForUseInFutureYears': 'redemptionCreditsForFutureYears',
66
+ 'registrationFeeDue': 'registrationFeeDue',
67
+ 'seriesOrClassId': 'seriesOrClassId',
68
+ 'totalAvailableRedemptionCredits': 'totalAvailableRedemptionCredits'
69
+ }
70
+
71
+ # Item 6 24F-2NT mapping (Prepaid Shares)
72
+ item_6_24f2nt_dict = {
73
+ 'amountOfSecuritiesDeducted': 'amountOfSecuritiesDeducted',
74
+ 'interestDue': 'interestDue',
75
+ 'numberOfSharesOrOtherUnitsRemainingUnsold': 'sharesRemainingUnsold'
76
+ }
77
+
78
+ # Item 7 24F-2NT mapping (Interest Due)
79
+ item_7_24f2nt_dict = {
80
+ 'interestDue': 'interestDue',
81
+ 'totalOfRegistrationFeePlusAnyInterestDue': 'totalFeeWithInterest'
82
+ }
83
+
84
+ # Item 8 24F-2NT mapping (Total Fee)
85
+ item_8_24f2nt_dict = {
86
+ 'explanatoryNotes': 'explanatoryNotes',
87
+ 'totalOfRegistrationFeePlusAnyInterestDue': 'totalFeeWithInterest'
88
+ }
89
+
90
+ # Item 9 24F-2NT mapping (Additional Notes)
91
+ item_9_24f2nt_dict = {
92
+ 'explanatoryNotes': 'explanatoryNotes'
93
+ }
94
+
95
+ # Signature 24F-2NT mapping
96
+ signature_24f2nt_dict = {
97
+ 'nameAndTitle': 'nameAndTitle',
98
+ 'signature': 'signature',
99
+ 'signatureDate': 'signatureDate'
100
+ }
datamule/submission.py CHANGED
@@ -17,6 +17,7 @@ class Submission:
17
17
  self.path = None
18
18
  self.metadata, raw_documents = parse_sgml_submission_into_memory(sgml_content)
19
19
 
20
+ # code dupe
20
21
  self.accession = self.metadata['accession-number']
21
22
  self.filing_date= f"{self.metadata['filing-date'][:4]}-{self.metadata['filing-date'][4:6]}-{self.metadata['filing-date'][6:8]}"
22
23
 
@@ -43,6 +44,11 @@ class Submission:
43
44
  with metadata_path.open('r') as f:
44
45
  self.metadata = json.load(f)
45
46
 
47
+ # Code dupe
48
+ self.accession = self.metadata['accession-number']
49
+ self.filing_date= f"{self.metadata['filing-date'][:4]}-{self.metadata['filing-date'][4:6]}-{self.metadata['filing-date'][6:8]}"
50
+
51
+
46
52
 
47
53
 
48
54
  def document_type(self, document_type):
@@ -65,9 +71,12 @@ class Submission:
65
71
  document_path = self.path / filename
66
72
  extension = document_path.suffix
67
73
 
68
- with document_path.open('r') as f:
74
+ with document_path.open('rb') as f:
69
75
  content = f.read()
70
76
 
77
+ if extension in ['.htm','.html','.txt','.xml']:
78
+ content = content.decode('utf-8', errors='replace')
79
+
71
80
  yield Document(type=doc['type'], content=content, extension=extension,filing_date=self.filing_date,accession=self.accession,path=document_path)
72
81
  # if loaded from sgml_content
73
82
  else:
@@ -89,9 +98,12 @@ class Submission:
89
98
 
90
99
  # check if the file exists
91
100
  if document_path.exists():
92
- with document_path.open('r') as f:
101
+ with document_path.open('rb') as f:
93
102
  content = f.read()
94
103
 
104
+ if extension in ['.htm','.html','.txt','.xml']:
105
+ content = content.decode('utf-8', errors='replace')
106
+
95
107
  yield Document(type=doc['type'], content=content, extension=extension,filing_date=self.filing_date,accession=self.accession,path=document_path)
96
108
  else:
97
109
  print(f"Warning: File {document_path} does not exist likely due to keep types in downloading.")
@@ -100,28 +112,6 @@ class Submission:
100
112
  else:
101
113
  yield self.documents[idx]
102
114
 
103
- # keep documents by document type
104
- def keep(self, document_type):
105
- # Convert single document type to list for consistent handling
106
- if isinstance(document_type, str):
107
- document_types = [document_type]
108
- else:
109
- document_types = document_type
110
-
111
- if self.path is not None:
112
- for doc in self.metadata['documents']:
113
- filename = doc.get('filename')
114
- type = doc.get('type')
115
- if type not in document_types:
116
- # oh we need handling here for sequences case
117
- if filename is None:
118
- filename = doc.sequence + '.txt'
119
-
120
- document_path = self.path / filename
121
- # delete the file
122
- document_path.unlink()
123
- else:
124
- print("Warning: keep() method is only available when loading from path.")
125
115
 
126
116
 
127
117
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datamule
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Making it easier to use SEC filings.
5
5
  Home-page: https://github.com/john-friedman/datamule-python
6
6
  Author: John Friedman
@@ -5,11 +5,32 @@ datamule/index.py,sha256=0txvbzPcvY1GsdxA-wGdLzAByxSeE_1VyyBp9mZEQRM,2292
5
5
  datamule/package_updater.py,sha256=Z9zaa_y0Z5cknpRn8oPea3gg4kquFHfpfhduKKCZ6NU,958
6
6
  datamule/portfolio.py,sha256=so6j2KrkcZOToHIqkANAu3CC4QsfgaUN1zk9CrbRe1E,7225
7
7
  datamule/sheet.py,sha256=TvFqK9eAYuVoJ2uWdAlx5EN6vS9lke-aZf7FqtUiDBc,22304
8
- datamule/submission.py,sha256=tc4-8houjT2gfSK0P7ekowPduT31rj5_zt0axwZUacc,8483
8
+ datamule/submission.py,sha256=HXuFL6snLevGk7DGlvPbjcBOJuccAIxEPXnkA1TXX8Y,8121
9
9
  datamule/document/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  datamule/document/document.py,sha256=BRnHPVt-vIT7EZTF-c-Ulv3N33xX9zE02Q9mKXVDeuY,9474
11
11
  datamule/document/processing.py,sha256=fw-1OWfbmZhG1R8XpJx_vcGwz3_djmk0FrblHAMPmwc,27476
12
12
  datamule/document/table.py,sha256=Sv9jTGiVhnWIY9nHaynUUixwbCrvbLsf0fdOnFR-NCY,10791
13
+ datamule/document/mappings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ datamule/document/mappings/atsn.py,sha256=qkZGNIhyPC3VTTOjQ8-FSCQIhUy4XeSycUGLShxNVCo,17743
15
+ datamule/document/mappings/cfportal.py,sha256=bR9d6DDY0kJ_HGx_hND2y1PNNkZjemYZ2KdyFAcv760,25257
16
+ datamule/document/mappings/ex99a_sdr.py,sha256=PNdj9I0ZhNicPObLelNmjp33EgTwzvukqkBDnwxarE0,19
17
+ datamule/document/mappings/ex99c_sdr.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ datamule/document/mappings/ex99g_sdr.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ datamule/document/mappings/ex99i_sdr.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ datamule/document/mappings/information_table.py,sha256=t8xshuUPvPFbT3pGUiXcSIw2gnfw7rCvbh_aBV9NSQM,1560
21
+ datamule/document/mappings/nmfp.py,sha256=WuTyM1SkBiiLVAHqFF4DTZ_8AvsIuonT2w7pwYDPTDw,17767
22
+ datamule/document/mappings/npx.py,sha256=xwruBueC09kfWhXV3fNUnQWYwCWrdrhQoVO3cKfPTO4,6556
23
+ datamule/document/mappings/onefourtyfour.py,sha256=_-w9h6wGINGH5pQqQvPrd0cgB5QfCtPG5M40ewf_w8Q,2604
24
+ datamule/document/mappings/ownership.py,sha256=DcOxZW2cPiVD3ra2ojoZX47CYcR-_86O-6Ts8T4oaF4,10214
25
+ datamule/document/mappings/proxy_voting_record.py,sha256=gTjx72HM3ge9dKwOFyADjQjlD55pLdqnGjik6dHehA4,29
26
+ datamule/document/mappings/sbs.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
+ datamule/document/mappings/sbsef.py,sha256=Zw58rbYcnitynk1mh9g1jDrCfqmFlY60OEjPM6p9iF0,534
28
+ datamule/document/mappings/schedule13.py,sha256=lh9sukpEte514Gid77Nz9zh3uBEFZEemrZ2Uau0qsgk,6295
29
+ datamule/document/mappings/sdr.py,sha256=UekqZId5PFMMWRAJSaPvCpN4c1Hx-SLAQPEN8GW_Gbg,4829
30
+ datamule/document/mappings/ta.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ datamule/document/mappings/thirteenfhr.py,sha256=QD4WztCebi6CwVPsgH9vQti0KpP257mYdFhNBQTbfwg,86
32
+ datamule/document/mappings/twentyfivense.py,sha256=1IkOk3qODAXqUqO84ZrD-hSqgOJyhSKcncX9aARzl9Y,880
33
+ datamule/document/mappings/twentyfourf2nt.py,sha256=Q7RPT3JgJHjYdjMuaSyAxclt6QPT_LgCQloxp-ByDuI,4118
13
34
  datamule/mapping_dicts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
35
  datamule/mapping_dicts/txt_mapping_dicts.py,sha256=DQPrGYbAPQxomRUtt4iiMGrwuF7BHc_LeFBQuYBzU9o,6311
15
36
  datamule/mapping_dicts/xml_mapping_dicts.py,sha256=Z22yDVwKYonUfM5foQP00dVDE8EHhhMKp0CLqVKV5OI,438
@@ -34,7 +55,7 @@ datamule/seclibrary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
34
55
  datamule/seclibrary/bq.py,sha256=C8sb_rpXTvchprrFLcbRar4Qi0XWW25tnv1YsHSS5o4,18025
35
56
  datamule/seclibrary/downloader.py,sha256=fJztJ_sEfv2oHHbDff07DRlXLmztXnzt3Yvv5YaZgGk,13718
36
57
  datamule/seclibrary/query.py,sha256=qGuursTERRbOGfoDcYcpo4oWkW3PCBW6x1Qf1Puiak4,7352
37
- datamule-1.2.2.dist-info/METADATA,sha256=QpXbg-4cnRknynj-W4Z2Sc1zKlWan62zEG8OrN2_E-A,512
38
- datamule-1.2.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
39
- datamule-1.2.2.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
40
- datamule-1.2.2.dist-info/RECORD,,
58
+ datamule-1.2.4.dist-info/METADATA,sha256=DLshIAlPp8Tw1Jc-dQxOgyfBSuHklJ7PP0n73Zfw4ao,512
59
+ datamule-1.2.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
60
+ datamule-1.2.4.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
61
+ datamule-1.2.4.dist-info/RECORD,,