Skip to main content

Time tracking for any IDE with WakaTime-like servers

Project description

wakapi-anyide

Log your coding time against any WakaTime-like server.

[!NOTE] Teenager? Check out High Seas!

I need help!

If you're in the Hack Club Slack, please ask me (Sarah / sharajarajsarahs) for help with using wakapi-anyide with High Seas. Otherwise, open a GitHub issue.

[!IMPORTANT] wakapi-anyide is still in development. Please report any tracking bugs!

Alternatives

You should try use an editor extension over wakapi-anyide if you can. If you don't need precise coding metrics, use the WakaTime app instead. The WakaTime app does not work with High Seas.

Quickstart guide for most IDEs

These instructions are best run in an existing project.

  • Create a .wakatime.cfg file if you don't already have one. If you're doing High Seas, this is explained in the Signpost (click "View instructions for all platforms" and scroll down).

  • Set your IDE to autosave as quickly as possible. This is how wakapi-anyide is able to track your coding time. Ideally, something like a second, so it saves as you type. However, anything under your editor timeout preference in your WakaTime settings is fine. For High Seas, your IDE must save at least every two minutes.

  • Install wakapi-anyide with your favourite Python package manager (try pipx install wakapi-anyide[color] to install with colour support!)

  • Run wakapi-anyide setup and follow the instructions.
    The included paths are the paths that wakapi-anyide will watch for changes.
    The excluded paths are the paths that wakapi-anyide will ignore. You should put things like generated/compiled code or packages there (ie *.o, /node_modules). By default, if you have a .gitignore then it will ignore every file listed in it.

  • Inspect and edit the generated wak.toml:

    # https://github.com/iamawatermelo/wakapi-anyide v0.6.8
    
    [meta]
    version = 1
    watchers = ['files']
    
    [files]
    include = ["*"]  # files to include in tracking
    exclude = []  # files to exclude in tracking
    exclude_files = [".gitignore"]  # files whose contents will be used to exclude other files from tracking
    exclude_binary_files = true  # whether to ignore binary files
    # language_mapping = {".kicad_sch" = "Kicad Schematic"}  # custom language mapping
    
    [project]
    name = "test2"  # your project name
    
  • Run wakapi-anyide test in the same directory you have wak.toml in. Ensure that wakapi-anyide is not tracking any generated files by reading through the paths it has cached. If there are no generated files in the cached paths, you're good to go.

  • Run wakapi-anyide track to actually track your progress. You must run this every time.

Troubleshooting

Before doing anything else, ensure you're on the latest version of wakapi-anyide. You can find out your current version by running wakapi-anyide version. For pipx, run `pipx install --force 'wakapi-anyide[color]'

macOS

The program may fail to watch all files because of macOS' low open file limits. Try:

ulimit -n 12288
wakapi-anyide track

What wakapi-anyide sends

wakapi-anyide tells the WakaTime server:

  • your OS and that you are using wakapi-anyide (wakatime/unset (Linux-none-none) wakapi-anyide-wakatime/unset)
  • an anonymised hostname based off of your computer's name (anonymised machine 749f8c4e)
  • the relative path of the files you change (./wakatime_anyide/__init__.py)
  • the estimated time you have spent
  • your estimated cursor position over time
  • the estimated language of any files you edit (py, Makefile)
  • the amount of lines changed
  • the branch you are editing if you use Git
  • any information you specified in the project section of wak.toml

Additionally, the WakaTime server will be able to see:

  • your IP address, which means your approximate location
  • the time of day your requests are being sent

Every website you visit can see this information.

wakapi-anyide does not send:

  • any information about your system not listed above, like your username
  • file content
  • filenames outside of those included in your wak.toml

For security, wakapi-anyide does not use wakatime-cli.

Support for existing WakaTime configuration

wakapi-anyide supports the WAKATIME_HOME and the WAKATIME_API_KEY environment variables. The configuration value takes precedence over the environment variable.

$WAKATIME_HOME/.wakatime.cfg

Only these configuration values are supported:

[settings]

option description type default value
api_key Your WakaTime API key. string
api_key_vault_cmd A command to get your api key. Shell syntax is not supported, use sh -c "<your command>" for that. string
api_url The WakaTime API base url. string https://api.wakatime.com/api/v1
hostname Optional name of local machine. string (an anonymised hostname)
heartbeat_rate_limit_seconds How often to send heartbeats, in seconds. int 120

All other configuration values are silently ignored.

.wakatime-project

Not supported.

Quirks and limitations

Tracking

wakapi-anyide is not integrated with your editor. It can only guess what you are doing through file changes. As such, it may sometimes pick up generated files.

By default, any directory beginning with . will be untracked. You cannot change this.

Binary files

wakapi-anyide can track binary files with files.exclude_binary_files = false. File changes are reported specially:

  • they are appended with #wakapi-anyide-binary in tracking
  • cursor position is set to the last change in the binary file
  • the line count are set to the binary diff count

Large files

For performance reasons, files which are larger than 64 KiB will only report changes in filesize.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wakapi_anyide-0.6.8.tar.gz (20.9 kB view details)

Uploaded Source

Built Distributions

wakapi_anyide-0.6.8-cp312-abi3-win_amd64.whl (281.8 kB view details)

Uploaded CPython 3.12+Windows x86-64

wakapi_anyide-0.6.8-cp312-abi3-win32.whl (267.7 kB view details)

Uploaded CPython 3.12+Windows x86

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (438.3 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (490.9 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ s390x

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (486.3 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ppc64le

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (463.5 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ i686

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (439.6 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARMv7l

wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (436.2 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

wakapi_anyide-0.6.8-cp312-abi3-macosx_11_0_arm64.whl (375.9 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

wakapi_anyide-0.6.8-cp312-abi3-macosx_10_12_x86_64.whl (388.2 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file wakapi_anyide-0.6.8.tar.gz.

File metadata

  • Download URL: wakapi_anyide-0.6.8.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.6

File hashes

Hashes for wakapi_anyide-0.6.8.tar.gz
Algorithm Hash digest
SHA256 e8285da4d13c1474a9565343b28468d930c51e805e4083b761f4f5fccd9dbf23
MD5 76e29f514ece886a3950feefd99dd4c0
BLAKE2b-256 4a3daeae3af20b9de3b29ca70181af0d42b6f26f1b165c1878a2e0a076de1cee

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a7f81c1fc9e92a3f477381526364bd57d5cd82e9af29805ca493c07be7b607bc
MD5 18ada9f7ffbc699ab0cfbdd6997a354a
BLAKE2b-256 81a3b935531cfc353ad27d7428f181f23b95b48e7b793587da526e0b7d8de2a8

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-win32.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-win32.whl
Algorithm Hash digest
SHA256 1962d6d2c9b9b413547b1942ef06fcd87db265b341eb9d555c50e5d6c6ac96d2
MD5 d7f2bacf4db87dcaef7b94aad6b1f2b2
BLAKE2b-256 82416205c4c8ff504fa81c4d333a35d9f4a47a879d1542ba7d6d92cce065a665

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eae5ff1e5ea37ac8f179c072f5dd76dd0a7721db10fa758441fe5323a1d007d3
MD5 a5b2742f77eebf9a21364103cfc1d34c
BLAKE2b-256 e3a7ef57e077cafd7df274fdececc6fd983274134136f365c97d10386f144836

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 051cd652a47fcb3e710332c112b96e51c9e7ea4d49f572b6cda194cc538d4fe5
MD5 c87e2b98d19174aeaf1743c7215178d7
BLAKE2b-256 2181cf4c01c1d24f06fd72702148ebd5d45a8ba4e9f365d25ea7aff65487a229

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 360e491a03db599408093a63658bbaf008f9f58b12dc7044ba55ffba4a8d2976
MD5 b08b5039f383024d979f1f864a149127
BLAKE2b-256 c0cda9a8baa88a3783fbaa8362b372e45fd217f176e41ed4e8c3a97599a6f77a

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6a9a69ea97c2f887ca0c4799d3e5b9080e5e2139489e8b2757043df960f59607
MD5 45df8927e10d23c9db063964a1fec723
BLAKE2b-256 f73e125de2425517481075d0eaa24a1909fd0e45d045cf64052c2123ebb26a33

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 c19aa690e4dd75f4167f9c9665b52bbc22ad88f97f4f18f4f9b4423b3e024f89
MD5 bdfef31b1715e4568c450fa7091d7984
BLAKE2b-256 cd93bc36c1982b647de2acc9338ce2bd873a31bfce4b72fa11a3cb7c2ec78334

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cd2e9f17181a5b617d51fd7b84102009d06d84221be7ae7ba3f4d5ae9168603e
MD5 f6a76d92b3692230f7ecab7cf780666e
BLAKE2b-256 c093471dff4b97a08b0964c5477e4aa4334bfc19128a74df30874fbe904fbc4f

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71490b3aa371523b88de015f8569d5a33cb06b4a20f7ab837691121155084cfa
MD5 d72e2661850a8885f2a4595a88a8753b
BLAKE2b-256 b395c3fe5d9aecac8d0a756d980d1e956219fbe068fd71d3292c26f4433ad2fe

See more details on using hashes here.

File details

Details for the file wakapi_anyide-0.6.8-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wakapi_anyide-0.6.8-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0d20ee8be2b24737fac57fc08ad73a274eb693b56c5811e8aa5bcc3b68cf4f94
MD5 850692741462420cccbfc7b4aaaa20a8
BLAKE2b-256 75ee752f00379bfe63661d7b11c1d6cd920c227c25da65af11b336d5bd8da674

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page