muety / wakapi

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
https://wakapi.dev
MIT License
2.57k stars 158 forks source link

Request: Map files to a project #543

Closed fusion44 closed 10 months ago

fusion44 commented 10 months ago

Can I map single files to a project? I can map (alias) projects to a project but haven't found an option to do that for files. I have several files that belong to an actual project, but count toward "unknown" project. I forgot to setup the .wakatime-project file for these projects when starting out.

Thank you!

muety commented 10 months ago

Hi @fusion44, unfortunately, this is neither currently supported, nor planned in the future. With a self-hosted instance, you could accomplish this with a quick database query. Or, if you're using Wakapi.dev, I can offer to perform this one-time replacements for you, if you send me an e-mail with the according information.

fusion44 commented 10 months ago

I'm using a self hosted instance. I'll look into it. Thank you!

muety commented 10 months ago

It will probably be something like:

update heartbeats set project = 'foo' where entity like ''%/foo%.js and user = 'your-user';

Followed by a Regenerate summaries process triggered on the Settings page.

gingerbeardman commented 6 months ago

@fusion44 did you have any success with this approach?

fusion44 commented 6 months ago

@gingerbeardman Sorry, I've never tried it. Ultimately the amount of time affected didn't matter in the grand scheme of things.