Giter VIP home page Giter VIP logo

rose's People

Contributors

agarwalrounak avatar harsh5557 avatar kaustubhhiware avatar kunalnpandey avatar s-ankur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rose's Issues

(Webapp) : Minimum rating specified, interactive plots

Once the webapp is completed, and a plot is visualised for any show, we should have a bar / input field that takes an imdb rating for instance, and highlights the episodes with rating higher than the specified value.

Could proceed with displaying the plot first, and then highlighting the bars where value >= specified. Visualization to be discussed before sending PR.

Pointed out by Shalini Mukhopadhyay

Star cast of a show

Well one can also ask about the star cast of a show so why not modify the code a little bit to get the details.

Implementing a webapp

Currently, we only have a script that runs on your system. It would be great if the implementation could be shifted to a webapp, based on flask or any light weight framework.

This is of highest priority.

Get information of currently playing episode

Related to #3.

Say, you're watching an episode on VLC or some video player. The work here, would be a new script, call it rose_listen.py.

Fetches information of currently playing episode

This is possible via playerctl in linux. Let's focus on VLC for the time-being, due to its simplicity.
Here's a sample output

> playerctl metadata # when video is playing
{'mpris:trackid': <objectpath '/org/videolan/vlc/playlist/4'>, 'xesam:url': <'file:///run/media/kaustubh/Windows/Music/FILE_NAME.mp4'>, 'vlc:time': <uint32 202>, 'mpris:length': <int64 202896000>, 'vlc:length': <int64 202896>, 'vlc:publisher': <5>}

> playerctl metadata xesam:url
file:///run/media/kaustubh/Windows/Music/FILE_NAME.mp4

Getting episode information

Assume the file name has Show title, and "S05E12" somewhere present. Assume simplest case for initial development.

What information should be fetched?

  • Cast
  • IMDB rating
  • Quotes ? Information is available on IMDB page. See this.

Quotes fetching not a priority.

Fetch episode specific data

It should be possible to fetch information for only one episode. That is, add functionality for another parameter, call it -e or --episode which allows to fetch information for that particular episode only.

Usage: python scrape_views.py -s 'Two and a half men' -e 'S03E02'

If the contributor wants, they could also handle this case (not a priority) :

python scrape_views.py -e -s 'Two and a half men S03E02'

The expected output is IMDB rating, US views if available and a link to the episode.

Pointed out by Shalini Mukhopadhyay

Fixing wiki's US viewers

As pointed out by @Harsh5557, as of Dec 12 2018, the wiki flag is broken. This is probably due to a change in formatting on wikipedia's side, and needs to be fixed urgently.

This is a high priority issue. This is relatively easy, the variables need to be printed out and seems to be a 2-3 hour task once an understanding of the code and wikipedia's relevant page is obtained.

Recreation:

$ python scrape_views.py -w -a -s "Two and a half men"
Detected wiki link: https://en.wikipedia.org/wiki/List_of_Two_and_a_Half_Men_episodes
Number of seasons 12
Season  1
		Episode 1
Traceback (most recent call last):
  File "/home/kaustubh/GitHub/rose/scrape_views.py", line 302, in <module>
    views, average = wikiscrape(wikiurl)
  File "/home/kaustubh/GitHub/rose/scrape_views.py", line 87, in wikiscrape
    numviews = float(filter(None, re.findall(floating_point, views))[0])
TypeError: 'filter' object is not subscriptable

Subtitles of current episode

Work to start after #7.

Operates in the umbrella of rose_listen.py --subs

This would provide user with two functionalities:
i) Downloading the subtitles of currently playing episode, and saves it in current location.
python rose_listen.py --subs --dl

ii) Displays in a terminal, appending as the time goes on, like a running commentory.
python rose_listen.py --subs
Say the script is started when 5 minutes of the episode has elapsed. The displayed subtitles should be synced in accordance with the video. This means time and speed both (If the video is being played at 1.5x, the subtitles should also be displayed at 1.5x).

iii) Language. Since we would already be fetching the subtitles, why not fetch it in the language the user wants? This would be a great tool for people wanting to learn other languages.
python rose_listen.py --subs --lang en
en would correspond to default English, if --lang is not provided, it's something the script should handle on its own. Language codes can be found here.

both bar plot and average are not handled in 1 command

Can we add functionality such that both we can run something like
python3 scrape_views.py -i -a -b suits
as a first time user that was my first command and I think many people would prefer to have both functionalities in the same command, right now after executing this command, the program gave the result of -b and became irresponsive afterward.

Webapp : Minor UI improvements

  • A smooth switcher to modify between imdb or wiki.
  • (Not going with this) Checkboxes for averages and barchart in the same line, along with the above switcher and submit button.
  • Tabulated display of ratings / views when displaying results
  • Interactive plots (separate issue: #5)
  • A spinning loader when user hits submit button until scrapping results are obtained.

Handle complex file names in rose_listen

Pointed out in #18

Currently, rose_listen.py assumes the file names for currently playing episode to be simple.

Need to extend to cover atleast the following cases:

  • Doctor.Who.S05e12.extraneoustext.mkv
  • Attack On Titan - S03E01 - Smoke Signal (720p) (x265) (E-Subs) [Baba_Bhayanak].mkv
  • Bojack Horseman - S01E01 [WEBRip 720p] [Daiki_Aomine].mkv
  • Brooklyn.Nine-Nine.S01E01.1080p.WEB-DL.DD5.1.H.264-NTb.mkv

Add A CONTRIBUTING.MD

To avoid problems like #15 with new contributors, I think we should add a contributors md or add something to the readme or maybe add a pull request template

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.