Home > Pazz

Pazz

Pazz is a project mainly written in Haskell, it's free.

A Command-Line Program for Quickly Jotting Notes about Music

Okay, so I want to make a command-line app that allows me to keep track of my thoughts about albums, songs, artists, and quickly see them listed in a variety of different formats.

So I want to be able to specify a song, and if it is in the database, add a note to it.

Let's call it the app "pazz" for the time being.

Here are some example usages:

pazz note "Absolutely Bill's Mood" moody, dramatic, another classic on TMBG's eponymous album. Interesting rythmically. The back end of this album needs more love.

pazz note -overwrite "Absolutely Bill's Mood" moody, dramatic, another classic on TMBG's eponymous album. Interesting rythmically. The back end of this album needs more love. pazz note -o "Absolutely Bill's Mood" moody, dramatic, another classic on TMBG's eponymous album. Interesting rythmically. The back end of this album needs more love.

So the possibilities for the above line are: the song is found, and the new note is printed. the song is not found, and it cannot be created. Error message, and you try again. other errors.

commands: note: add a note (can be artist, song, album) song: shortcut for adding song. If already there, then append. album: shortcut for adding album. If already there, then append. artist: shortcut for adding artist. If already there, then append. albums: lists all albums you have chosen. Can be short or verbose. songs: lists all songs you have chosen. Can be short or verbose. artists: lists all artists that you have chosen. Can be short or verbose.

Design decisions:

I'm going to use SQLite for all of the data. I'm using the HDBC library to interface with the Haskell. This is going to be written entirely in Haskell, and hopefully will be a good learning experience.

I'm also using the cmd-args library to handle the command-line parsing, and documentation generation.

I should also use Haddock probably, and see if I can't get this on HackageDB.

Ok, so if I am using relational DB, then I don't need to worry about the redundancy of having albums that know songs and vice-versa. Furthermore, I don't have to worry about handling the parsing manually. On the other hand, I do have to interface with the database as opposed to just looking at plain text. I guess that isn't a big problem, and I can always just output files as needed.

I can also use Haskell's interact, and just do a function mapping table, to really simplify the structure of the program. What else do I want it to be able to do?

Oh, it should keep track of date added. Maybe, also think about integration with iTunes. I should get it added to Homebrew when it is finished too, cause that would be AWESOME!

Ok, so I need the following SCHEMA:

Table of Albums with Name, Notes, and Foreign Key to Songs and Artist.
Table of Songs with Name, Notes, and Foreign Key to Album, and Foreign Key to Artist. Table of Artist with Name, Notes, and Foreign Key to Album, and Foreign Key to Song.

Ok, so I think I now have the database interacting correctly with Haskell. Now, I have to implement the command-line interface. I also should figure out some way to do some automatic correction to make sure that artists aren't repeated.

Ok, so the thing with command-line parsing is that I have to make sure that violations are handled at the appropriate level.

First

Previous:Geo