Skip to content

Commit 0c9a28a

Browse files
author
Tom Softreck
committed
Release version 0.1.54
1 parent 23b4b17 commit 0c9a28a

File tree

7 files changed

+52
-11
lines changed

7 files changed

+52
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.1.54] - 2025-04-16
6+
57
## [0.1.53] - 2025-04-16
68

79
## [0.1.52] - 2025-04-16

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Configuration setup
2727
setup(
2828
name="pyfunc2",
29-
version="0.1.51",
29+
version="0.1.52",
3030
description="libs for cameramonit, ocr, fin-officer, cfo, and other projects",
3131
long_description=LONG_DESCRIPTION,
3232
long_description_content_type="text/markdown",

setup.py.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ except FileNotFoundError:
2626
# Configuration setup
2727
setup(
2828
name="pyfunc2",
29-
version="0.1.50",
29+
version="0.1.51",
3030
description="libs for cameramonit, ocr, fin-officer, cfo, and other projects",
3131
long_description=LONG_DESCRIPTION,
3232
long_description_content_type="text/markdown",

src/pyfunc2/email/download_attachments_in_email.py

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
import base64
12
import os
23
import email
4+
from email.mime.multipart import MIMEMultipart
5+
from email.mime.text import MIMEText
6+
from email.mime.image import MIMEImage
7+
from pyfunc2.file.check_and_create_path import check_and_create_path
8+
39
from types import NoneType
410

5-
import sys
6-
from ..file.check_and_create_path import check_and_create_path
711

812
# pip install python-magic
913

@@ -15,10 +19,40 @@ def download_attachments_in_email(resp, data, emailid="", outputdir="", xx=0,
1519

1620
# print("download_attachments_in_email emailid:", emailid)
1721
# resp, data = m.fetch(emailid, '(RFC822)')
22+
global type
1823
print("mail respo:", resp)
1924

25+
26+
if not isinstance(data, list):
27+
print("data is not list")
28+
return
29+
30+
if not isinstance(data[0], tuple):
31+
print("data[0] is not list")
32+
return
33+
2034
email_body = data[0][1]
35+
36+
if not isinstance(email_body, bytes):
37+
print("email_body is not bytes")
38+
return
39+
40+
# print(email_body)
41+
# print(str(email_body))
42+
# print(str(type(email_body)))
43+
# check if email_body is bytes
44+
45+
46+
#email_body = email_body.decode('utf-8')
47+
48+
# print("email_body after decode is bytes")
49+
50+
# print(type(email_body))
51+
# print(email_body)
52+
53+
# print("email_body
2154
mail = email.message_from_bytes(email_body)
55+
2256
if mail.get_content_maintype() != 'multipart':
2357
return
2458

src/pyfunc2/local/pull_all_repos.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import sys
21
import os
32

4-
sys.path.append('../')
5-
from local.git_folders_in_path import git_folders_in_path
6-
from function.differenceElementsInArrays import differenceElementsInArrays
3+
from .git_folders_in_path import git_folders_in_path
4+
# from function.differenceElementsInArrays import differenceElementsInArrays
5+
+ # from ..function.differenceElementsInArrays import differenceElementsInArrays
76

87

98
def pull_all_repos(local_path):
@@ -12,10 +11,10 @@ def pull_all_repos(local_path):
1211
# print(git_local_repos)
1312
not_expected_folders = [local_path + '/.idea']
1413
# remove from array existing elements from another array
15-
filtered_non_git_folders = differenceElementsInArrays(git_local_repos, not_expected_folders)
16-
print(filtered_non_git_folders)
14+
# filtered_non_git_folders = differenceElementsInArrays(git_local_repos, not_expected_folders)
15+
# print(filtered_non_git_folders)
1716
# not_existing_folder = differenceElementsInArrays(expected_folders, repos_in_orgs)
18-
for repo_folder in filtered_non_git_folders:
17+
for repo_folder in git_local_repos:
1918
# get last folder from path
2019
repo_name = repo_folder.split('/')[-1]
2120
print(repo_name)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Stub file for get_str_from_dict
2+
def get_str_from_dict(d):
3+
return str(d)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Stub file for get_str_from_json
2+
def get_str_from_json(j):
3+
return str(j)

0 commit comments

Comments
 (0)