Compare commits
2 Commits
5a7542fb4c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 62c9b8e59d | |||
| a4591655b7 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -27,3 +27,6 @@ android/captures/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
/archive
|
/archive
|
||||||
|
|
||||||
|
# claude code
|
||||||
|
.claude/
|
||||||
|
|||||||
64
README.md
64
README.md
@@ -1,7 +1,5 @@
|
|||||||
# synq, a tiny android-to-org capture system.
|
# synq, a tiny android-to-org capture system.
|
||||||
synq consists of:
|
synq consists of an Android app for capturing notes items and a docker agent that pulls notes and saves them to a local .org file.
|
||||||
- an Android app for capturing notes items
|
|
||||||
- a docker-based agent that pulls notes and saves them to a local .org file
|
|
||||||
|
|
||||||
1. Open Synq app
|
1. Open Synq app
|
||||||
2. Type note, mark as TODO (opt), add tags (opt), save.
|
2. Type note, mark as TODO (opt), add tags (opt), save.
|
||||||
@@ -38,60 +36,32 @@ home server
|
|||||||
|
|
||||||
|
|
||||||
## Build & Deploy
|
## Build & Deploy
|
||||||
1. First, build and deploy `synq-server`, the docker container that listens for new notes and writes to the local file.
|
First, clone the repo.
|
||||||
2. Then, build and install the `synq` app.
|
|
||||||
3. Finally, retrieve the token (`token.txt` in the docker container's data directory, or from the container logs `docker logs synq-server`)
|
Build and deploy `synq-server`, the docker container that listens for new notes and writes to the local file.
|
||||||
|
|
||||||
|
Then, build and install the `synq` app.
|
||||||
|
|
||||||
|
Finally, retrieve the token (`token.txt` in the docker container's data directory, or from the container logs `docker logs synq-server`)
|
||||||
|
|
||||||
### 1. synq-server (docker)
|
### 1. synq-server (docker)
|
||||||
|
- Build from `docker build -t synq-server ./server`
|
||||||
```bash
|
- Run (replace paths and token as needed):
|
||||||
# build
|
```docker
|
||||||
docker build -t synq-server ./server
|
|
||||||
|
|
||||||
# run (replace paths and token as needed)
|
|
||||||
docker run -d --name synq --restart=unless-stopped \
|
docker run -d --name synq --restart=unless-stopped \
|
||||||
-p 8765:8765 \
|
-p 8765:8765 \
|
||||||
-v /mnt/user/synq/data:/data \
|
-v /mnt/user/synq/data:/data \
|
||||||
synq-server
|
synq-server
|
||||||
```
|
```
|
||||||
|
|
||||||
The server generates a random token on first start and logs it prominently. copy it into the android app settings. To use a fixed token instead, pass `-e PHONE_CAPTURE_TOKEN=yourtoken`.
|
The server generates a random token on first start and logs it prominently. Copy it into the android app settings. To use a fixed token instead, pass `-e PHONE_CAPTURE_TOKEN=yourtoken`.
|
||||||
|
|
||||||
To rebuild after a `git pull`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git pull
|
|
||||||
docker build -t synq-server ./server
|
|
||||||
docker stop synq && docker rm synq
|
|
||||||
# re-run the docker run command above
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. synq (android)
|
### 2. synq (android)
|
||||||
|
Download apk from Releases, on the right
|
||||||
|
|
||||||
|
Or, build from source:
|
||||||
Open `android/` in Android Studio and hit **Sync**. then either:
|
Open `android/` in Android Studio and hit **Sync**. then either:
|
||||||
|
|
||||||
- **run on device/emulator directly** from Android Studio (▶), or
|
- **run on device/emulator directly** from Android Studio (▶), or
|
||||||
- **build a release APK** from the terminal:
|
- **build a release APK**
|
||||||
|
Then sideload to a connected device:
|
||||||
```bash
|
- terminal: `adb install app/build/outputs/apk/release/app-release-unsigned.apk`
|
||||||
cd android
|
|
||||||
./gradlew assembleRelease
|
|
||||||
# output: app/build/outputs/apk/release/app-release-unsigned.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
sideload to a connected device:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
adb install app/build/outputs/apk/release/app-release-unsigned.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
### releasing on gitea
|
|
||||||
|
|
||||||
tag the commit and push the tag:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git tag v1.0.0
|
|
||||||
git push gitea v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
then go to **Releases → New Release** in the Gitea UI, pick the tag, and drag the APK into the assets box. anyone on the LAN can download it from there.
|
|
||||||
|
|||||||
@@ -14,13 +14,17 @@ android {
|
|||||||
applicationId = "me.hgsky.synq"
|
applicationId = "me.hgsky.synq"
|
||||||
minSdk = 31
|
minSdk = 31
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 1
|
versionCode = 2
|
||||||
versionName = "0.1.0"
|
versionName = "1.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
16
android/app/proguard-rules.pro
vendored
Normal file
16
android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Keep Room entities and DAOs
|
||||||
|
-keep class me.hgsky.synq.data.db.** { *; }
|
||||||
|
|
||||||
|
# Keep Retrofit/OkHttp
|
||||||
|
-dontwarn okhttp3.**
|
||||||
|
-keep class okhttp3.** { *; }
|
||||||
|
|
||||||
|
# Keep kotlinx.serialization
|
||||||
|
-keepattributes *Annotation*, InnerClasses
|
||||||
|
-dontnote kotlinx.serialization.AnnotationsKt
|
||||||
|
-keepclassmembers class kotlinx.serialization.json.** { *** Companion; }
|
||||||
|
-keepclasseswithmembers class **$$serializer { *; }
|
||||||
|
-keepclassmembers @kotlinx.serialization.Serializable class ** {
|
||||||
|
*** Companion;
|
||||||
|
*** serializer(...);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user