pax_global_header 0000666 0000000 0000000 00000000064 13011626140 0014504 g ustar 00root root 0000000 0000000 52 comment=458f31838a7db1744b4ad0dfcd8433c92eee71f9
glyr-1.0.10/ 0000775 0000000 0000000 00000000000 13011626140 0012540 5 ustar 00root root 0000000 0000000 glyr-1.0.10/.clang_complete 0000664 0000000 0000000 00000000201 13011626140 0015506 0 ustar 00root root 0000000 0000000 -c -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -lsqlite3 -lcurl -lcheck -lgthread-2.0 -lrt -lglib-2.0
glyr-1.0.10/.gitignore 0000664 0000000 0000000 00000000623 13011626140 0014531 0 ustar 00root root 0000000 0000000 # Ignore object files
*.o
*.a
*.so
__pycache__/
*.pyc
*.patch
*.cmake
core
*.gch
libglyr.pc
doc/doc
doc/build
spec/provider/results/
# Ignore documentation, local working directory
child/
bin/
# Ignore CMake output
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
install_manifest.txt
Makefile
# testoutput
test/out/*
# swig
*_wrap.c
# vim swap files
*.swp
*.swo
*.swn
#rmlint
rmlint.sh
rmlint.log
glyr-1.0.10/AUTHORS 0000664 0000000 0000000 00000001047 13011626140 0013612 0 ustar 00root root 0000000 0000000 Christopher Pahl
CONTRIBUTORS
------------
Sebastian Pahl
- lyricsvip provider
- various fixes (in stringlib.c)
Christoph Piechula
- jamendo provider
Matias De lellis
- 'make dist' target
Etienne Millon
- Copyright issues
- md5_update from RSA to Glib checksum
Qball Cow
- Numerous bugreports and partly fixes
- Being the first adaptor
+ People reporting bugs and using libglyr.
Please tell me if I forgot somebody.
glyr-1.0.10/CHANGELOG 0000664 0000000 0000000 00000007156 13011626140 0013763 0 ustar 00root root 0000000 0000000 Hand written changelog of important changes.
Use the github page to view the automated git generated brother.
2016/11/12
----------
+ Changed License to LGPLv3 (from GPLv3)
2011/03/07
----------
+ Fixed lyrix.at parser (ctr was incremented always, not only on item found)
+ Speed up of cover and lyrics plugins (Up to 200%)
+ Fixed lyrics:magistrix plugin
+ Fixed lyrics:lyricswiki plugin
+ Fix of DynHelp
+ Fixed overall memory leaks
+ added finalize() call to cleanup plugins
2011/03/09
----------
+ Help text reacts now on "I DONT WANNA COLOR!"
+ added ability to stop searchengine by returning GLYRE_STOP_BY_CB in callback
+ Fixed a bug when using the google plugin and -D
+ Fixed google (and other) returning 404 Pages
+ Added 'tracklist' getter12
+ Fixed all warnings occuring with highger warn level (Default now)
2011/03/13
----------
+ Added examplce.c
+ Removed alldcovers plugin (they have good image, but don't allow API usage for library and desktop applications it seems :-( )
+ Added format check for image plugins. Almost 100% success (== valid images) with this check now
+ Added option (C API) to configure levenshtein fuzzyness
+ went to bed :-)
2011/03/14
----------
+ Fixed a bug that made the itemcounter to be negative. ("Got -21 images!" he happily replied)
2011/03/17
----------
+ Fixed very ugly stringop.c - Many functions should be faster and smoother now.
+ Fixed -w stdout and tracklist. (fwrite didn't recognize \0, as ->size was the duration here)
+ Fixed an ugly bug in photos.c that crashed libglyr if ignoring a URL
+ added provider photos:google
+ reformatted due to trying anjuta as IDE (instead of pure gVim)
2011/03/18
----------
+ Replaced ugly remove_html_tags with a more generic version that works completely in-place
+ Removed a few redundant strlen()s
+ added (non-working) albumlist getter which gets all official albums from a certain artist
2011/03/19
----------
+ made albumlist getter working. Wohoo.
+ Fixed dumb shortcut bug in glyrc
+ Made finalize() of ainfo,similiar,review,tracklist,albumlist generic, i.e. only call the same function
2011/03/24
----------
+ Fixed crash when libcurl put an error to stdout (ouch..)
+ Fixed google names when having spaces (ouch x 2)
2011/03/28
----------
+ Did a lot of fixing regarding the API
+ Fixed "broken" review getter. Still slow; needs more sources.
+ Extended src/example.c to use more functions.
+ Tested API (It works, biaatch!)
2011/03/29
----------
+ Made 'return GLYRE_STOP_BY_CB;' work.
+ removed Gly_infoat, it was only for devs..
2011/05/15
----------
Found some time to work a bit here :-)
+ Added support for google translator (new 'gtrans' getter), lyrics/text can bew translated directly now.
It is a bit restricted atm. as only 100.000 chars are allowed per day per IP address. But I already
requested more. (20x times as much), hopefully it will get through. Also language detecting works.
+ Glyr does now checksumming. This is useful for developers which want to make sure the data is unique.
For normal users: Well, the duplicate check is now as fast as rmlint :-P
+ getopt_long is now getopt_long_only (no --arguments, just -argument or -a)
+ removed call_direct. It's of no use. Not even for devs.
2011/05/16
----------
+ removed wikipedia.c for ainfo - never worked. Better provide a link and (relation getter) and let the user render the site (too many information would get lost if glyr would need to parse it)
2011/06/14
----------
+ added support for proxy. (only basic libcurl support, should be suffiecient for 99% of all cases)
+ made API *much* slicker & nicer
2011/06/25
----------
- CHANGELOG discontinued, use the git commit history instead
glyr-1.0.10/CMakeLists.txt 0000664 0000000 0000000 00000016607 13011626140 0015312 0 ustar 00root root 0000000 0000000 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Write in C, write in Ceeee... :-)
PROJECT(glyr C)
# Include pkg-config
INCLUDE(FindPkgConfig)
# ------------------------------------------------
# You can configure the next few params on the cmd:
# -DLIB_SUFFIX="64" for example
# ------------------------------------------------
IF(NOT DEFINED INSTALL_BIN_DIR)
SET(INSTALL_BIN_DIR bin)
ELSE()
MESSAGE("-- Install binaries to: \"${INSTALL_BIN_DIR}\"")
ENDIF()
IF(NOT DEFINED INSTALL_LIB_DIR)
SET(INSTALL_LIB_DIR lib${LIB_SUFFIX})
ELSE()
MESSAGE("-- Install library to: \"${INSTALL_LIB_DIR}\"")
ENDIF()
IF(NOT DEFINED INSTALL_INC_DIR)
SET(INSTALL_INC_DIR include)
ELSE()
MESSAGE("-- Install headers to: \"${INSTALL_INC_DIR}\"")
ENDIF()
IF(DEFINED LIB_SUFFIX)
MESSAGE("-- Library suffix is: \"${LIB_SUFFIX}\"")
ENDIF()
# ------------------------------------------------
# ------------------------------------------------
# Versioning
# ------------------------------------------------
SET(GLYR_VERSION_MAJOR "1")
SET(GLYR_VERSION_MINOR "0")
SET(GLYR_VERSION_MICRO "9")
SET(GLYR_VERSION_NAME "Raving Raven")
# ------------------------------------------------
exec_program(
"git"
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe"
OUTPUT_VARIABLE VERSION
)
# string(REGEX MATCH "-g.*$" VERSION_SHA1 ${VERSION})
# string(REGEX REPLACE "[-g]" "" VERSION_SHA1 ${VERSION_SHA1})
# ------------------------------------------------
# CFlags and warnlevel / build config
# ------------------------------------------------
# Tell config.h.in
IF(CMAKE_BUILD_TYPE STREQUAL "debug")
SET(GLYR_DEBUG TRUE)
ELSE()
SET(CMAKE_BUILD_TYPE "release")
SET(GLYR_DEBUG FALSE)
ENDIF()
MESSAGE("-- Building Target: ${CMAKE_BUILD_TYPE}")
IF(CMAKE_COMPILER_IS_GNUCC)
SET(GCC_ONLY_FLAGS "-std=c99")
SET(GCC_ONLY_OPT "-s")
ENDIF()
SET(COMMON_FLAGS "${GCC_ONLY_FLAGS} -Wall -Wextra -Wstrict-prototypes -W -Wno-unused-parameter -Wno-strict-prototypes -fvisibility=hidden")
SET(CMAKE_C_FLAGS_RELEASE "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -Os ${GCC_ONLY_OPT}")
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -g3")
SET(CMAKE_C_FLAGS "${COMMON_FLAGS} ${CMAKE_C_FLAGS}")
# ------------------------------------------------
# ------------------------------------------------
# Configuration & pkg-config
# ------------------------------------------------
CONFIGURE_FILE(
"libglyr.pc.in"
"libglyr.pc"
)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libglyr.pc DESTINATION ${INSTALL_LIB_DIR}/pkgconfig)
# ----------------------
# Find deps
# ----------------------
FIND_PACKAGE(CURL REQUIRED)
PKG_CHECK_MODULES(GLIBPKG glib-2.0>=2.10 gthread-2.0 REQUIRED)
PKG_CHECK_MODULES(SQLITE3 sqlite3 REQUIRED)
INCLUDE_DIRECTORIES(${GLIBPKG_INCLUDE_DIRS})
# --------------------------
# set directories
# --------------------------
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables.")
SET(SUBDIR_LIB lib)
SET(SUBDIR_SRC src)
SET(SUBDIR_SWIG swig)
SET(DIR_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR_LIB})
SET(DIR_INTERN ${DIR_ROOT}/intern )
SET(DIR_COVER ${DIR_INTERN}/cover )
SET(DIR_LYRICS ${DIR_INTERN}/lyrics )
SET(DIR_PHOTOS ${DIR_INTERN}/photos )
SET(DIR_AINFO ${DIR_INTERN}/ainfo )
SET(DIR_SIMILAR ${DIR_INTERN}/similar_artist )
SET(DIR_SIMILSO ${DIR_INTERN}/similar_song )
SET(DIR_REVIEW ${DIR_INTERN}/review )
SET(DIR_TRACKLIST ${DIR_INTERN}/tracklist )
SET(DIR_ALBUMLIST ${DIR_INTERN}/albumlist )
SET(DIR_TAGS ${DIR_INTERN}/tags )
SET(DIR_RELATIONS ${DIR_INTERN}/relations )
SET(DIR_GUITARTABS ${DIR_INTERN}/guitartabs )
SET(DIR_BACKDROPS ${DIR_INTERN}/backdrops )
SET(DIR_JSMN ${DIR_ROOT}/jsmn )
# ------------------------------------------------
# Set source locations
# ------------------------------------------------
SET(LIB_SOURCE_LOCATIONS
# core
"${DIR_ROOT}/glyr.c"
"${DIR_ROOT}/core.c"
"${DIR_ROOT}/misc.c"
"${DIR_ROOT}/cache_intern.c"
"${DIR_ROOT}/cache.c"
"${DIR_ROOT}/register_plugins.c"
"${DIR_ROOT}/stringlib.c"
"${DIR_ROOT}/blacklist.c"
"${DIR_ROOT}/testing.c"
# "Builtin" special providers
"${DIR_INTERN}/cache/db_provider.c"
"${DIR_INTERN}/musictree/musictree.c"
# jsmn
"${DIR_JSMN}/jsmn.c"
# fetcher
"${DIR_INTERN}/generic.c"
"${DIR_INTERN}/ainfo.c"
"${DIR_INTERN}/cover.c"
"${DIR_INTERN}/similar_artist.c"
"${DIR_INTERN}/similar_song.c"
"${DIR_INTERN}/lyrics.c"
"${DIR_INTERN}/photos.c"
"${DIR_INTERN}/review.c"
"${DIR_INTERN}/tracklist.c"
"${DIR_INTERN}/tags.c"
"${DIR_INTERN}/relations.c"
"${DIR_INTERN}/albumlist.c"
"${DIR_INTERN}/guitartabs.c"
"${DIR_INTERN}/backdrops.c"
# extensions
"${DIR_INTERN}/common/mbid_lookup.c"
"${DIR_INTERN}/common/google.c"
"${DIR_INTERN}/common/amazon.c"
"${DIR_INTERN}/common/picsearch.c"
"${DIR_INTERN}/common/musicbrainz.c"
"${DIR_AINFO}/lastfm.c"
"${DIR_AINFO}/echonest.c"
"${DIR_AINFO}/bbcmusic.c"
"${DIR_AINFO}/lyricsreg.c"
"${DIR_SIMILAR}/lastfm.c"
"${DIR_SIMILSO}/lastfm.c"
"${DIR_TRACKLIST}/musicbrainz.c"
"${DIR_REVIEW}/amazon.c"
"${DIR_REVIEW}/echonest.c"
"${DIR_REVIEW}/metallum.c"
"${DIR_ALBUMLIST}/musicbrainz.c"
"${DIR_RELATIONS}/musicbrainz.c"
"${DIR_RELATIONS}/generated.c"
"${DIR_TAGS}/musicbrainz.c"
"${DIR_COVER}/coverartarchive.c"
"${DIR_COVER}/lastfm.c"
"${DIR_COVER}/jamendo.c"
"${DIR_COVER}/google.c"
"${DIR_COVER}/coverhunt.c"
"${DIR_COVER}/lyricswiki.c"
"${DIR_COVER}/albumart.c"
"${DIR_COVER}/discogs.c"
"${DIR_COVER}/amazon.c"
"${DIR_COVER}/rhapsody.c"
"${DIR_COVER}/picsearch.c"
"${DIR_COVER}/musicbrainz.c"
"${DIR_COVER}/slothradio.c"
"${DIR_LYRICS}/lyrdb.c"
"${DIR_LYRICS}/metallum.c"
"${DIR_LYRICS}/magistrix.c"
"${DIR_LYRICS}/lyrix_at.c"
"${DIR_LYRICS}/lyricsvip.c"
"${DIR_LYRICS}/metrolyrics.c"
"${DIR_LYRICS}/lyricswiki.c"
"${DIR_LYRICS}/lyricstime.c"
"${DIR_LYRICS}/lyricsreg.c"
"${DIR_LYRICS}/lipwalk.c"
"${DIR_LYRICS}/elyrics.c"
"${DIR_LYRICS}/chartlyrics.c"
"${DIR_LYRICS}/vagalume.c"
"${DIR_PHOTOS}/flickr.c"
"${DIR_PHOTOS}/lastfm.c"
"${DIR_PHOTOS}/google.c"
"${DIR_PHOTOS}/discogs.c"
"${DIR_PHOTOS}/singerpictures.c"
"${DIR_PHOTOS}/rhapsody.c"
"${DIR_PHOTOS}/picsearch.c"
"${DIR_PHOTOS}/bbcmusic.c"
"${DIR_GUITARTABS}/guitaretab.c"
"${DIR_GUITARTABS}/chordie_com.c"
"${DIR_BACKDROPS}/htbackdrops.c"
# Old plugins, removed due to bad quality
# "${DIR_LYRICS}/songlyrics.c"
# "${DIR_LYRICS}/directlyrics.c"
# "${DIR_LYRICS}/darklyrics.c"
)
# ------------------------------------------------
# go on with subdirs
# ------------------------------------------------
ADD_SUBDIRECTORY( ${SUBDIR_LIB} )
ADD_SUBDIRECTORY( ${SUBDIR_SRC} )
IF(DEFINED TEST)
MESSAGE("-- Building with tests: ${TEST}")
ADD_SUBDIRECTORY( spec/capi )
ENDIF()
# ------------------------------------------------
# uninstall target
# ------------------------------------------------
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY
)
ADD_CUSTOM_TARGET(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
set(PROJECT_VERSION ${GLYR_VERSION_MAJOR}.${GLYR_VERSION_MINOR}.${GLYR_VERSION_MICRO})
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
ADD_CUSTOM_TARGET(dist
COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
glyr-1.0.10/COPYING 0000664 0000000 0000000 00000016743 13011626140 0013606 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
glyr-1.0.10/README.textile 0000664 0000000 0000000 00000020356 13011626140 0015103 0 ustar 00root root 0000000 0000000 h1. Glyr is a search engine for music related metadata
The finest search you can buy for no money ^TM^
!https://github.com/sahib/glyr/blob/master/doc/screenshot.png([screenshot])!
It comes both in a command-line interface tool and as a C library, both with an easy to use interface.
The sort of metadata glyr is searching (and downloading) is usually the data you see in your musicplayer.
And indeed, originally it was written to serve as internally library for a musicplayer, but has been extended to
work as a standalone program which is able to download:
Getter
Description
cover
Coverart (front images supported only)
lyrics
Songtext
artistphotos
Photos of a certain band (press or live)
artistbio
Artist biography from various sites
review
album reviews from various sites
albumlist
A list of albums from a specific artist.
tags
Tags, either related to artist, album or title
relations
links to wikipedia, myspace, musicbrainz ...
similarartists
similar artists
similarsongs
similar songs
tracklist
tracklists of an album
guitartabs
guitartabs in textual form
backdrops
Large artist photos, suitable for backgrounds
*Terminology*:
To prevent disambiguation the following terms are used below:
* _glyrc_ is the command-line interface to libglyr.
* _libglyr_ is the library behind, which may be used by your program.
* a _getter_ is a type of metadata to download, e.g. @cover@, sometimes also called _fetcher_
* a _provider_ is a source libglyr queries in order to find the data.
* _glyros_ is the ruby wrapper for this lib. Currently it is not maintained.
h2. FEATURES
* Many built-in providers (46 at time of writing, ~30 distinct sites), high success-rate (the longer the search, the higher the risk :))
* Portable: Windows and Linux are supported (Developement on Linux) see ~[1]~ for Mac OSX,
* Fuzzy matching: Search providers with Levenshtein algorithm to eliminate typos and enhance search results.
* Decent Unicode support: All sort of valid UTF8 is taken, and UTf8 output can be forced.
* Fast Download: libcurl is used internally, and sources are searched in parallel, unneeded data is not downloaded if possible.
* Lightweight dependencies: libcurl, glib and sqlite (for caching) - typical linux systems have those installed.
* Download of a user defined amount of items, @glyrc cover -a Foo -b Bar -n 30@ tries to load 30 covers of album 'Bar' by artist 'Foo'.
* Grouped download: Query providers by descending Accuray / Speed; controllable by the user over the @qsratio@
* Optional download of images, URL is returned otherwise - so it can act a bit like a search-engine.
* Free Software licensed under the terms of the LGPLv3
* libglyr is portable, easy, threadsafe and lowlevel enough for everyone.
* ...lots of other options like min/max size for images.
* A built-in cache to store the metadata (using SQLite)
h2. GETTING STARTED
h3. Compiling
See the "compile page":https://github.com/sahib/glyr/wiki/Compiling.
h3. libglyr:
See the "examples in src/examples":https://github.com/sahib/glyr/wiki for a quickstart.
There's also a more "gentle (and brief) introduction.":https://github.com/sahib/glyr/wiki/Introduction-to-libglyr
Also see the "API Reference":http://sahib.github.com/glyr/doc/html/index.html
*Please note:* Since version 1.0.0 the API will be stable, and will only be open for extensions.
h3. glyrc:
Please refer to @glyrc -h@ which gives you a brief introduction to the arguments you can pass,
See the "wiki":https://github.com/sahib/glyr/wiki/Commandline-arguments for more detailed information about the options.
h2. FAQ
h3. Anyone using it already?
* "GMPC":http://gmpc.wikia.com/wiki/Gnome_Music_Player_Client
* "Pragha":http://pragha.wikispaces.com/
* "Freya":https://github.com/studentkittens/Freya
* "lyvi":http://ok100.github.com/lyvi/
h3. Glyr.. such a silly name! Why?
Indeed. Should have named it 'Glyros' (too late, damnit).
h3. Is it hard to write something with it?
Some knowledge of C might be required, but the code is straight forward most of the time.
Bash scripts are pretty straight-forward:
@glyrc cover --artist Equilibrium --album Sagas --write '/tmp/:artist:_:album:.:format:' --callback 'sxiv ":path:"'@
Additionally there are bindings to Python and Ruby:
* "plyr":https://github.com/sahib/python-glyr by me (complete API).
* "ruby-glyr":https://github.com/meh/ruby-glyr by meh (complete API).
h3. How..how am I supposed to use it?
Well, as normal user you could use @glyrc@ to retrieve some metadata in a batchlike fashion.
As developers you have lots of option, you could write glyr-plugins for musicplayers (gmpc!), set up a webserver with this,
hack up little scripts showing covers on the desktop.. everything related to musicmetadat is possible here.
You could also extend libglyr itself but that's a little harder.
h3. Isn't there musicbrainz already?
# The kind of metadata downloaded by glyr differs heavily from musicbrainz.
i.e. glyr finds metadata for musicplayers while musicbrainz finds data for CD Rippers and taggers.
# Musicbrainz runs remotely on some server and uses a large database which is searched through lucene.
Glyr is a client program which hops over several sites and does not cache anything, unless you do it yourself.
You could of course let glyr run on a (remote) server, and cache all results to do something similiar.
# There is "coverarchive.org":www.coverartarchive.org , but it does not seem to fully work yet. But it will be accessible once it does.
h2. AUTHOR
See the AUTHORS file that comes in glyr's distribution.
See also COPYING to know about your rights.
h2. I CAN HAZ HELP?
h3. BUGS
If you found one: _Meh. Sorry for that._
If you file a bugreport: _Hey, thank you!_
Use the "Issue Tracker":https://github.com/sahib/glyr/issues to share your find.
Alternatively you may drop me a mail at
h3. PATCHES
If you hacked one: Excellent! Send it to me via mail or see below.
If you want to add new providers you should look at the existing provider plugins to get an idea how to write one.
Starting with lib/cover/lastfm.c isn't a bad idea either, because it is one of the very simple ones.
__Take the usual Git(Hub) approach:__
# Fork this project
# Make your changes
# Make a Pull request
If you're not familiar with git, or just don't like it,
you can also send me the patch via mail:
Thanks for any help in advance!
h3. WRITE SOFTWARE THAT USES GLYR
May sound strange, but you're giving me a reason to maintain it, write new providers etc.
Also bugreports (well, there are no bugs, just in case) are appreciated, or just questions.
Those help to make the documentation more clear.
h3. DONATE
You also might consider a small (CS-Students are already motivated by 1 Cent ) donation if you use feel like it:
(For now only possible via Flattr or "Paypal":http://sahib.github.com/donate.html , you gonna need an account there - Sorry)
h2. DISCLAIMER
As usual, no warranty is granted that this software works like expected.
Refer to the LGPLv3 copy you got with libglyr. It is "here.":https://github.com/sahib/glyr/blob/master/COPYING
Glyr is just a way to find the data, it does not own any rights on the data it found.
**All retrieved items are copyrighted by their respective copyright owners.**
Refer to the provider's terms of use. Every item you get from libglyr contains the name and a url to the provider, so lookup there terms of use there.
h3.
[1] Glyr has not been tested on Mac OSX yet. If you own a Mac, any help with 'porting' glyr is highly appreciated. My guess would be that no to almost no changes need to be done though.
glyr-1.0.10/cmake_uninstall.cmake.in 0000664 0000000 0000000 00000002021 13011626140 0017313 0 ustar 00root root 0000000 0000000 cmake_policy(SET CMP0007 OLD)
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
glyr-1.0.10/doc/ 0000775 0000000 0000000 00000000000 13011626140 0013305 5 ustar 00root root 0000000 0000000 glyr-1.0.10/doc/README.textile 0000664 0000000 0000000 00000000217 13011626140 0015642 0 ustar 00root root 0000000 0000000 h3. THE DOCUMENTATION
h6. Is not here.
It can be found online at "www.sahib.github.com/glyr":http://sahib.github.com/glyr/doc/html/index.html
glyr-1.0.10/doc/build_doc.rb 0000664 0000000 0000000 00000006027 13011626140 0015563 0 ustar 00root root 0000000 0000000 #################################################################
# This file is part of glyr
# + a commanndline tool and library to download various sort of musicrelated metadata.
# + Copyright (C) [2011-2016] [Christopher Pahl]
# + Hosted at: https://github.com/sahib/glyr
#
# glyr is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# glyr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with glyr. If not, see .
#################################################################
#!/usr/bin/ruby
# A simple ruby script wrapping around gtk-doc;
# Normally gtk-doc requires autoconf, which I dont want to use.
# It's a pain in the ass.
MODULE="libglyr"
DIR =File.expand_path("../lib")
BUILD_HEADERS =
[
"#{DIR}/glyr.h",
"#{DIR}/types.h",
"#{DIR}/cache.h",
"#{DIR}/misc.h",
"#{DIR}/config.h",
"#{DIR}/testing.h",
]
DOC_DIR = "#{File.expand_path(Dir.getwd)}/doc"
BLD_DIR = "#{File.expand_path(Dir.getwd)}/build"
INC_DIR = "#{File.expand_path(Dir.getwd)}/include"
if Dir.exists? DOC_DIR
puts "-- Cleaning up.."
system("rm -rf DOC_DIR")
system("rm -rf BLD_DIR")
end
def copy_doc_files
begin
Dir.mkdir "build"
rescue;end
BUILD_HEADERS.each do |file|
unless system("cp #{file} build/") then
puts "Unable to copy #{file}!"
exit -1
end
end
end
def copy_includes
if Dir.exists? INC_DIR
Dir.open(INC_DIR).each do |filename|
inc_filename = File.expand_path("include/%s" % filename)
if File.file? inc_filename then
system("cp #{inc_filename} doc/html")
puts " - copy: #{inc_filename}"
end
end
end
end
def create_dir_and_cd dirname
begin
Dir.mkdir dirname
rescue;end
Dir.chdir dirname
end
def do_or_die is_cool
puts is_cool
exit unless system is_cool
end
############################
copy_doc_files()
puts "-- Processing file #{BLD_DIR}"
create_dir_and_cd "doc"
puts "-- Scanning directory"
do_or_die("gtkdoc-scan --module='#{MODULE}' --source-dir '../build'")
puts " - done"
puts "-- Setting up DB"
do_or_die("gtkdoc-mkdb --module=#{MODULE} --main-sgml-file=#{MODULE}.sgml --source-dir='../build' --xml-mode --output-format=xml")
puts " - done"
create_dir_and_cd "html"
puts "-- Generating HTML"
do_or_die("gtkdoc-mkhtml --path='../../build' libglyr ../#{MODULE}.sgml 2> /dev/null");
puts " - done"
puts "-- Fixing crosslinks"
Dir.chdir("..")
do_or_die("gtkdoc-fixxref --module=#{MODULE} --module-dir=html --html-dir=html")
puts " - done"
Dir.chdir("..")
puts "-- Copying include files."
copy_includes()
if Dir.exists? "../child/glyr/doc"
puts "-- Copying to repo"
system("cp -r doc/html ../child/glyr/doc")
end
glyr-1.0.10/doc/include/ 0000775 0000000 0000000 00000000000 13011626140 0014730 5 ustar 00root root 0000000 0000000 glyr-1.0.10/doc/include/index.html 0000664 0000000 0000000 00000004317 13011626140 0016732 0 ustar 00root root 0000000 0000000
libglyr Reference Manual