From: Ruben Beltran del Rio Date: Sat, 16 Mar 2024 13:50:59 +0000 (+0100) Subject: Clean up files X-Git-Tag: 3.0.0~15 X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/commitdiff_plain/e91dea6e25c7c8c3c3b77ac7aab0bea97e589a07 Clean up files --- diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 07ab746..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b91c725..7db059a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,8 @@ # 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 @@ -25,15 +14,6 @@ information without their consent. Do not harass others. 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/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index db35f5c..0000000 --- a/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -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 diff --git a/Sources/lyricli/sources/spotify_source.swift b/Sources/lyricli/sources/spotify_source.swift deleted file mode 100644 index 863a399..0000000 --- a/Sources/lyricli/sources/spotify_source.swift +++ /dev/null @@ -1,49 +0,0 @@ -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 } -}