Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天驴滚滚
Tagdox
提交
032a6afc
T
Tagdox
项目概览
天驴滚滚
/
Tagdox
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tagdox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
032a6afc
编写于
12月 25, 2021
作者:
H
horsesword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
文件重命名默认不再修改扩展名,避免重命名导致的其他问题。圣诞快乐!
上级
2f3d8230
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
69 addition
and
27 deletion
+69
-27
README.md
README.md
+6
-0
config/ex_folders.txt
config/ex_folders.txt
+1
-0
config/sep_exts.txt
config/sep_exts.txt
+1
-0
libs/common_funcs.py
libs/common_funcs.py
+4
-4
libs/widgets/my_tk_widgets.py
libs/widgets/my_tk_widgets.py
+3
-2
tagdox.py
tagdox.py
+26
-19
更新记录.md
更新记录.md
+28
-2
未找到文件。
README.md
浏览文件 @
032a6afc
...
...
@@ -57,6 +57,12 @@ Tagdox / 标签文库,是用于对文档进行「标签化管理」的免费
## 近期更新
#### v0.22.0.2 2021年12月25日
文件重命名默认不再修改扩展名,避免重命名导致的其他问题。
圣诞快乐!
#### v0.22.0.1 2021年12月21日
优化文件夹排序,实现英文首字母混排,且忽略标签分隔符。
精简部分菜单项。
...
...
config/ex_folders.txt
0 → 100644
浏览文件 @
032a6afc
_img
\ No newline at end of file
config/sep_exts.txt
0 → 100644
浏览文件 @
032a6afc
.md
\ No newline at end of file
libs/common_funcs.py
浏览文件 @
032a6afc
def
get_split_path
(
full_path
)
->
list
:
'''
"""
通用函数:
将完整路径按照斜杠拆分,得到每个文件夹到文件名的列表。
'''
"""
test_str
=
full_path
.
replace
(
'
\\
'
,
'/'
,
-
1
)
test_str_res
=
test_str
.
split
(
'/'
)
return
(
test_str_res
)
return
test_str_res
libs/widgets/my_tk_widgets.py
浏览文件 @
032a6afc
...
...
@@ -131,6 +131,7 @@ class tdInputWindow:
#
# 窗口设置
# self.input_window.overrideredirect(True) # 这句话可以去掉标题栏,同时也会没有阴影
# 上面功能启用之后,好像快捷键会出现问题。
self
.
w_width
=
800
self
.
w_height
=
160
#
...
...
@@ -258,7 +259,7 @@ class tdSpaceWindow:
self
.
sub_window
=
tk
.
Toplevel
(
self
.
form0
)
#
self
.
sub_window
.
transient
(
self
.
form0
)
# 避免在任务栏出现第二个窗口,而且可以实现置顶
self
.
sub_window
.
grab_set
()
# 模态
# self.sub_window.grab_set() # 模态,此功能生效后,窗口外不可以点击。注释掉就可以操作了。
#
# 窗口设置
...
...
@@ -308,7 +309,7 @@ class tdSpaceWindow:
"""
# print(event.widget)
if
event
.
widget
==
self
.
sub_window
:
print
(
"
输入框
失去焦点"
)
print
(
"失去焦点"
)
self
.
sub_exit
(
self
)
def
sub_exit
(
self
,
event
=
None
):
...
...
tagdox.py
浏览文件 @
032a6afc
...
...
@@ -49,10 +49,13 @@ URL_HELP = 'https://gitee.com/horse_sword/my-local-library' # 帮助的超链
URL_ADV
=
'https://gitee.com/horse_sword/my-local-library/issues'
# 提建议的位置
URL_CHK_UPDATE
=
'https://gitee.com/horse_sword/my-local-library/releases'
# 检查更新的位置
TAR
=
'Tagdox / 标签文库'
# 程序名称
VER
=
'v0.22.0.
1
'
# 版本号
VER
=
'v0.22.0.
2
'
# 版本号
"""
## 近期更新说明
#### v0.22.0.2 2021年12月25日
文件重命名默认不再修改扩展名,避免重命名导致的其他问题。
圣诞快乐!
#### v0.22.0.1 2021年12月21日
优化文件夹排序,实现英文首字母混排,且忽略标签分隔符。
...
...
@@ -1389,15 +1392,15 @@ def show_window_input(title_value, body_value='', init_value='', is_file_name=Tr
# 特殊处理
if
is_file_name
:
res
=
res
.
replace
(
'
\\
'
,
''
)
res
=
res
.
replace
(
'/'
,
''
)
res
=
res
.
replace
(
'?'
,
''
)
res
=
res
.
replace
(
'|'
,
''
)
res
=
res
.
replace
(
'*'
,
''
)
res
=
res
.
replace
(
'"'
,
''
)
res
=
res
.
replace
(
'<'
,
''
)
res
=
res
.
replace
(
'>'
,
''
)
res
=
res
.
replace
(
':'
,
''
)
res
=
res
.
replace
(
'
\\
'
,
'
_
'
)
res
=
res
.
replace
(
'/'
,
'
_
'
)
res
=
res
.
replace
(
'?'
,
'
_
'
)
res
=
res
.
replace
(
'|'
,
'
_
'
)
res
=
res
.
replace
(
'*'
,
'
_
'
)
res
=
res
.
replace
(
'"'
,
'
_
'
)
res
=
res
.
replace
(
'<'
,
'
_
'
)
res
=
res
.
replace
(
'>'
,
'
_
'
)
res
=
res
.
replace
(
':'
,
'
_
'
)
return
res
pass
...
...
@@ -1425,9 +1428,12 @@ def update_folder_list(event=None, need_select=True):
lst_root_text
=
get_folder_group_list
()
lst_my_path_short
=
exec_list_sort
(
lst_my_path_short
)
def
find_node_pos_by_text
(
node
,
text
):
def
find_node_pos_by_text
(
node
,
text
,
pos_min
=
0
):
"""
返回对应的位置编号
node
text
pos_min 是最小的位置,默认为0. 只会返回不小于这个值的查询位置。
"""
find_succ
=
0
pos
=
0
...
...
@@ -1436,7 +1442,7 @@ def update_folder_list(event=None, need_select=True):
else
:
items
=
tree_lst_folder
.
get_children
(
node
)
for
i
in
items
:
if
tree_lst_folder
.
item
(
i
,
'text'
)
==
text
:
if
tree_lst_folder
.
item
(
i
,
'text'
)
==
text
and
pos
>=
pos_min
:
find_succ
=
1
break
pos
+=
1
...
...
@@ -2403,20 +2409,21 @@ def exec_tree_file_rename(tar=None): # 对文件重命名
# 获得目标文件
item_text
=
tree
.
item
(
item
,
"values"
)
tmp_full_path
=
item_text
[
-
1
]
tmp_file_name
=
get_split_path
(
tmp_full_path
)[
-
1
]
tmp_file_name
=
get_split_path
(
tmp_full_path
)[
-
1
]
# 文件名
#
#
print
(
'正在重命名:'
)
print
(
tmp_full_path
)
print
(
tmp_file_name
)
print
(
'路径:'
,
tmp_full_path
)
print
(
'文件名:'
,
tmp_file_name
)
# res = simpledialog.askstring('文件重命名',prompt='请输入新的文件名',initialvalue =tmp_file_name) # 有bug,不能输入#号
res
=
show_window_input
(
'文件重命名'
,
body_value
=
'请输入新的文件名'
,
init_value
=
tmp_file_name
)
# 有bug,不能输入#号
[
fname
,
fename
]
=
os
.
path
.
splitext
(
tmp_file_name
)
# 文件名,扩展名,其中扩展名包括点号。
print
(
fname
,
' '
,
fename
)
res
=
show_window_input
(
'文件重命名'
,
body_value
=
'请输入新的文件名'
,
init_value
=
fname
)
# 有bug,不能输入#号
#
if
res
is
not
None
:
try
:
tmp_new_name
=
'/'
.
join
(
get_split_path
(
tmp_full_path
)[
0
:
-
1
]
+
[
res
])
print
(
'tmp_new_name='
)
print
(
tmp_new_name
)
tmp_new_name
=
'/'
.
join
(
get_split_path
(
tmp_full_path
)[
0
:
-
1
]
+
[
res
+
fename
])
print
(
'tmp_new_name='
,
tmp_new_name
)
# os.rename(tmp_full_path,tmp_new_name)
final_name
=
exec_safe_rename
(
tmp_full_path
,
tmp_new_name
)
update_main_window
(
0
,
fast_mode
=
True
)
...
...
更新记录.md
浏览文件 @
032a6afc
...
...
@@ -8,9 +8,18 @@
## 更新记录
# 更新记录
## 2021年12月
#### v0.22.0.2 2021年12月25日
文件重命名默认不再修改扩展名,避免重命名导致的其他问题。
圣诞快乐!
#### v0.22.0.1 2021年12月21日
优化文件夹排序,实现英文首字母混排,且忽略标签分隔符。
精简部分菜单项。
...
...
@@ -30,6 +39,12 @@
#### v0.21.4.3 2021年12月2日
隐藏了标签下拉框。
## 2021年11月
##
#### v0.21.4.2 2021年11月28日
尝试修复Typora以覆盖方式更新md文件导致丢失标签的bug。
...
...
@@ -42,6 +57,12 @@
#### v0.21.3.1 2021年11月17日
优化体验,当左键单击列表空白的时候,会自动取消选中。
## 2021年10月
#### v0.21.3.0 2021年10月30日
增加对markdown移动的优化,相对路径附件可以在移动的时候自动复制了,
这样移动后的md文件仍然可以正常访问图片等附件。
...
...
@@ -68,6 +89,11 @@
#### v0.21.0.0 2021年10月3日
优化标签逻辑,采用NTFS流模式,不再影响文件名(测试版)。
优化右键响应,现在可以正确在被点击的项目处出现右键菜单了。
## 2021年9月
#### v0.20.3.7 2021年9月18日
优化了分组的颜色,调整为浅蓝色;调整菜单按钮颜色为浅蓝色。
#### v0.20.3.6 2021年9月15日
...
...
@@ -137,7 +163,7 @@
##
#
2021年8月
## 2021年8月
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录