Code Monkey home page Code Monkey logo

boardlib's Introduction

BoardLib ๐Ÿง—โ€โ™€๏ธ

Utilities for interacting with (undocumented) climbing board APIs.

Installation ๐Ÿฆบ

python3 -m pip install boardlib

Usage โŒจ๏ธ

Databases ๐Ÿ’พ

To download the climb database for a given board:

boardlib database <board_name> <database_path>

This command will first download a sqlite database file to the given path. After downloading, the database will then use the undocumented sync API to synchronize it with the latest available data. The database contains only the publicly available data. User data is not synchronized. If a database already exists as database_path, the command will skip the download step and only perform the synchronization.

NOTE: The Moonboard is not currently supported for the database command. Contributions are welcome.

Supported Boards ๐Ÿ›น

All Aurora Climbing based boards (Kilter, Tension, etc.).

Logbooks ๐Ÿ“š

To download your logbook entries for a given board:

boardlib logbook <board_name> --username=<username> --output=<output_file_name>.csv --grade-type="hueco"

This outputs a CSV file with the following fields:

["board", "angle", "name", "date", "grade", "tries", "is_mirror"]

For example, the command

boardlib moon2017 --username="Luke EF" --output="moon2017.csv" --grade-type="hueco"

would output a file named moon2017.csv with the following contents:

board,angle,name,date,grade,tries, is_mirror
moon2017,40,C3PO,2021-07-13,V5,1, False
moon2017,40,LITTLE BLACK SUBMARINE,2021-07-13,V5,2, False
moon2017,40,MOUNTAIN GOAT HARD,2021-07-13,V5,1, False
...

See boardlib --help for a full list of supported board names and feature flags.

Supported Boards ๐Ÿ›น

Currently all Aurora Climbing based boards (Kilter, Tension, etc.) and all variations of the Moonboard should be supported.

Bugs ๐Ÿž and Feature Requests ๐Ÿ—’๏ธ

Please create an issue in the issue tracker to report bugs or request additional features. Contributions are welcome and appreciated.

boardlib's People

Contributors

akirosingh avatar example123 avatar lekanteto avatar lemeryfertitta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

boardlib's Issues

Aurora logbook API 404

Getting 404s for the logbook endpoint for Aurora. Seems like they may have changed the API and this endpoint is no longer available.

Include layout information in Aurora logbook entries

There is currently no way to distinguish which layout an ascent was from for Aurora-based boards, but given that these layouts can different significantly, this information should be included.

This seems to require access to the SQLite database, so this may require adding some logic to the console script to download and sync the db.

Incorrect logbook "tries" for Aurora boards with attempts > 10

attempt_id actually maps to the attempts table, and although id 1-10 maps directly to number of attempts, the meaning changes for 11 and above.

The sync command could be augmented to return the attempts table and then the logbook_entries function can be updated to map the attempt_id to the real attempt meaning.

Split from #21 (comment)

BoardLib fails with ssl exception on my Windows pc

When I run BoardLib on my Windows machine I get the following error:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

Possible solutions are explained here:
https://stackoverflow.com/questions/51925384/unable-to-get-local-issuer-certificate-when-using-requests

For me this helped:
pip install python-certifi-win32

Suggestion:
Provide some information about this in the project's readme or have a FAQ page or something like that.

I am getting an error when trying to download a database

image
I am new to this and had just downloaded python, pip and sqlite. I have tried troubleshooting steps like checking for permissions, using different directories and ensuring I have the 3 software mentioned. I also noticed that no file was downloaded to the given directory (if that is of any help). Any help will be appreciated.

Handle mirrored logbook ascents

There is an is_mirror field for aurora-based ascents. Moonboards could just always export is_mirror=false to keep the fields consistent between the boards.

Pandas Dataframe

Really great project, appreciate that!

I used the boardlib logbook command to see my boulders and I have two questions:

It always says tries being "1". Is that a bug? I'd love to see how many tries I have on boulders I couldn't finish so far (since the Kilter App isn't providing this feature) and also how many tries I needed to finish the builder problem.

Is it possible to get the data back as a pandas Dataframe or so? So I could go on visualizing the data? Or do you have anything planned for that?

Thanks!

Support writing ticks and climbs to Aurora

PUT /v1/ascents/

Data fields:

["uuid", "climb_uuid", "angle", "is_mirror", "user_id", "attempt_id", "bid_count", "quality", "difficulty", "is_benchmark", "comment", "climbed_at"]

PUT /v2/climbs/

"uuid", "layout_id", "setter_id", "name", "description", "is_draft", "frames_count", "frames_pace", "frames"

Need to determine how UUIDs for both ascents and climbs are generated.

Improvement: delete session on Aurora server

The official Kilter app uses the same session token for a long time. I've been playing around with it for over a week and it has never requested a new session.
BoardLib creates a new session everytime it runs.

Should we end the session after we got all wanted information from the server so it doesn't have to store so many useless sessions?

The API call looks like this:

DELETE https://kilterboardapp.com/sessions/my_session_token
Authorization: Bearer my_session_token

API for Aurora climbs

We'd like to be able to download climb data on Aurora-based boards for the purpose of a "search by hold" feature. It looks like v1/sync API should work to accomplish this.

Support Fetching Logbooks for All Angles of Moonboards

Background:

Currently, the functionality for fetching logbook entries from Moonboards is limited to a single angle (default 40 degree) configuration. This enhancement aims to modify the functionality to match that of Aurora boards, where logbooks for all angle configurations are returned in a single request.

Goal:

The goal is to adapt the logbook_pages function (and any other relevant parts of the code) to fetch and return logbook entries for all available angles (e.g., 25 degrees and 40 degrees) of Moonboard setups (e.g., Moonboard 2019).
Fetch and aggregate logbook entries for all available angles per Moonboard.
Ensure the output is consistent and well-structured to accommodate entries from different angles.

What hardware do I need to run this program

What hardware would I need to purchase and setup in order for climbdex to light my 8x12OG Kilterboard?

I have no experience with computers other than basic user skills. And no experience with addressable LEDs. I found a link to climbdex on reddit.

From watching youtube videos I have gathered I could possibly purchase an esp32 board kit, flash WLED to the board from WLED website, and hookup ws2811 (312lights x 2) string lights with 10-12 inch spacing, and 5v power booster. All readily available online. Am I way off watching these videos?

I would be happy to make a contribution if I can get climbdex working with my kilter board!

grade conversion: strange mapping

The maping looks strange for higher grades:

"7C": "V9",
"7C+": "V10",
"8A": "V9",
"8A+": "V10",
"8B": "V11",
"8B+": "V12",
"8C": "V13",
"8C+": "V14",
"9A": "V15",

APIs for board locations

Provide a straightforward API for gathering locations of all aurora and moon boards. The API should provide a name, public vs. private access, and lat/long.

Add Support for Environment Variables for App Passwords

Background:
Currently, the application relies on getpass for password input, which does not support pasting text (Ctrl + V). This limitation can be inconvenient for users who prefer to use password managers or need to enter complex passwords.

Suggested Enhancement:
I propose adding support for environment variables to handle passwords. This feature would allow users to set their passwords as environment variables, which the application would check before prompting for a password using getpass. If the environment variable for a specific board's password is set, the application would use this password. Otherwise, it would fall back to prompting the user.

Example Usage:
For "kilter", the user can set the password using an environment variable as follows:
Mac:
export KILTER_PASSWORD="myPassword"
Windows:
$env:KILTER_PASSWORD = "myPassword"
Then, they can run the application with:

boardlib kilter
In this scenario, the application would automatically use the password from KILTER_PASSWORD without prompting the user.

Benefits:
Enhances user convenience, especially for those using password managers or dealing with complex passwords.
Maintains current functionality for users who prefer to input their passwords manually.
Increases the accessibility of the application by providing an alternative password input method.

Document and release Aurora sync/download

New changes have added library methods for download and synchronizing the Aurora-based app databases, which include all climbs. This is probably a valuable addition and should be documented and packaged into a new version.

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.