[highwind] --- nemo-actions

仅供存放个人的配置文件,不要在本版发问。
回复
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

[highwind] --- nemo-actions

#1

帖子 highwind » 2014-03-21 22:24

调用pyrenamer批量重命名文件
预先需安装pyrenamer

代码: 全选

[Nemo Action]
Active=true
Name=pyRenamer
Comment=rename multiple files
Exec=pyrenamer %P
Icon-Name=pyrenamer
Selection=m
Extensions=any;
上次由 highwind 在 2014-03-27 9:49,总共编辑 1 次。
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#2

帖子 highwind » 2014-03-21 22:32

集合多个文件至同一文件夹

代码: 全选

[Nemo Action]
Active=true
Name=Put them into same folder
Comment=make dir for selected files
Exec=<NewFolderWithSelection.py %F>
Icon-Name=folder
Selection=m
Extensions=any;
Quote=double
NewFolderWithSelection.py
[python]
#!/usr/bin/env python3
import os
import sys
from time import time,localtime,strftime
import shutil

DefPath=strftime("%Y-%m-%d_%H-%M-%S",localtime(time())) #如已经存在同名文件夹的处理
AllPath=[]
for i in sys.argv[1:]:
AllPath.append(i)
CommonPath=os.path.commonprefix(AllPath)
isExists=os.path.exists(CommonPath)
if not isExists:
pass
else:
CommonPath=os.path.join(CommonPath,DefPath)

os.makedirs(CommonPath)
for i in sys.argv[1:]:
shutil.move(i,CommonPath)

# End of the Program
[/python]
上次由 highwind 在 2014-05-30 9:21,总共编辑 1 次。
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#3

帖子 highwind » 2014-03-21 22:35

调用gnome-search-tool全盘搜索同名文件
请预先安装gnome-search-tool

代码: 全选

[Nemo Action]
Active=true
Name=Find filename is %N
Comment==Find %N in this computer(root/)
Exec=gnome-search-tool --named=%f --path="/"
Icon-Name=find
Selection=s
Extensions=any;
上次由 highwind 在 2014-04-10 23:33,总共编辑 3 次。
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#4

帖子 highwind » 2014-03-21 23:35

乱码查看(暂时用处不大了)

代码: 全选

[Nemo Action]
Active=true
Name=Guess GBK Chaos-code
Comment=Guess the original name of %N
Exec=gnome-terminal -x sh -c "echo %f | iconv -f utf-8 -t iso8859-1 | iconv -f gbk -t utf-8 | less"
Icon-Name=user-bookmarks
Selection=s
Extensions=any;
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#5

帖子 highwind » 2014-03-27 9:57

乱码文件转码GBK->UTF8
需预先安装enca

代码: 全选

[Nemo Action]
Active=true
Name=GBK2UTF8
Comment=convert files encode from GBK to UTF8(and make a copy of original files)
Exec=<GBK2UTF8.sh %F>
Icon-Name=gthumb
Selection=notnone
Extensions=any;
Quote=double
GBK2UTF8.sh

代码: 全选

#!/bin/bash
CopyFileTail="--(ORG)"
for args in "$@";do
	cp "$args" "$args""$CopyFileTail";
	enconv -L zh_CN -x UTF-8 "$args";
	done
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#6

帖子 highwind » 2014-04-10 13:31

调用gnome-search-tool文件夹内搜索包含某内容的文件
请预先安装gnome-search-tool

代码: 全选

[Nemo Action]
Active=true
Name=Find some content in %P
Comment==Find files contain some content in this folder (%P)
Exec=gnome-search-tool --contains="Input your content" --path=%P
Icon-Name=find
Selection=none
Extensions=any;
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#7

帖子 highwind » 2014-04-16 1:12

打开包含文件的文件夹,
一般只在搜索界面时比较有用

代码: 全选

[Nemo Action]
Active=true
Name=Open Containing Folder of %N
Comment=Open Containing Folder of %N
Exec=nemo %U
Icon-Name=nemo
Selection=s
Extensions=any;
Quote=double
头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#8

帖子 highwind » 2014-05-15 4:10

头像
highwind
帖子: 1362
注册时间: 2008-09-05 23:31
系统: LinuxMint17

Re: [highwind] --- nemo-actions

#9

帖子 highwind » 2014-06-03 4:03

回复