Comments (3)
Great! Unity has SystemInfo.operatingSystem. Should its output be formatted before sent to WakaTime? For example, "Windows 7 (6.1.7601) 64bit"
...
from unity-wakatime.
- I need a list of operating systems that are in use in Wakatime. Rider and VsCode use
Windows
, we cant break this by adding details. Or maybe we should? - I found only 2 ways to monitor OSs - in Timeless android app and embedded section, both are not quite convenient for testing
from unity-wakatime.
The User Agent API Endpoint is a good way to see how the user agent string sent from plugins (aka value
) is translated into an operating system (aka os
). The three operating systems supported on WakaTime dashboards are Mac
, Windows
, and Linux
. Here's the Python code used on the server to translate user agent value string into an os:
class UserAgent(Model):
id = db.Column(UUID(), primary_key=True, default=uuid.uuid4)
user_id = db.Column(UUID(), db.ForeignKey('user.id'), nullable=False)
value = db.Column(db.String(600), nullable=False)
last_seen = db.Column(db.DateTime())
created_at = db.Column(db.DateTime(), nullable=False, default=datetime.utcnow)
__table_args__ = (
db.UniqueConstraint('user_id', 'value'),
)
@property
def os(self):
os = None
try:
ua = self.value.lower()
if 'darwin' in ua or 'macintosh' in ua:
os = 'Mac'
elif 'windows' in ua:
os = 'Windows'
elif 'linux' in ua or 'bsd' in ua or 'unix' in ua:
os = 'Linux'
except:
pass
return os
from unity-wakatime.
Related Issues (20)
- Periodical heartbeats HOT 1
- Handle HTTP status codes HOT 3
- <WakaTime> Got response Error HOT 1
- ArgumentException: JSON parse error: Invalid value. HOT 1
- Save API key to Editor Prefs
- [Question] Disable debug log HOT 1
- Heartbeats Spamming HOT 2
- Are you still there?? HOT 1
- Move to GitHub actions
- Native Collection has not been disposed, resulting in a memory leak. HOT 23
- Images
- Disable logs HOT 6
- Simplified installation instructions
- Suggestion: hide debug logs for releases HOT 1
- Track current git branch
- [Suggestion] Work as a Unity Package (using the Unity Package Manager) HOT 2
- Add notes about existing solutions in README
- Broken on Linux. Network is unreachable. HOT 4
- Failed to fetch versions information HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-wakatime.