Sync your own workout data from your "Strong" app
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

renamed repository to Strong App Workout Sync

+28 -28
+1 -1
.github/workflows/build-and-test.yml
··· 86 86 run: | 87 87 BASE_BRANCH="${{ github.event.pull_request.base.ref }}" 88 88 git fetch origin "$BASE_BRANCH" 89 - for DIR in "strong-api-lib" "strong-api-fetch" 89 + for DIR in "strong-api-lib" "strong-sync-service" 90 90 do 91 91 echo "Checking $DIR" 92 92 CHANGED_FILES=$(git diff --name-only origin/"$BASE_BRANCH"...HEAD -- "$DIR")
+2 -2
.github/workflows/deploy.yml
··· 34 34 35 35 - name: Extract version from Cargo.toml 36 36 run: | 37 - VERSION=$(grep '^version' strong-api-fetch/Cargo.toml | head -n 1 | sed -E 's/version *= *"([^"]+)".*/\1/') 37 + VERSION=$(grep '^version' strong-sync-service/Cargo.toml | head -n 1 | sed -E 's/version *= *"([^"]+)".*/\1/') 38 38 echo "VERSION=$VERSION" >> $GITHUB_ENV 39 39 echo "Version extracted: $VERSION" 40 40 ··· 70 70 71 71 - name: Extract version from Cargo.toml 72 72 run: | 73 - VERSION=$(grep '^version' strong-api-fetch/Cargo.toml | head -n 1 | sed -E 's/version *= *"([^"]+)".*/\1/') 73 + VERSION=$(grep '^version' strong-sync-service/Cargo.toml | head -n 1 | sed -E 's/version *= *"([^"]+)".*/\1/') 74 74 echo "VERSION=$VERSION" >> $GITHUB_ENV 75 75 echo "Version extracted: $VERSION" 76 76
+10 -10
Cargo.lock
··· 1401 1401 checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1402 1402 1403 1403 [[package]] 1404 - name = "strong-api-fetch" 1405 - version = "0.2.2" 1404 + name = "strong-api-lib" 1405 + version = "0.3.2" 1406 1406 dependencies = [ 1407 - "clickhouse", 1408 - "dotenvy", 1409 1407 "reqwest", 1410 1408 "serde", 1411 1409 "serde_json", 1412 - "strong-api-lib", 1413 - "time", 1414 1410 "tokio", 1415 - "uuid", 1411 + "wiremock", 1416 1412 ] 1417 1413 1418 1414 [[package]] 1419 - name = "strong-api-lib" 1420 - version = "0.3.2" 1415 + name = "strong-sync-service" 1416 + version = "0.2.2" 1421 1417 dependencies = [ 1418 + "clickhouse", 1419 + "dotenvy", 1422 1420 "reqwest", 1423 1421 "serde", 1424 1422 "serde_json", 1423 + "strong-api-lib", 1424 + "time", 1425 1425 "tokio", 1426 - "wiremock", 1426 + "uuid", 1427 1427 ] 1428 1428 1429 1429 [[package]]
+1 -1
Cargo.toml
··· 2 2 resolver = "3" 3 3 members = [ 4 4 "strong-api-lib", 5 - "strong-api-fetch" 5 + "strong-sync-service" 6 6 ] 7 7 8 8 [profile.ci]
+7 -7
Dockerfile
··· 1 1 FROM rust:bookworm AS builder 2 - WORKDIR /usr/src/strong-api-fetch 2 + WORKDIR /usr/src/strong-sync-service 3 3 COPY . . 4 - RUN cd strong-api-fetch && RUSTFLAGS="-C debuginfo=2" cargo install --path . --debug 4 + RUN cd strong-sync-service && RUSTFLAGS="-C debuginfo=2" cargo install --path . --debug 5 5 6 6 FROM debian:bookworm-slim 7 7 ARG VERSION=0.2.1 ··· 13 13 curl \ 14 14 cron 15 15 16 - WORKDIR /usr/strong-api-fetch 17 - COPY --from=builder /usr/local/cargo/bin/strong-api-fetch /usr/bin/strong-api-fetch 16 + WORKDIR /usr/strong-sync-service 17 + COPY --from=builder /usr/local/cargo/bin/strong-sync-service /usr/bin/strong-sync-service 18 18 COPY .env /.env 19 19 # will run the cron job every day at 18:00, 18:30, 19:00, 19:30, 20:00, and 20:30 20 - RUN echo "0,30 18-20 * * * root RUST_BACKTRACE=1 RUST_LOG=debug /usr/bin/strong-api-fetch >> /var/log/cron.log 2>&1" > /etc/cron.d/strong-api-fetch 20 + RUN echo "0,30 18-20 * * * root RUST_BACKTRACE=1 RUST_LOG=debug /usr/bin/strong-sync-service >> /var/log/cron.log 2>&1" > /etc/cron.d/strong-sync-service 21 21 22 22 # Ensure the cron job file has proper permissions 23 - RUN chmod 0644 /etc/cron.d/strong-api-fetch && \ 24 - chmod +x /usr/bin/strong-api-fetch 23 + RUN chmod 0644 /etc/cron.d/strong-sync-service && \ 24 + chmod +x /usr/bin/strong-sync-service 25 25 26 26 # Create the log file so that it exists when cron writes to it 27 27 RUN touch /var/log/cron.log
+1 -1
README.MD
··· 1 - # Strong APP Workout Fetch 1 + # Strong App Workout Sync 2 2 3 3 This is a Rust-based service to fetch workouts from the [Strong App](https://www.strong.app/) (available for [Apple](https://apps.apple.com/us/app/strong-workout-tracker-gym-log/id464254577) and [Android](https://play.google.com/store/apps/details?id=io.strongapp.strong)) and store them in a ClickHouse database. 4 4
+3 -3
docker-compose.yml
··· 1 1 services: 2 - strong-api-fetch: 2 + strong-sync-service: 3 3 image: factorion-bot:${VERSION} 4 - container_name: strong-api-fetch 4 + container_name: strong-sync-service 5 5 restart: unless-stopped 6 6 depends_on: 7 7 clickhouse-server: 8 8 condition: service_started 9 9 volumes: 10 - - ./:/usr/strong-api-fetch 10 + - ./:/usr/strong-sync-service 11 11 networks: 12 12 - service-network 13 13
+1 -1
examples/grafana/services/php-heatmap/Dockerfile
··· 1 1 # Dockerfile 2 2 # 3 3 # Build and run without Docker Compose. You need a ClickHouse server running and accessible from the container. 4 - # You should use the docker compose from https://github.com/tolik518/strong-api-workout-fetch additionally to 4 + # You should use the docker compose from https://github.com/tolik518/strong-api-workout-sync additionally to 5 5 # have a ClickHouse server running with the workout data. 6 6 # 7 7 # docker build -t heatmap .
+1 -1
strong-api-fetch/Cargo.toml strong-sync-service/Cargo.toml
··· 1 1 [package] 2 - name = "strong-api-fetch" 2 + name = "strong-sync-service" 3 3 version = "0.2.2" 4 4 edition = "2024" 5 5
strong-api-fetch/src/clickhouse_saver.rs strong-sync-service/src/clickhouse_saver.rs
+1 -1
strong-api-fetch/src/main.rs strong-sync-service/src/main.rs
··· 13 13 async fn main() -> Result<(), Box<dyn std::error::Error>> { 14 14 let args: Vec<String> = env::args().collect(); 15 15 if args.len() > 1 && (args[1] == "--version" || args[1] == "-v") { 16 - println!("strong-api-fetch v{}", env!("CARGO_PKG_VERSION")); 16 + println!("strong-sync-service v{}", env!("CARGO_PKG_VERSION")); 17 17 return Ok(()); 18 18 } 19 19