GithubHelp home page GithubHelp logo

mrkriskrisu / kstats Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 1.0 8.68 MB

Tool for Spotify Statistics and shopping behavior at REWE

Home Page: https://kstats.k118.de/

License: GNU Affero General Public License v3.0

PHP 60.82% JavaScript 0.28% SCSS 0.72% Blade 38.18%
rewe receipts spotify playlists

kstats's Introduction

KStats

Codacy Badge PHPUnit

Screenshot

Features

  • Track your listened songs from Spotify
    • See your Top tracks and artists
    • See how many minutes you have listened to music
    • Create playlists with "lost tracks" you like but haven't heard in a while
    • Create playlists with your most popular songs - updated daily
  • Analyze what you bought in the supermarket
    • Send your receipts automatically and user-friendly to an e-mail address
    • See your top Products
    • Get an overview of what you could buy
    • See how much money you have spent by category
    • Currently only compatible with digital receipts from REWE (in Germany)

Requirements

  • PHP 8.0
  • NodeJS / NPM
  • Composer (and the requirements mentioned in composer.json)

Contributing

To install KStats, just follow these steps:

  1. Clone the repository
  2. Run npm install and npm run dev to parse CSS and JS
  3. Run composer install to install all dependencies
  4. Copy .env.example to .env and adapt the values
  5. Run php artisan serve to start built-in developement Webserver (or use your own)

kstats's People

Contributors

codacy-badger avatar dependabot[bot] avatar herrlevin avatar mrkriskrisu avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

ducdung-oreo

kstats's Issues

Merge similar products to one

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Man sollte ähnliche Produkte als eines verknüpfen können. Bspw. Cola 1l und Cola 2l"

Entdecken mit der Tastatur

Es wäre cool, wenn man mit der Tastatur durch Lieder in der Entdecken-Funktion springen könnte. Bspw. + für like, - für dislike und ü für überspringen oder so.

Problem with adding new mail address for Rewe Ebon

It is not possible to assign a new email address.
When adding a new email address you will be redirected to https://k118.de/settings/add_mail and there you will get the error 500 | Server Error.

When going back to the settings, the new address is entered, but as "unverified". There will be no mail sent to confirm the mail.

I tried it with two different mails from two different providers. @gmx.de and @gmail.com

I also tried two different browsers.
Firefox 69.0.3 (32-bit)
Google Chrome 58.0.4183.102 (64-bit)

Verify mail addresses

Currently there is no option to verify the Mail addresses a User will save in the settings. It's needed for new Users to participate at the REWE eBon Analyzer.

Kstats Bot broken and can't connect

The Kstats Bot is sending me the same message over and over again every minute and I can't connect as the "/connect CODE" (or any input on my side) gets ignored.

image

Disconnect from Telegram

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Telegram entknüpf-funktion"

Compare time periods

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Gehörte Minuten (30 Tage, 7 Tage, 24 h) bitte mit dem jeweils gleichen vorhergegangenen Zeitraum vergleichen und die Prozentuale Veränderung anzeigen."

Can't disable "Discover in Telegram"

When I try to reset the time for "Discover in Telegram", it responds with "The time field is required.", even though a "reset"-button is included in the field. (Though I don't know if that's because of my browser)

Improvement suggestion for the ReweBon Crowdsourcing

I used the Crowdsoursing function in the Rewe Bon function and I think it is very good.
Especially the vergetarian tasks on the right side are great.

However, I have a suggestion for improvement for the product categories.
I think it is great that there are so many different and detailed categories. But unfortunately it makes it very difficult to find the right category in the current list. I find it very frustrating if you don't know the right top category to find the right item.

I have a small suggestion for improvement.
Split the two current terms connected with an arrow into two different fields. A top category which you define first and then a subcategory which will be filtered and displayed according to the top category.
This also makes later evaluation in the statistics easier.

Alternatively, a full text search for the right categories would make the input much easier.

Only a small suggestion from my side. I hope I could help you.
I find your project very nice.

Best regards
Lukas

Netflix Stats pls

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Netflix Stats pls"

Telegram Connect Problems with linking

I have tried to link my account with Telegram Connect.
Therefore I have added the account kstats via the link and then sent /start and /connect [code].

After nothing happened, I generated a new code and tried again. Unfortunately without success.

Error on Telegram Android 7.0.1

Screenshot_20200916-142126~2

Spotify "Listened minutes" times wrong

I usually listen 10-12 hours music a day for the past months and recently KStats shows wrong statistics.
I noticed it because last 7/30 days shows completely wrong numbers, for the 7 day stats it should show somthing around 4000-6000 minutes.

image

Treat audio books differently

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

""Hörbücher melden"-Feature

Man sollte Interpreten als Hörbuch-Interpreten vorschlagen dürfen... so dass alle titel von denen aus unseren top listen usw. weg kommen und auch aus den verschollenen top tracks z. B."

Play song in spotify

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Die Buttons mit denen man ein Lied direkt anhören kann... es wäre super cool, wenn die das Lied in die Warteschlange tun würden und ne viertel Sekunde später wird ein Lied-Skip ausgeführt.

Dadurch würde man durch klicken auf diese Buttons nicht aus der aktuell laufenden Playlist gerissen."

Note: The Playbutton is an old Feature which is not yet implemented in the Recoded version of KStats. Maybe the Feature can be re-implemented with this suggestion.

Connect new Telegram Chat

There is currently no possibility for users to connect their account to a (new) Telegram Chat. Users from "the old" can get messages to authorized ChatIDs.

Handle Spotify Rate Limit

As more and more Users register at KStats the algorithmus to check every user every minute is a little bit too much for the Spotify API. There should be a way to minimize these requests.

[2020-08-19 13:23:07] staging.DEBUG: [Spotify] [CatchNowPlaying] Checking User xxx / xxx
[2020-08-19 13:23:07] staging.ERROR: Error while trying to retrieve currently-playing from Spotify API. StatusCode: 429  
[2020-08-19 13:23:07] staging.ERROR: {
  "error": {
    "status": 429,
    "message": "API rate limit exceeded"
  }
}  

Migrate Devicedata

Migrate Data from Table spotify_device_activities to spotify_play_activities

Parallel preview playing

On the Spotify page, the user can play each preview in parallel. There should be javascript that stops playback when the user starts other songs.

Login via Spotify

There a currently User without a password. They need a Spotify Login Button to login to KStats. They should set a password on first login.

Simplify Database Layout of SpotifyPlayActivity

Add heartime column and merge duplicate rows.

Old:
user_id | timestamp_start | track_id

New:
user_id | timestamp_start | track_id | playtime

user_id | timestamp_start | track_id should be unique

Unfollow People

Create a button so the User can unfollow people (or remove from their followers (block - unblock?) in the followerstable

Improve chart colors

The colors in the Charts are currently... not beautiful. Maybe someone can do some color-magic? ✨

c94e49ed6d44fe436ecbb495eb3f11d4

Change Chart Framework

All Charts are currently generated by "Google Charts" where telemetric data is sent to Google. To prevent this we should use another Chart Library.

Fridge management

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Man sollte die Möglichkeit einer Kühlschrankverwaltung haben. Also Barcode des Produkts scannen, oder direkt vom eBon übernehmen, um unterwegs zu wissen, was man zuhause hat."

Show lactose free products

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Bei Milchprodukten sollte man auswählen können, ob es laktosefrei ist, oder nicht. Könnte man auch als Extra-Kategorie machen."

Monthly expenditure + budget function

This is an enhancement which was sent over the old "Feedback" Function of KStats by an User:

"Monatliche Ausgaben im Verlauf + Budget Funktion

Erklärung:
Bei den Monatlichen Ausgaben könnte sowas stehen wie: "Du hast in den letzten 3 Monaten durchschnittlich 150 ? bei REWE ausgegeben. Möchtest du deine Ausgaben um 10% senken und dir ein Monatliches Budget von 135 ? festlegen? [Budget planen]

Dann wechselt man auf die Budget-Unterseite wo man das Budget von beispielsweise 135 ? bestätigen kann und wo die Funktion näher erklärt wird.
Funktionsweise: jeweils am 01.01. des Monats wird das Budgetkonto zurückgesetzt und es wird dokumentiert ob man das Budget eingehalten oder überschritten hat. Ab da wird jeden Tag 1/30stel des Monatsbudgets auf ein Budgetkonto Gutgeschrieben, welches man im Bot per /budget oder auf der Website einsehen kann.
Beispiel: Man geht nach 5 Tagen einkaufen.
135/30 = 4,50 ? pro Tag verfügbar
Nach 5 Tagen ist das Budget wenn man den Bot fragt 22,50 ?
Wenn man nun für 19 ? einkauft ist alles okay und das Budget Konto steht auf 3,50 ?
Wenn man für 25 ? eingekauft hätte käme eine Warnmeldung im Telegram-Bot, dass man das Budget um 2,50 ? überschritten hat."

Lautstärke in Entdecken

Es wäre cool, wenn man die Lautstärke einmal festlegt und sie dann durchgehend gleich ist in einer Session.

Mood-o-meter

Please add the opportunity to see your "current mood" based on the songs (maybe sort by daytime?)

Top Artist list bugged

The lists for Top Artists (Last 7 days, last 30 days and all time) seems get some kind of wrong data, since only shows one artist I never listend but people I follow/who are in my spotify plan.
2021-08-23 22_41_56-Window

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.