npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@achievement-watcher/celes

v1.1.0

Published

File and registry scraper that obtains and stores game achievements, whatever the origin

Downloads

38

Readme

NPM version NodeJS CI Actions Status Codecov Maintainability License contributions welcome

Celes

Celes is an Open Source file and registry scraper that obtains and stores game achievements, whatever the origin.

Table of Contents

About the project

Celes is a Typescript library that allows other tools to scrap files and registries to obtain user achievements from multiple sources. It includes multiples funcionalities like detecting games, loading schemas and generating a list of unlocked achievements, together with import and export features. It also has a built-in database, which allows it to store local caches than can also be used by other tools of the Achievement Watcher project.

To see the list of compatible sources and platforms, refer to COMPATIBILITY.

Built with

Getting Started

Prerequisites

You need NPM to install Celes. If you don't have it, you can download it at https://www.npmjs.com/.

Installation

Celes is available at NPM, so you can install it directly from there:

npm install --save @achievement-watcher/celes

Usage

API

Import

import {Celes} from '@achievement-watcher/celes'

The Celes Object

Celes is the main class exported and the one that has to be used principaly. If can be widely configured as presented below:

class Celes {
    constructor(
        achievementWatcherRootPath: string, 
        additionalFoldersToScan?: string[], 
        enabledPlugins?: string[], 
        steamPluginMode?: 0 | 1 | 2, 
        systemLanguage?: string, 
        useOldestUnlockTime?: boolean
    ) {}
}
Constructor parameters explanation
  • achievementWatcherRootPath: string: Root path of the data folder of the Achievement Watcher project. It should be created in the installation of Achievement Watcher and, usually, it defaults to %APPDATA%/Achievement Watcher. Inside of it, caches and schemas and user stats are stored.
  • additionalFoldersToScan?: string[]: List of folders defined by the user to scan. Used by some plugins to try to scrap achievement data from there.
  • enabledPlugins?: string[]: List of plugin names that have to be used. The plugin names are defined by the name of the files stored under (src/lib/plugins)[src/lib/plugins]. By deafault, all of them are enabled.
  • steamPluginMode?: 0 | 1 | 2: Work mode of the Steam plugin:
    • 0 -> Disabled.
    • 1 -> Enabled. Only Installed games are shown.
    • 2 -> Enabled. All games are shown.
  • systemLanguage?: string: User defined language. Defaults to english.
  • useOldestUnlockTime?: boolean: Method to be used when merging same achievements from different sources. By default, oldest unlock time is used, which means that, under collision, the unlock time stored is the most ancient one.

Celes API

This is the list of public methods available at Celes. An always-updated explanation can be found inside of the src/lib/Celes.ts file. In the case of the NPM package, the detailed explanation should be instead at dist/lib/Celes.d.ts.

Pull
async pull(callbackProgress?: (progress: number) => void): Promise<ScrapResult> {};
Load
async load(callbackProgress?: (progress: number) => void): Promise<GameData[]> {};
Export
async export(filePath: string): Promise<void> {};
Import
async import(filePath: string, force?: boolean): Promise<GameData[]> {};
Add Game
async addGame(appId: string, platform: Platform): Promise<void> {};
Remove manually added Game
async removeManuallAddedGame(appId: string, platform: Platform): Promise<void> {};
Unlock Achievement
async unlockAchievement(appId: string, platform: Platform, achievementId: string, unlockTime = 0): Promise<void> {};
Remove Manually Unlocked Achievement
async removeManuallyUnlockedAchievement(appId: string, platform: Platform, achievementId: string): Promise<void> {};
Set Achievement Unlock Time
async setAchievementUnlockTime(appId: string, source: Source, platform: Platform, achievementId: string, 
                               unlockTime: number): Promise<void> {};
Add Game Playtime
async addGamePlaytime(appId: string, platform: Platform, playtime: number, 
                      force?: boolean): Promise<void> {};

Contributing

Contributions are welcome. See CONTRIBUTING for more information.

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Legal Aspects

For legal aspects, see legal.