GithubHelp home page GithubHelp logo

thejaviertc / steam-workshop-stats Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 30.17 MB

Analyze your Steam Workshop Addon Stats in one place!

Home Page: https://thejaviertc.github.io/steam-workshop-stats/

License: GNU Affero General Public License v3.0

HTML 4.04% SCSS 2.44% TypeScript 22.64% JavaScript 4.15% Svelte 66.74%
steam steam-api steam-games steam-workshop steam-workshop-scraper

steam-workshop-stats's Introduction

steam-workshop-stats's People

Contributors

dependabot[bot] avatar rslgp avatar thejaviertc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rikoprushka

steam-workshop-stats's Issues

QoL 2 - sort

i manage to sort the cards, by subscribers, with js
will be nice to be able to sort things

let enum_type = {
views: 1,
subscribers: 2,
favorites: 3,
}
const gridElement = document.querySelector("body > div > section > div > div.grid.grid-cols-1");
const sortTextSelector = `.card .my-2 .flex.justify-center:nth-child(1) h5:nth-child(${enum_type.subscribers})`;


function reorderCards(gridElement, sortTextSelector) {
  // 1. Get all cards as an array
  const cards = Array.from(gridElement.children);

  // 2. Extract sort text for each card
  const cardsWithText = cards.map(card => {
    let sortTextElement = card.querySelector(sortTextSelector);
      sortTextElement = sortTextElement.textContent.trim().replaceAll(",","")
    return {
      card: card,
      text: sortTextElement ? sortTextElement : "",
    };
  });

  // 3. Sort the cards based on the extracted text (assuming numeric sort)
  cardsWithText.sort((a, b) => {
    const numberA = parseFloat(a.text);
    const numberB = parseFloat(b.text);
    return numberB - numberA;
  });

  // 4. Update the grid element with the reordered cards
  gridElement.innerHTML = "";
  cardsWithText.forEach(cardObj => gridElement.appendChild(cardObj.card));
}

reorderCards(gridElement, sortTextSelector);


Add graphs

Graphs (one each row) displaying the information (before the addon list)

Thoughts on the Graphs display

Thanks for this project!

Since the current graphs aren't related to time, a line chart feels like a poor representation of the data. Perhaps a bar chart would represent it better?

The ability to rearrange the addons would be useful as well :)

QoL feature about Steam Profile URL input

is that possible to add a feature that ignores the path after user id/profile?
only if url occurences "/" >= 5 (to prevent incompatibilities with future steam changes
checks if url have id or profile, and extract the next string path from url

https://steamcommunity.com/id/USER/myworkshopfiles/?appid=###
https://steamcommunity.com/profile/USER/myworkshopfiles/?appid=###

is it possible to ignores the extra data content, just extract the https://steamcommunity.com/%s/%s

it will be a nice feature to simply copy and paste the steam workshop url, and my browser (client side) trims that to the correct one

i try to send a PR with that change, but i dont have familiarity with svelte

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.