Git Product home page Git Product logo

wamphfind's Introduction

wamphfind

Web Amp Haskell Find Utility by George Takumi Crary

Generates the tracklist JSON seen here.

Made for Fresh2Fresh. Check him out.

Example

takumi@~/dev/wamphfind/example
λ ls -l
total 86660
-rwxr-xr-x 1 takumi なし 13656675 Apr 20 11:30 'Timothy Seals - A New Dawn (Cover Edition) - 01 Pyre Light (Cover).mp3'
-rwxr-xr-x 1 takumi なし  7768447 Apr 20 11:30 'Timothy Seals - A New Dawn (Cover Edition) - 02 Silent Thunder (Cover).mp3'

Ran with ./wamphfind -p will result in:

[
    {
        "url": "Timothy Seals - A New Dawn (Cover Edition) - 02 Silent Thunder (Cover).mp3",
        "metaData": {
            "track": "2",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "Silent Thunder (Cover)",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "Timothy Seals - A New Dawn (Cover Edition) - 01 Pyre Light (Cover).mp3",
        "metaData": {
            "track": "1",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "Pyre Light (Cover)",
            "artist": "Timothy Seals"
        }
    }
]

Which you can drop in your into your WinAmp initaltracks. If you're sticking your tracks in a directory like 'tracks/' then use the -a flag to appropriately set the url.

Usage

See --help for more details

Search local directory and output to target file

./wamphfind -o output.json

Search current working directory recursively

./wamphfind -r
[
    {
        "url": "tracks/rec0.mp3",
        "metaData": {
            "track": "1",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "rec0.mp3",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "tracks/test/testrec.mp3",
        "metaData": {
            "track": "2",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "testrec.mp3",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "tracks/test/test/testrec3.mp3",
        "metaData": {
            "track": "2",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "testrec3.mp3",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "tracks/example/rec1.mp3",
        "metaData": {
            "track": "1",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "rec1.mp3",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "tracks/example/test/rec2.mp3",
        "metaData": {
            "track": "2",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "rec2.mp3",
            "artist": "Timothy Seals"
        }
    }
]

Search local directory and output to STDOUT for piping to another process such as JQ.

./wamphfind

Search target directories (Ignore -p flag for pretty printing)

./wamphfind album1 album2 -p
[
    {
        "url": "album1/rec0.mp3",
        "metaData": {
            "track": "1",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "Pyre Light (Cover)",
            "artist": "Timothy Seals"
        }
    },
    {
        "url": "album2/rec1.mp3",
        "metaData": {
            "track": "1",
            "album": "A New Dawn (Cover Edition)",
            "year": null,
            "title": "Pyre Light (Cover)",
            "artist": "Timothy Seals"
        }
    }
]

Add a directory basename to the url metadata

./wamphfind -a tracks

RESULT: "url":"GoldenSpade.mp3" ==> "url":"tracks/GoldenSpade.mp3"

Other examples

./wamphfind -a track/
./wamphfind -a syndicate/tracks

NOTE: If the trailing slash is ommited it will be added

Use filename as track title metadata

./wamphfind -n

Use filename with extensions dropped as track title metadata

./wamphfind -e

NOTE: This will result in foo.mp3.zip -> foo

Pretty print the JSON output

./wamphfind -p

TODO

  • Duration calculation
  • Recursive directory searching
  • absolute file path handling with basenames
  • Input filepath args
  • Web Audio API extension list
  • forkMapM parallelism
  • Prompt on existing outputfile
  • Exception Handling
  • Symbolic Link Handling?

BUILD DEPENDENCIES

idiii (with the build process ported to Stack) Look at stack.yaml to control where that goes.

LICENSE

See LICENSE. If you like it buy me a beer will ya.

wamphfind's People

Contributors

adpextwindong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.