code cleanup
This commit is contained in:
20
convert.go
20
convert.go
@@ -45,10 +45,6 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// select the root element
|
|
||||||
//root := doc.SelectElement("plist")
|
|
||||||
//fmt.Println("ROOT element:", root.Tag)
|
|
||||||
|
|
||||||
// find the playlist elements
|
// find the playlist elements
|
||||||
for _, e := range doc.FindElements("./plist/dict/array/dict/array/dict/integer") {
|
for _, e := range doc.FindElements("./plist/dict/array/dict/array/dict/integer") {
|
||||||
// add track to playlist
|
// add track to playlist
|
||||||
@@ -133,16 +129,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, e := range playlist {
|
|
||||||
_ = e
|
|
||||||
//fmt.Printf("Name: %s\nArist: %s\nLocation: %s\nID: %s\n\n", e.name, e.artist, e.location, e.id)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, e := range playlist_tracks {
|
|
||||||
_ = e
|
|
||||||
//fmt.Println(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
// create the xml file
|
// create the xml file
|
||||||
file, err := os.OpenFile("main_parsed.xml", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
file, err := os.OpenFile("main_parsed.xml", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -167,8 +153,4 @@ func main() {
|
|||||||
|
|
||||||
w.Flush()
|
w.Flush()
|
||||||
|
|
||||||
//fmt.Printf("\n\n")
|
}
|
||||||
//fmt.Println(len(songlist))
|
|
||||||
//fmt.Printf("\n\n")
|
|
||||||
//fmt.Println(playlist_length)
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user