This is an example of Go code calling to a C++ library with a C wrapper.
go build # this only ensures it compiles| #!/bin/sh | |
| # Converts all flac files in the directory to high-quality mp3 | |
| for flacfile in *.flac | |
| do | |
| flac --decode "$flacfile" | |
| wavfile="${flacfile:0:(${#flacfile}-4)}wav" | |
| lame -b320 -q0 -ms "$wavfile" | |
| rm "$wavfile" | |
| done |
| from mutagen.easyid3 import EasyID3 as Tag | |
| from os import listdir | |
| from re import sub | |
| for f in listdir('.'): | |
| if (f[-4:] == '.mp3'): | |
| try: | |
| tag = Tag(f) | |
| except: | |
| tag = Tag() |