Giter Club home page Giter Club logo

fip's Introduction

FIP music

Documentation Status Updates Coverage status Pypi version

Read the current and next track played on FIP radio

WARNING: at this early stage of the development, don't even think about any backward compatibility.

Usage

# Get the information on the current song played
$ fip --current-song

# Get the information on the next song being played
$ fip --next-song

# Get the information of the previous song played
$ fip --previous-song

# Get the help
$ fip --help

For more information, you can refer to the documentation of the project.

fip's People

Contributors

pyup-bot avatar mattberjon avatar

Stargazers

Daniel Neira avatar  avatar Seppe Stas avatar

Watchers

 avatar

fip's Issues

Instance has no attribute 'request_data'

When I use call the command fip -n I have the following error and traceback:

Traceback (most recent call last):
  File "/home/mattberjon/repo/venv/fip/bin/fip", line 11, in <module>
    load_entry_point('fip', 'console_scripts', 'fip')()
  File "/home/mattberjon/repo/venv/fip/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/mattberjon/repo/venv/fip/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/mattberjon/repo/venv/fip/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mattberjon/repo/venv/fip/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mattberjon/repo/fip/fip/cli.py", line 76, in main
    data.request_data(offset=1)
AttributeError: Fip instance has no attribute 'request_data'

Issue when special themes are broadcast

When there are broadcasting special shows (such as "La nuit sur Fip") almost information are missing and creates a bug.

Information extraction should be tested before performing any operation on them.

Wrong installation process

In the documentation, the installation process is wrong. It's said to install the package through:

$ pip install fip_music

But it should be

$ pip install fip

Same goes with the repo cloning.

Relevance of a 'save' command

I'm not sure anymore if having a save command would be relevant. At the moment, I would probably save localy everything in a plain text file using a pipe such as

fip -c >> music.txt

It create several issues. If data are written using several lines, then detecting duplicates will be a hard task. Moreover, the formatting that I suggest is hard-coded and probably doesn't suit everyone on the planet.

Apart from these obvious issues, having the possibility to upload this information on a remote server is interesting but not necessarily part of this project. It raises many questions:

  • should I write a small server dedicated to this program
  • should I write some plugins for different types of system (wordpress, ghost, dotclear, ...)

formatting command

As I mentionned in #18, there is the issue of displaying the information. At the moment, the user doesn't any choice on the formatting when using the unix command (he can do whatever he wants when using the API). Maybe it would be good to have some sort of fip --humanize command that will parse the JSON data in a format given in a config file.

This command couldn't be used alone but with something like fip -cH. Without the humanize argument, the program returns the bare JSON data.

fip api change

Sometime this week the fip api completely changed. The URLs are in a new format, example:

https://www.fip.fr/latest/api/graphql?operationName=Now&variables={%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A7%2C%22previousTrackLimit%22%3A3}&extensions={%22persistedQuery%22%3A{%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22}}

Since then I've been unable to pull track data from fip using this script. Even though the output looks the same simply changing to the new URL hasn't been enough to get it to work again.

Return an issue when a special program is played

The program returns an issue when a special program is played.

Title: Spéciales FIP
Traceback (most recent call last):
  File "/home/mattberjon/repo/fip/venv/bin/fip", line 9, in <module>
    load_entry_point('fip', 'console_scripts', 'fip')()
  File "/home/mattberjon/repo/fip/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/mattberjon/repo/fip/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/mattberjon/repo/fip/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mattberjon/repo/fip/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mattberjon/repo/fip/fip/cli.py", line 63, in main
    display(data.data)
  File "/home/mattberjon/repo/fip/fip/cli.py", line 22, in display
    if data['authors']:
KeyError: 'authors'

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.