db2text 0.2.3__tar.gz → 0.2.4__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.
- {db2text-0.2.3/db2text.egg-info → db2text-0.2.4}/PKG-INFO +1 -1
- {db2text-0.2.3 → db2text-0.2.4}/database2text/tool.py +1 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text/util.py +7 -2
- {db2text-0.2.3 → db2text-0.2.4/db2text.egg-info}/PKG-INFO +1 -1
- {db2text-0.2.3 → db2text-0.2.4}/setup.py +1 -1
- {db2text-0.2.3 → db2text-0.2.4}/LICENSE +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/MANIFEST.in +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/README.md +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/__init__.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/dbtmanual.md +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/dot.mb +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/dbt_dot_mssql.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/dm/all.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/mysql/all.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/mysql/wiki.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/opengauss/all.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/oracle/all.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/oracle/crmrpt.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/datafile/sample/sqlserver/all.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/dbt.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/dm.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/mssql.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/mysql.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/opengauss.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/database2text/oracle11.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text/__init__.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text/data.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text/db/__init__.py +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/SOURCES.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/dependency_links.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/entry_points.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/not-zip-safe +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/requires.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/db2text.egg-info/top_level.txt +0 -0
- {db2text-0.2.3 → db2text-0.2.4}/setup.cfg +0 -0
|
@@ -276,6 +276,7 @@ class wiki(object):
|
|
|
276
276
|
ischanged=True
|
|
277
277
|
else:
|
|
278
278
|
print(f"数据有更新,原始数据{len(dt.gd.oritext)}行,更新数据{len(dt.gd.text)}行")
|
|
279
|
+
dt.printdiff(dt.gd.oritext,dt.gd.text)
|
|
279
280
|
if ischanged or len(dt.gd.text)!=len(dt.gd.oritext): #更新后数据和原始数据不符,需要更新
|
|
280
281
|
page.edit(dt.gd.linebreak.join(dt.gd.text))
|
|
281
282
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
__all__=["inittext","p","capture","mergecolumndata","createcolumndata","replacenewdata","analydata"]
|
|
1
|
+
__all__=["inittext","p","capture","mergecolumndata","createcolumndata","replacenewdata","analydata","printdiff"]
|
|
2
2
|
|
|
3
3
|
import db2text as dt
|
|
4
|
-
import time,copy
|
|
4
|
+
import time,copy,difflib
|
|
5
5
|
from pprint import pprint
|
|
6
6
|
|
|
7
7
|
def inittext(text):
|
|
@@ -106,3 +106,8 @@ def createcolumndata(mdata):
|
|
|
106
106
|
def replacenewdata(newdata):
|
|
107
107
|
'用新数据替换掉text中的相应部分'
|
|
108
108
|
dt.gd.text=dt.gd.text[:dt.gd.capturebegin]+newdata+dt.gd.text[dt.gd.captureend+1:]
|
|
109
|
+
|
|
110
|
+
def printdiff(t1,t2):
|
|
111
|
+
'显示t1和t2这两个列表之间的文本差异'
|
|
112
|
+
diff=difflib.Differ()
|
|
113
|
+
print("\n".join(difflib.context_diff(t1,t2)))
|
|
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
|
|
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
|