xython 3.3.0__tar.gz → 3.3.1__tar.gz
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.
- {xython-3.3.0/src/xython.egg-info → xython-3.3.1}/PKG-INFO +2 -2
- {xython-3.3.0 → xython-3.3.1}/setup.py +2 -2
- {xython-3.3.0 → xython-3.3.1}/src/xython/__init__.py +1 -1
- {xython-3.3.0 → xython-3.3.1}/src/xython/pcell.py +49 -11
- {xython-3.3.0 → xython-3.3.1}/src/xython/youtil.py +8 -81
- {xython-3.3.0 → xython-3.3.1/src/xython.egg-info}/PKG-INFO +2 -2
- {xython-3.3.0 → xython-3.3.1}/MANIFEST.in +0 -0
- {xython-3.3.0 → xython-3.3.1}/README.md +0 -0
- {xython-3.3.0 → xython-3.3.1}/requirements.txt +0 -0
- {xython-3.3.0 → xython-3.3.1}/setup.cfg +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/anydb.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/basic_data.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/ganada.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/han.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/jfinder.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/mailmail.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/pcell_event.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/pyclick.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/pynal.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/scolor.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/xy_list.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/xy_map.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython/xy_web.py +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython.egg-info/SOURCES.txt +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython.egg-info/dependency_links.txt +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython.egg-info/not-zip-safe +0 -0
- {xython-3.3.0 → xython-3.3.1}/src/xython.egg-info/top_level.txt +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xython
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: for easy automation for excel, word, outlook, regex, color, hwp, etc BY python & win32com
|
|
5
5
|
Home-page: https://www.xython.co.kr
|
|
6
6
|
Author: s.j.park
|
|
7
7
|
Author-email: sjpkorea@naver.com
|
|
8
8
|
License: UNKNOWN
|
|
9
|
-
Download-URL: https://github.com/sjpark/xython/archive/v3.3.
|
|
9
|
+
Download-URL: https://github.com/sjpark/xython/archive/v3.3.1.tar.gz
|
|
10
10
|
Project-URL: Documentation, https://sjpkorea.github.io/xython.github.io/
|
|
11
11
|
Project-URL: Link 1, https://www.xython.co.kr
|
|
12
12
|
Platform: UNKNOWN
|
|
@@ -5,10 +5,10 @@ from setuptools import setup, find_packages
|
|
|
5
5
|
# long_description = fh.read()
|
|
6
6
|
setup(
|
|
7
7
|
name='xython',
|
|
8
|
-
version='3.3.
|
|
8
|
+
version='3.3.1',
|
|
9
9
|
url='https://www.xython.co.kr',
|
|
10
10
|
install_requires=['' ],
|
|
11
|
-
download_url='https://github.com/sjpark/xython/archive/v3.3.
|
|
11
|
+
download_url='https://github.com/sjpark/xython/archive/v3.3.1.tar.gz',
|
|
12
12
|
author='s.j.park',
|
|
13
13
|
author_email='sjpkorea@naver.com',
|
|
14
14
|
description="for easy automation for excel, word, outlook, regex, color, hwp, etc BY python & win32com",
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
import re, math, string, random, os, itertools, copy, time, sys, chardet
|
|
3
|
+
import pywintypes
|
|
4
|
+
from itertools import combinations_with_replacement # 내장모듈
|
|
3
5
|
import win32gui, win32com.client, win32con # pywin32의 모듈
|
|
4
|
-
|
|
5
6
|
import win32com.client.gencache
|
|
6
|
-
|
|
7
|
-
import xy_list
|
|
8
|
-
from itertools import combinations_with_replacement # 내장모듈
|
|
9
|
-
import pywintypes
|
|
10
|
-
import jfinder, scolor, youtil # xython 모듈
|
|
11
|
-
import basic_data
|
|
7
|
+
import jfinder, scolor, youtil,xy_list, basic_data # xython 모듈
|
|
12
8
|
|
|
13
9
|
|
|
14
10
|
class pcell:
|
|
@@ -13302,10 +13298,10 @@ class pcell:
|
|
|
13302
13298
|
result=[]
|
|
13303
13299
|
max_len = max(len(row) for row in input_data)
|
|
13304
13300
|
for list_x in input_data:
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13301
|
+
temp=list_x
|
|
13302
|
+
for no in range(len(list_x), max_len):
|
|
13303
|
+
temp.append("")
|
|
13304
|
+
result.append(temp)
|
|
13309
13305
|
return result
|
|
13310
13306
|
|
|
13311
13307
|
|
|
@@ -13444,5 +13440,47 @@ class pcell:
|
|
|
13444
13440
|
except:
|
|
13445
13441
|
print("화일이 읽히지 않아요=====>", file_name)
|
|
13446
13442
|
|
|
13443
|
+
def make_ppt_table_from_xl_data(self, ):
|
|
13444
|
+
|
|
13445
|
+
"""
|
|
13446
|
+
엑셀의 테이블 자료가 잘 복사가 않되는것 같아서, 아예 하나를 만들어 보았다
|
|
13447
|
+
엑셀의 선택한 영역의 테이블 자료를 자동으로 파워포인트의 테이블 형식으로 만드는 것이다
|
|
13448
|
+
"""
|
|
13449
|
+
activesheet_name = self.excel.read_name_for_activesheet()
|
|
13450
|
+
[x1, y1, x2, y2] = self.excel.read_address_for_selection()
|
|
13451
|
+
print([x1, y1, x2, y2])
|
|
13452
|
+
|
|
13453
|
+
Application = win32com.client.Dispatch("Powerpoint.Application")
|
|
13454
|
+
Application.Visible = True
|
|
13455
|
+
active_ppt = Application.Activepresentation
|
|
13456
|
+
slide_no = active_ppt.Slides.Count + 1
|
|
13447
13457
|
|
|
13458
|
+
new_slide = active_ppt.Slides.Add(slide_no, 12)
|
|
13459
|
+
new_table = active_ppt.Slides(slide_no).Shapes.AddTable(x2 - x1 + 1, y2 - y1 + 1)
|
|
13460
|
+
shape_no = active_ppt.Slides(slide_no).Shapes.Count
|
|
13448
13461
|
|
|
13462
|
+
for y in range(y1, y2 + 1):
|
|
13463
|
+
for x in range(x1, x2 + 1):
|
|
13464
|
+
value = self.excel.read_value_in_cell(activesheet_name, [x, y])
|
|
13465
|
+
active_ppt.Slides(slide_no).Shapes(shape_no).Table.Cell(x - x1 + 1,
|
|
13466
|
+
y - y1 + 1).Shape.TextFrame.TextRange.Text = value
|
|
13467
|
+
|
|
13468
|
+
def print_letter_cover_01(self, ):
|
|
13469
|
+
"""
|
|
13470
|
+
봉투인쇄
|
|
13471
|
+
"""
|
|
13472
|
+
|
|
13473
|
+
|
|
13474
|
+
# 기본적인 자료 설정
|
|
13475
|
+
data_from = [["sheet1", [1, 2]], ["sheet1", [1, 4]], ["sheet1", [1, 6]], ["sheet1", [1, 8]]]
|
|
13476
|
+
data_to = [["sheet2", [1, 2]], ["sheet2", [2, 2]], ["sheet2", [3, 2]], ["sheet2", [2, 3]]]
|
|
13477
|
+
|
|
13478
|
+
no_start = 1
|
|
13479
|
+
no_end = 200
|
|
13480
|
+
step = 5
|
|
13481
|
+
|
|
13482
|
+
# 실행되는 구간
|
|
13483
|
+
for no in range(no_start, no_end):
|
|
13484
|
+
for one in range(len(data_from)):
|
|
13485
|
+
value = self.excel.read_cell_value(data_from[one][0], data_from[one][1])
|
|
13486
|
+
self.excel.write_cell_value(data_to[one][0], [data_to[one][1][0] + (step * no), data_to[one][1][1]], value)
|
|
@@ -15,18 +15,12 @@ from collections import Counter
|
|
|
15
15
|
|
|
16
16
|
from datetime import datetime
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import jfinder, scolor,pynal, basic_data # xython 모듈
|
|
19
19
|
import win32con, win32com, win32gui, win32api, win32com.client #pywin32의 모듈
|
|
20
|
-
#import pywintypes
|
|
21
20
|
|
|
22
21
|
from konlpy.tag import Komoran
|
|
23
22
|
from PIL import ImageFont
|
|
24
23
|
|
|
25
|
-
import pynal
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#from sklearn import svm, dataset
|
|
29
|
-
|
|
30
24
|
class youtil():
|
|
31
25
|
"""
|
|
32
26
|
여러가지 사무용에 사용할 만한 메소드들을 만들어 놓은것이며,
|
|
@@ -36,9 +30,7 @@ class youtil():
|
|
|
36
30
|
def __init__(self):
|
|
37
31
|
self.xyre = jfinder.jfinder()
|
|
38
32
|
self.color = scolor.scolor()
|
|
39
|
-
self.vars = basic_data.basic_data()
|
|
40
|
-
self.excel = pcell.pcell()
|
|
41
|
-
self.xytime = pynal.pynal()
|
|
33
|
+
self.vars = basic_data.basic_data().vars
|
|
42
34
|
|
|
43
35
|
def get_cursor_pos(self):
|
|
44
36
|
pos = win32api.GetCursorPos()
|
|
@@ -4661,6 +4653,7 @@ class youtil():
|
|
|
4661
4653
|
"""
|
|
4662
4654
|
입력 폴더안의 서브폴더를 포함한 곳에서 화일을 경로및 수정일자를 포함해서 돌려주는것
|
|
4663
4655
|
"""
|
|
4656
|
+
xytime = pynal.pynal()
|
|
4664
4657
|
|
|
4665
4658
|
result = []
|
|
4666
4659
|
for root, sub_folder, files in os.walk(input_path):
|
|
@@ -4669,8 +4662,8 @@ class youtil():
|
|
|
4669
4662
|
file_path = root + '/' + file_name
|
|
4670
4663
|
created = os.path.getctime(file_path)
|
|
4671
4664
|
modified = os.path.getmtime(file_path)
|
|
4672
|
-
dt_obj =
|
|
4673
|
-
aaa =
|
|
4665
|
+
dt_obj = xytime.change_anytime_to_dt_obj(modified)
|
|
4666
|
+
aaa = xytime.change_dt_obj_to_ymd_list(dt_obj)
|
|
4674
4667
|
|
|
4675
4668
|
result.append([file_name, root, str(aaa[0]) + str(aaa[1]) + str(aaa[2])])
|
|
4676
4669
|
return result
|
|
@@ -7464,30 +7457,6 @@ class youtil():
|
|
|
7464
7457
|
result =result + str(one).strip() +input_char
|
|
7465
7458
|
return result
|
|
7466
7459
|
|
|
7467
|
-
def make_ppt_table_from_xl_data(self, ):
|
|
7468
|
-
"""
|
|
7469
|
-
엑셀의 테이블 자료가 잘 복사가 않되는것 같아서, 아예 하나를 만들어 보았다
|
|
7470
|
-
엑셀의 선택한 영역의 테이블 자료를 자동으로 파워포인트의 테이블 형식으로 만드는 것이다
|
|
7471
|
-
"""
|
|
7472
|
-
activesheet_name = self.excel.read_name_for_activesheet()
|
|
7473
|
-
[x1, y1, x2, y2] = self.excel.read_address_for_selection()
|
|
7474
|
-
print([x1, y1, x2, y2])
|
|
7475
|
-
|
|
7476
|
-
Application = win32com.client.Dispatch("Powerpoint.Application")
|
|
7477
|
-
Application.Visible = True
|
|
7478
|
-
active_ppt = Application.Activepresentation
|
|
7479
|
-
slide_no = active_ppt.Slides.Count + 1
|
|
7480
|
-
|
|
7481
|
-
new_slide = active_ppt.Slides.Add(slide_no, 12)
|
|
7482
|
-
new_table = active_ppt.Slides(slide_no).Shapes.AddTable(x2 - x1 + 1, y2 - y1 + 1)
|
|
7483
|
-
shape_no = active_ppt.Slides(slide_no).Shapes.Count
|
|
7484
|
-
|
|
7485
|
-
for y in range(y1, y2 + 1):
|
|
7486
|
-
for x in range(x1, x2 + 1):
|
|
7487
|
-
value = self.excel.read_value_in_cell(activesheet_name, [x, y])
|
|
7488
|
-
active_ppt.Slides(slide_no).Shapes(shape_no).Table.Cell(x - x1 + 1,
|
|
7489
|
-
y - y1 + 1).Shape.TextFrame.TextRange.Text = value
|
|
7490
|
-
|
|
7491
7460
|
def make_random_list(self, input_list, input_limit, input_times=1):
|
|
7492
7461
|
"""
|
|
7493
7462
|
입력된 자료를 랜덤으로 리스트를 만드는 것
|
|
@@ -8276,30 +8245,6 @@ class youtil():
|
|
|
8276
8245
|
shell = win32com.client.Dispatch('WScript.Shell')
|
|
8277
8246
|
intReturn = shell.Popup(input_text, second)
|
|
8278
8247
|
|
|
8279
|
-
def ppt_make_ppt_table_from_xl_data(self, ):
|
|
8280
|
-
"""
|
|
8281
|
-
엑셀의 테이블 자료가 잘 복사가 않되는것 같아서, 아예 하나를 만들어 보았다
|
|
8282
|
-
엑셀의 선택한 영역의 테이블 자료를 자동으로 파워포인트의 테이블 형식으로 만드는 것이다
|
|
8283
|
-
"""
|
|
8284
|
-
activesheet_name = self.excel.read_activesheet_name()
|
|
8285
|
-
[x1, y1, x2, y2] = self.excel.read_select_address()
|
|
8286
|
-
print([x1, y1, x2, y2])
|
|
8287
|
-
|
|
8288
|
-
Application = win32com.client.Dispatch("Powerpoint.Application")
|
|
8289
|
-
Application.Visible = True
|
|
8290
|
-
active_ppt = Application.Activepresentation
|
|
8291
|
-
slide_no = active_ppt.Slides.Count + 1
|
|
8292
|
-
|
|
8293
|
-
new_slide = active_ppt.Slides.Add(slide_no, 12)
|
|
8294
|
-
new_table = active_ppt.Slides(slide_no).Shapes.AddTable(x2 - x1 + 1, y2 - y1 + 1)
|
|
8295
|
-
shape_no = active_ppt.Slides(slide_no).Shapes.Count
|
|
8296
|
-
|
|
8297
|
-
for y in range(y1, y2 + 1):
|
|
8298
|
-
for x in range(x1, x2 + 1):
|
|
8299
|
-
value = self.excel.read_cell_value(activesheet_name, [x, y])
|
|
8300
|
-
active_ppt.Slides(slide_no).Shapes(shape_no).Table.Cell(x - x1 + 1,
|
|
8301
|
-
y - y1 + 1).Shape.TextFrame.TextRange.Text = value
|
|
8302
|
-
|
|
8303
8248
|
def pre_treatment(self, input_list_2d):
|
|
8304
8249
|
"""
|
|
8305
8250
|
자료의 전처리
|
|
@@ -8348,25 +8293,6 @@ class youtil():
|
|
|
8348
8293
|
if type(key) == type("string"): key = "'" + key + "'"
|
|
8349
8294
|
if type(value) == type("string"): value = "'" + value + "'"
|
|
8350
8295
|
|
|
8351
|
-
def print_letter_cover_01(self, ):
|
|
8352
|
-
"""
|
|
8353
|
-
봉투인쇄
|
|
8354
|
-
"""
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
# 기본적인 자료 설정
|
|
8358
|
-
data_from = [["sheet1", [1, 2]], ["sheet1", [1, 4]], ["sheet1", [1, 6]], ["sheet1", [1, 8]]]
|
|
8359
|
-
data_to = [["sheet2", [1, 2]], ["sheet2", [2, 2]], ["sheet2", [3, 2]], ["sheet2", [2, 3]]]
|
|
8360
|
-
|
|
8361
|
-
no_start = 1
|
|
8362
|
-
no_end = 200
|
|
8363
|
-
step = 5
|
|
8364
|
-
|
|
8365
|
-
# 실행되는 구간
|
|
8366
|
-
for no in range(no_start, no_end):
|
|
8367
|
-
for one in range(len(data_from)):
|
|
8368
|
-
value = self.excel.read_cell_value(data_from[one][0], data_from[one][1])
|
|
8369
|
-
self.excel.write_cell_value(data_to[one][0], [data_to[one][1][0] + (step * no), data_to[one][1][1]], value)
|
|
8370
8296
|
|
|
8371
8297
|
def print_list_one_by_one(self, list_2d):
|
|
8372
8298
|
"""
|
|
@@ -10834,11 +10760,12 @@ class youtil():
|
|
|
10834
10760
|
|
|
10835
10761
|
def cal_degree_for_hms(self, input_dt_obj=""):
|
|
10836
10762
|
# 현재의 시간을 각도로 만드는 방법
|
|
10763
|
+
xytime = pynal.pynal()
|
|
10837
10764
|
if input_dt_obj != "":
|
|
10838
10765
|
now_dt_obj = input_dt_obj
|
|
10839
10766
|
else:
|
|
10840
|
-
now_dt_obj =
|
|
10841
|
-
hour, min, sec =
|
|
10767
|
+
now_dt_obj = xytime.get_now_as_dt_obj()
|
|
10768
|
+
hour, min, sec = xytime.get_hms_list_for_dt_obj(now_dt_obj)
|
|
10842
10769
|
hour, min, sec = int(hour), int(min), int(sec)
|
|
10843
10770
|
|
|
10844
10771
|
# 시간 : 1시간은 30도의 각도임, 1분은 0.5도를 더해주어야함
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xython
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: for easy automation for excel, word, outlook, regex, color, hwp, etc BY python & win32com
|
|
5
5
|
Home-page: https://www.xython.co.kr
|
|
6
6
|
Author: s.j.park
|
|
7
7
|
Author-email: sjpkorea@naver.com
|
|
8
8
|
License: UNKNOWN
|
|
9
|
-
Download-URL: https://github.com/sjpark/xython/archive/v3.3.
|
|
9
|
+
Download-URL: https://github.com/sjpark/xython/archive/v3.3.1.tar.gz
|
|
10
10
|
Project-URL: Documentation, https://sjpkorea.github.io/xython.github.io/
|
|
11
11
|
Project-URL: Link 1, https://www.xython.co.kr
|
|
12
12
|
Platform: UNKNOWN
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|