This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Usage example: ./convmp3 *.wma | |
while [ ! $# -eq 0 ] | |
do | |
affix=`echo $1|perl -pe 's|(.*)(\..*?)$|\2|'` | |
echo $affix | |
inTmpFile=`cat /dev/urandom | strings -n 5 | head -n 1`$affix | |
outTmpFile=`cat /dev/urandom | sed 's/[^a-zA-Z0-9]//g' | strings -n 5 | head -n 1`.mp3 | |
ln -s "$1" $inTmpFile | |
outputFile=`echo $1 | perl -pe 's|(.*\.).*?$|\1mp3|'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
#encoding=utf8 | |
#Usage example : ./fillid3 run.mp3 | |
#This tool aim to tackle id3 v1 tags, v1 only support ISO-8859-1 encoding! | |
#Want other language support, convert to id3 v2 format. | |
from mutagen.mp3 import MP3 | |
from mutagen.id3 import ID3, TRCK, TIT2, TPE1, TALB, TDRC, TCON, COMM | |
from mutagen.easyid3 import EasyID3 | |
import sys | |
if len(sys.argv)<2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#给出一个简体的mp4文件名,给出一个繁体的avi文件名 | |
s2t(){ | |
#把文件名存储进一个文件内 | |
srcf=`mktemp` | |
destf=`mktemp` | |
#对文件内容进行转码 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import pyid3lib | |
import sys | |
if len(sys.argv) < 2 or len(sys.argv) > 3: | |
sys.exit('Usage: %s filename' % sys.argv[0]) | |
print("Modify file:\n" + sys.argv[1]) | |
f=pyid3lib.tag(sys.argv[1]) | |
#Title | |
print("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
#encoding=utf8 | |
#first, you should go some online music website, like xiami, to listen music until the cache download finish. #Then run this command, input the artist name and song name. | |
import pyid3lib | |
import glob | |
import os | |
#cacheDir= os.environ['HOME'] + '/.cache/google-chrome/Default/Cache/' | |
cacheDir= os.environ['HOME'] + '/.cache/chromium/Default/Cache/' | |
#make a list sort by time inversely | |
fl = sorted(glob.glob(cacheDir + 'f*'), key=lambda f:os.stat(f).st_mtime, reverse=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import re | |
import shutil | |
import subprocess | |
#path definition | |
#install_target: ${HOME}/prog/ | |
#tar_file_path: install_target/blender-2.83-a24f52c51cff-linux64.tar.xz | |
#blender_foldername: blender-2.83-a24f52c51cff-linux64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "$PWD/$1" | |
# usage | |
# ~/tmp$ ls tmp | |
# a b c | |
# ~/tmp$ lsf a | |
# /home/example/tmp/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import re | |
import sys | |
from tabulate import tabulate | |
comments_re = re.compile(r'/\*.*\/') | |
in_chain, eof = False, False | |
headers, table = [], [] |