分页: 1 / 1

[highwind] --- nemo-actions

发表于 : 2014-03-21 22:24
highwind
调用pyrenamer批量重命名文件
预先需安装pyrenamer

代码: 全选

[Nemo Action]
Active=true
Name=pyRenamer
Comment=rename multiple files
Exec=pyrenamer %P
Icon-Name=pyrenamer
Selection=m
Extensions=any;

Re: [highwind] --- nemo-actions

发表于 : 2014-03-21 22:32
highwind
集合多个文件至同一文件夹

代码: 全选

[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]

Re: [highwind] --- nemo-actions

发表于 : 2014-03-21 22:35
highwind
调用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;

Re: [highwind] --- nemo-actions

发表于 : 2014-03-21 23:35
highwind
乱码查看(暂时用处不大了)

代码: 全选

[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;

Re: [highwind] --- nemo-actions

发表于 : 2014-03-27 9:57
highwind
乱码文件转码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

Re: [highwind] --- nemo-actions

发表于 : 2014-04-10 13:31
highwind
调用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;

Re: [highwind] --- nemo-actions

发表于 : 2014-04-16 1:12
highwind
打开包含文件的文件夹,
一般只在搜索界面时比较有用

代码: 全选

[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

Re: [highwind] --- nemo-actions

发表于 : 2014-05-15 4:10
highwind

Re: [highwind] --- nemo-actions

发表于 : 2014-06-03 4:03
highwind