Exemplo n.º 1
0
func main() {
	init_flags()

	cur_user, _ := user.Current()
	homedir := cur_user.HomeDir
	songs_dir := path.Join(homedir, ".cliaoke", "songs")
	lyrics_dir := path.Join(homedir, ".cliaoke", "lyrics")

	if !webutils.FileExists(songs_dir) {
		os.MkdirAll(songs_dir, os.ModeDir|0755)
		songs.DoItAll(songs_dir)
	}

	if !webutils.FileExists(lyrics_dir) {
		os.MkdirAll(lyrics_dir, os.ModeDir|0755)
	}

	if list_songs {
		songs.PrintAllSongs(songs_dir)
		os.Exit(0)
	} else {
		lyrics.ScrapeLyrics(sing_song, lyrics_dir)
	}
}
Exemplo n.º 2
0
func LyricsAlreadyDownloaded(song_file, lyrics_dir string) bool {
	save_name := CreateSaveName(song_file)
	return webutils.FileExists(path.Join(lyrics_dir, save_name))
}