diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 00000000..658d357c
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,55 @@
+name: Release
+on:
+ push:
+ tags:
+ - "v*"
+
+permissions:
+ contents: write
+
+jobs:
+ build-and-release:
+ name: Build and release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7.0.1
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v6.0.10
+ with:
+ version: 11.24.0
+ run_install: false
+
+ - name: Install Node.js
+ uses: actions/setup-node@v7.0.0
+ with:
+ node-version: 24.20.0
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install
+
+ - name: Postinstall steps
+ run: pnpm svelte-kit sync
+ working-directory: apps/web
+
+ - name: Build
+ run: pnpm build
+ working-directory: apps/web
+
+ - name: Zip build output
+ # zip the *contents* of build/ (not the folder itself) so index.html
+ # ends up at the root of the archive
+ run: |
+ cd apps/web/build
+ zip -r "${{ github.workspace }}/ttu-reader-${{ github.ref_name }}.zip" .
+
+ - name: Create release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release create "${{ github.ref_name }}" \
+ "ttu-reader-${{ github.ref_name }}.zip" \
+ --title "${{ github.ref_name }}" \
+ --generate-notes
diff --git a/README.md b/README.md
index d3a2edb3..52f7204f 100644
--- a/README.md
+++ b/README.md
@@ -328,6 +328,7 @@ Following export targets are available:
| Zip File | Creates an offline archive of the selected data |
| GDrive | Allows you to upload and download data to your GDrive account. Requires a google login - the default session is valid for 50 minutes and requires a manual reauthentication/export afterwards if no custom credentials with a client secret are used. You can revoke the app permissions any time in your [google security settings](https://myaccount.google.com/permissions) |
| OneDrive | Allows you to upload and download data to your OneDrive account. Requires a microsoft login - the default session is valid for 50 minutes and requires a manual reauthentication/export afterwards if no custom credentials with a client secret are used. You can revoke the app permissions any time in your [microsoft account privacy settings](https://microsoft.com/consent) |
+| ttsu-sync-server | Allows you to upload and download data to a self hosted [ttsu-sync-server](https://github.com/Minnowo/ttsu-sync-server) instance. Authenticates with a long lived API key instead of an OAuth login, so there is no reauthentication timeout |
| Filesystem | Allows you to store and read data from a configured folder on your hard drive. You have to grant permissions once per new opened tab. Only available on desktop chromium browsers - some browser like Brave may need additional flags in the browser settings enabled in order to see/use this option |
To export data select books in the manager and click/tap on the respective icon in the header.
@@ -416,6 +417,17 @@ To create such custom credentials follow these steps for the hoster you want to
42. Create a new OneDrive source on AJATT Reader with the client id and/or client secret you just have created
+
+ ttsu-sync-server
+
+ttsu-sync-server is a open source self-hostable server. See the [ttsu-sync-server](https://github.com/Minnowo/ttsu-sync-server) repo for how to build, configure and run the server itself.
+
+45. Once the server is running, create a user and generate an API key
+46. Under `Settings` > `Data` click the `+ Add` button to add a new remote data source
+47. Choose `ttsu-sync-server` as the source
+48. Enter the server's base URL (e.g. `http://127.0.0.1:8080`) in the "Client ID" field and the API key you generated in the "Client Secret" field. The username is not used by the server, only the API key
+
+
You may find following additional controls for storage source settings:
@@ -571,3 +583,23 @@ pnpm build
### External Hoster
In case you want to use external hoster like GDrive for data import/export follow the steps described in [Storage Sources](#storage-sources)
+
+
+# Dev
+
+1. Have [Node.js](https://nodejs.org/) and [Yarn](https://classic.yarnpkg.com/) installed
+```sh
+git clone
+```
+2. Install the dependencies
+```sh
+yarn
+```
+
+3. Start the dev server:
+```sh
+yarn dev --host 0.0.0.0
+```
+
+
+
diff --git a/apps/web/src/lib/components/book-card/book-manager-header.svelte b/apps/web/src/lib/components/book-card/book-manager-header.svelte
index c60e130f..9dc3a4a7 100644
--- a/apps/web/src/lib/components/book-card/book-manager-header.svelte
+++ b/apps/web/src/lib/components/book-card/book-manager-header.svelte
@@ -27,6 +27,7 @@
fileCountData$,
fsStorageSource$,
gDriveStorageSource$,
+ ttsuSyncServerStorageSource$,
isOnline$,
oneDriveStorageSource$
} from '$lib/data/store';
@@ -137,6 +138,19 @@
requiresConnectivity: false
}
]
+ : []),
+ ...(isStorageSourceAvailable(
+ StorageKey.TTSU_SYNC_SERVER,
+ $ttsuSyncServerStorageSource$,
+ window
+ )
+ ? [
+ {
+ label: 'ttsu-sync-server',
+ key: StorageKey.TTSU_SYNC_SERVER,
+ requiresConnectivity: true
+ }
+ ]
: [])
);
}
diff --git a/apps/web/src/lib/components/book-export/book-export-dialog.svelte b/apps/web/src/lib/components/book-export/book-export-dialog.svelte
index 92ecbb46..6d41b6af 100644
--- a/apps/web/src/lib/components/book-export/book-export-dialog.svelte
+++ b/apps/web/src/lib/components/book-export/book-export-dialog.svelte
@@ -15,7 +15,8 @@
gDriveStorageSource$,
lastExportedTarget$,
lastExportedTypes$,
- oneDriveStorageSource$
+ oneDriveStorageSource$,
+ ttsuSyncServerStorageSource$
} from '$lib/data/store';
import { executeReplicate$ } from '$lib/functions/replication/replication-progress';
import { createEventDispatcher } from 'svelte';
@@ -46,6 +47,19 @@
: []),
...(isStorageSourceAvailable(StorageKey.FS, $fsStorageSource$, window)
? [{ ...getStorageIconData(StorageKey.FS), source: StorageKey.FS, label: 'Filesystem' }]
+ : []),
+ ...(isStorageSourceAvailable(
+ StorageKey.TTSU_SYNC_SERVER,
+ $ttsuSyncServerStorageSource$,
+ window
+ )
+ ? [
+ {
+ ...getStorageIconData(StorageKey.TTSU_SYNC_SERVER),
+ source: StorageKey.TTSU_SYNC_SERVER,
+ label: 'ttsu-sync-server'
+ }
+ ]
: [])
].filter((icon) => icon.source !== $storageSource$);
}
diff --git a/apps/web/src/lib/components/log-report-dialog.svelte b/apps/web/src/lib/components/log-report-dialog.svelte
index 97cbcc2b..01037a14 100644
--- a/apps/web/src/lib/components/log-report-dialog.svelte
+++ b/apps/web/src/lib/components/log-report-dialog.svelte
@@ -49,6 +49,7 @@
showExternalPlaceholder$,
gDriveStorageSource$,
oneDriveStorageSource$,
+ ttsuSyncServerStorageSource$,
fsStorageSource$,
syncTarget$,
keepLocalStatisticsOnDeletion$,
@@ -148,6 +149,9 @@
gDriveStorageSource$.getValue() === StorageSourceDefault.GDRIVE_DEFAULT,
oneDriveStorageSource:
oneDriveStorageSource$.getValue() === StorageSourceDefault.ONEDRIVE_DEFAULT,
+ ttsuSyncServerStorageSource:
+ ttsuSyncServerStorageSource$.getValue() ===
+ StorageSourceDefault.TTSU_SYNC_SERVER_DEFAULT,
fsStorageSource: !!fsStorageSource$.getValue(),
syncTarget: !!syncTarget$.getValue(),
keepLocalStatisticsOnDeletion: keepLocalStatisticsOnDeletion$.getValue(),
diff --git a/apps/web/src/lib/components/settings/settings-storage-source-list.svelte b/apps/web/src/lib/components/settings/settings-storage-source-list.svelte
index cca614f2..98560a9d 100644
--- a/apps/web/src/lib/components/settings/settings-storage-source-list.svelte
+++ b/apps/web/src/lib/components/settings/settings-storage-source-list.svelte
@@ -37,6 +37,7 @@
gDriveStorageSource$,
isOnline$,
oneDriveStorageSource$,
+ ttsuSyncServerStorageSource$,
syncTarget$
} from '$lib/data/store';
import { AutoReplicationType } from '$lib/functions/replication/replication-options';
@@ -73,6 +74,9 @@
case StorageKey.ONEDRIVE:
configuredIsSourceDefault = name === $oneDriveStorageSource$;
break;
+ case StorageKey.TTSU_SYNC_SERVER:
+ configuredIsSourceDefault = name === $ttsuSyncServerStorageSource$;
+ break;
case StorageKey.FS:
configuredIsSourceDefault = name === $fsStorageSource$;
break;
@@ -258,7 +262,12 @@
{@const storageSourceIsSourceDefault = isStorageSourceDefault(
storageSource.name,
storageSource.type,
- [$gDriveStorageSource$, $oneDriveStorageSource$, $fsStorageSource$]
+ [
+ $gDriveStorageSource$,
+ $oneDriveStorageSource$,
+ $ttsuSyncServerStorageSource$,
+ $fsStorageSource$
+ ]
)}