+++ /dev/null
-# Changelog
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/)
-and this project adheres to [Semantic Versioning](http://semver.org/).
-
-## [Unreleased]
-
-## [1.0.0]
-### Added
-- `printLyrics(_ currentTrack: Track)` allows directly specifying
- track in library
-- `lyricli_command` specifies the flags
-- Support for catalina Music app
-
-### Changed
-- CI scripts updated for gitlab CI instead of Travis
-- Flags are now single words
-- Update to Swift 5 tools
-- Replace CommandLineKit with Bariloche
-- Reorganize sources folder
-- Does not open apps when running
-
-### Removed
-- Arguments Source (functionality moved to main)
-
-## [0.3.0]
-### Added
-- Spotify Source Support
-
-### Changed
-- Fix case where iTunes returned track when app was closed
-- Fix structure and links in CHANGELOG.md
-
-## [0.2.0]
-### Added
-- iTunes Source Support
-
-### Changed
-- Fix Lyricli freezes when no track found
-- Fix README URLs
-
-## 0.1.0 - 2017-05-20
-### Added
-- Documentation with Jazzy / SourceKitten
-- Apache License
-- Documentation to help use lyricli and contribute
-- Makefile to help build and install
-- CI integration
-- Lyrics engine to fetch the lyrics from lyricswiki
-- Arguments source to read song and artist from command line
-- Parsing of options to match legacy lyricli
-- Placeholder for the library with expected endpoints
-
-[1.0.0]: https://github.com/lyricli-app/lyricli/compare/0.3.0...1.0.0
-[0.3.0]: https://github.com/lyricli-app/lyricli/compare/0.2.0...0.3.0
-[0.2.0]: https://github.com/lyricli-app/lyricli/compare/0.1.0...0.2.0
-[Unreleased]: https://github.com/lyricli-app/lyricli/compare/master...develop
# Contributing to Lyricli
-At this moment this is a really small project that I used to revive an
-old ruby project and learn swift, it probably has a lot of bad code that
-is not in "the swift way", it has no tests and can always be extended to
-support more sources.
-
-## The ~~Roadmap~~ ~~Streetmap~~ ~~Pathmap~~ Corridormap
-
-* Writing sources (They're used to automatically obtain artist and song
- name from apps or services)
-* Writing tests
-* Improving code to match idiomatic swift
-* Improving the documentation
-* Extending the lyrics engine to support different lyrics sources
-* Improving the build system
+There is no particular direction planned for this project, but improving
+code quality, adding new sources, or the ability to use different lyrics
+engines would be welcome.
## How to contribute
To report unacceptabe behavior, send an [e-mail][email]
-## Sending Pull Requests
-
-* Run [swiftlint][swiftlint] on the Source directory and make sure there are no errors
-* There should be no warnings on compilation
-* [CI][ci] should be green
-* Make the PRs according to [Git Flow][gitflow]: (features go to
- develop, hotfixes go to master)
+* Send patches to lyricli@r.bdr.sh using [git-send-mail][git-send-mail]
-[gitflow]: https://github.com/nvie/gitflow
-[swiftlint]: https://github.com/realm/SwiftLint
-[email]: mailto:ben@nsovocal.com
-[ci]: https://travis-ci.org/lyricli-app/lyricli
+[git-send-mail]: http://git-send-mail.io/
+++ /dev/null
-ARG swift_version=latest
-FROM swift:${swift_version}
-
-RUN apt-get update && apt-get install -y \
- libsqlite3-dev \
- ruby \
- ruby-dev \
- wget \
- && rm -rf /var/lib/apt/lists/*
-
-RUN gem install --no-ri --no-rdoc jazzy
-
-# SourceKitten
-
-RUN git clone https://github.com/jpsim/SourceKitten.git /tmp/SourceKitten \
- && cd /tmp/SourceKitten \
- && make install \
- && rm -rf /tmp/SourceKitten
-
-# Swiftlint
-
-RUN git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint \
- && cd /tmp/SwiftLint \
- && git submodule update --init --recursive \
- && make install \
- && rm -rf /tmp/SwiftLint
+++ /dev/null
-import ScriptingBridge
-
-// Protocol to obtain the track from Spotify
-@objc protocol SpotifyTrack {
- @objc optional var name: String {get}
- @objc optional var artist: String {get}
-}
-
-// Protocol to interact with Spotify
-@objc protocol SpotifyApplication {
- @objc optional var currentTrack: SpotifyTrack? {get}
-}
-
-extension SBApplication: SpotifyApplication {}
-
-// Source that reads track artist and name from current Spotify track
-class SpotifySource: Source {
-
- // Calls the spotify API and returns the current track
- var currentTrack: Track? {
-
- if let spotify: SpotifyApplication = SBApplication(bundleIdentifier: "com.spotify.client") {
- if let application = spotify as? SBApplication {
- if !application.isRunning {
- return nil
- }
- }
-
- // Attempt to fetch the title from a song
-
- if let currentTrack = spotify.currentTrack {
- if let track = currentTrack {
- if let name = track.name {
- if let artist = track.artist {
-
- return Track(withName: name, andArtist: artist)
- }
- }
- }
- }
- }
-
- return nil
- }
-
- func enable() -> Bool { return true }
- func disable() -> Bool { return true }
- func reset() -> Bool { return true }
-}