Fork: rename package and applicationId

This commit is contained in:
Atte149 2026-06-15 16:13:31 +03:00
parent b0ab7d320a
commit ad821faecd
577 changed files with 2463 additions and 2379 deletions

84
AGENTS.md Normal file
View file

@ -0,0 +1,84 @@
# Book's Story — Bookshelf Fork
> Форк `Acclorite/book-story` под Bookshelf: audiobookshelf + bookshelf-api + TTS + offline.
## Stack
- **Язык:** Kotlin 100%
- **UI:** Jetpack Compose + Material3
- **DI:** Dagger Hilt
- **БД:** Room
- **Настройки:** DataStore
- **Сеть:** Retrofit + OkHttp + Kotlinx Serialization
- **Аудио:** ExoPlayer (Media3) + MediaSession
- **Фоновые задачи:** WorkManager
- **Читалка:** собственная Book's Story (jsoup, pdfbox, commonmark)
- **minSdk:** 26 (план — поднять до 31 позже)
- **compileSdk/targetSdk:** 36
## Goal
- Сохранить Material You reader Book's Story.
- Добавить поддержку bookshelf-api: библиотеки, поиск, TTS, подкасты, Яндекс/YouTube.
- Добавить аудиоплеер для аудиокниг из Audiobookshelf.
- Добавить offline-кэш и синхронизацию прогресса.
## Layout
- `app/src/main/java/org/dueattendant149/bookshelf/` — основной код
- `core/` — crash handler, typealias, commonmark parser
- `data/` — repository, Room, DataStore, mappers, parsers, DI
- `domain/` — models, use cases, repository interfaces
- `presentation/` — ViewModels, MVI screens, navigator
- `ui/` — Compose UI
- `bookshelf-api` backend находится в `~/bookshelf/bookshelf-api/` (отдельный проект)
- Lissen (который дорабатывается параллельно) — `~/bookshelf/lissen/`
## API endpoints
- **bookshelf-api:** `http://bookshelf-api:8073` (или `https://tts.dueattendant149.org` после DNS)
- `GET /api/v1/books/libraries`
- `GET /api/v1/books/{item_id}`
- `GET /api/v1/books/library/{id}/search?q=...`
- `POST /api/v1/search`
- `POST /api/v1/tts`, `GET /api/v1/tts/{job_id}`, `GET /api/v1/tts/{job_id}/download`
- `GET /api/v1/tts/engines`, `GET /api/v1/tts/voices`
- `POST /api/v1/download`, `GET /api/v1/download/list`
- `POST /api/v1/podcasts`, `POST /api/v1/sources/yandex`
- **Audiobookshelf (напрямую):** для аудио файлов и обложек
- `GET /api/items/{id}/file/{ino}`
- `GET /api/items/{id}/download`
- `GET /api/items/{id}/cover`
## Git
- **origin:** `https://git.dueattendant149.org/Atte149/book-story.git` (Forgejo)
- **upstream:** `https://github.com/Acclorite/book-story.git`
- **Лицензия:** GPL-3.0-only (как у оригинала)
## Build
```bash
./gradlew :app:assembleDebug
```
## Current Status
- Phase 1: fork + package rename completed.
- Next: Phase 2 — network layer (Retrofit + bookshelf-api client).
## WARNs
- **Не пушить в `upstream` (Acclorite/book-story).** Только в `origin` (Forgejo).
- **Lissen остаётся живым проектом.** Book's Story fork — отдельная ветка развития.
- **Секреты** (ABS token, API keys) хранить только в `.env` / `credentials.json` / DataStore, никогда в коде.
- **Package:** `org.dueattendant149.bookshelf`. Все ссылки на `ua.acclorite.book_story` в коде заменены; README оставлен с оригинальными F-Droid ссылками.
## Typical tasks
- Добавить новый endpoint bookshelf-api
- Расширить `Book` / `BookEntity` для remote полей
- Добавить аудиоплеер экран
- Добавить TTS экран
- Поднять minSdk, добавить новые разрешения
- Обновить AGENTS.md при существенных изменениях архитектуры

View file

@ -10,12 +10,12 @@ plugins {
}
android {
namespace = "ua.acclorite.book_story"
namespace = "org.dueattendant149.bookshelf"
compileSdk = 36
// Default configuration
defaultConfig {
applicationId = "ua.acclorite.book_story"
applicationId = "org.dueattendant149.bookshelf"
minSdk = 26
targetSdk = 36
versionCode = 14

View file

@ -3,13 +3,13 @@
<!-- Removing DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION, which is not used -->
<uses-permission
android:name="ua.acclorite.book_story.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
android:name="org.dueattendant149.bookshelf.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
tools:node="remove" />
<uses-permission
android:name="ua.acclorite.book_story.debug.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
android:name="org.dueattendant149.bookshelf.debug.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
tools:node="remove" />
<uses-permission
android:name="ua.acclorite.book_story.release.debug.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
android:name="org.dueattendant149.bookshelf.release.debug.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
tools:node="remove" />
<!-- Removing READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE explicitly -->

View file

@ -4,11 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story
package org.dueattendant149.bookshelf
import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import ua.acclorite.book_story.core.crash.CrashHandler
import org.dueattendant149.bookshelf.core.crash.CrashHandler
@HiltAndroidApp
class Application : Application() {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core
package org.dueattendant149.bookshelf.core
import android.graphics.Bitmap

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.crash
package org.dueattendant149.bookshelf.core.crash
import android.content.Context
import android.content.Intent
import android.os.Process
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.presentation.crash.CrashActivity
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.presentation.crash.CrashActivity
import kotlin.system.exitProcess
private const val TAG = "CrashHandler"

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.crash
package org.dueattendant149.bookshelf.core.crash
import android.content.Context
import java.io.BufferedWriter

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.data
package org.dueattendant149.bookshelf.core.data
import kotlinx.collections.immutable.toPersistentList
import ua.acclorite.book_story.core.language.Language
import org.dueattendant149.bookshelf.core.language.Language
object CoreData {
val defaultLanguage = Language.fromLanguageTag(languageTag = "en") // English

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.data
package org.dueattendant149.bookshelf.core.data
import kotlinx.collections.immutable.persistentListOf

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.data
package org.dueattendant149.bookshelf.core.data
object LinkData {
const val RELEASES = "https://www.github.com/Acclorite/book-story/releases/latest"

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.helpers
package org.dueattendant149.bookshelf.core.helpers
fun <T> MutableList<T>.addAll(calculation: () -> List<T>) {
addAll(calculation())

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.helpers
package org.dueattendant149.bookshelf.core.helpers
fun String.removeTrailingZero(): String {
if (!this.contains('.'))

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.helpers
package org.dueattendant149.bookshelf.core.helpers
fun <T> compareByWithOrder(
descending: Boolean,

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.language
package org.dueattendant149.bookshelf.core.language
import androidx.compose.runtime.Immutable
import java.util.Locale

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.language
package org.dueattendant149.bookshelf.core.language
import java.util.Locale

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.log
package org.dueattendant149.bookshelf.core.log
import android.util.Log

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.core.ui
package org.dueattendant149.bookshelf.core.ui
import android.content.Context
import android.os.Parcelable

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.converter
package org.dueattendant149.bookshelf.data.converter
import androidx.room.TypeConverter
import kotlinx.serialization.json.Json

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.di
package org.dueattendant149.bookshelf.data.di
import android.app.Application
import androidx.room.Room
@ -19,8 +19,8 @@ import org.commonmark.node.HtmlBlock
import org.commonmark.node.IndentedCodeBlock
import org.commonmark.node.ThematicBreak
import org.commonmark.parser.Parser
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.local.room.DatabaseHelper
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.local.room.DatabaseHelper
import javax.inject.Singleton
@Module

View file

@ -4,42 +4,42 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.di
package org.dueattendant149.bookshelf.data.di
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import ua.acclorite.book_story.data.local.data_store.DataStore
import ua.acclorite.book_story.data.local.data_store.DataStoreImpl
import ua.acclorite.book_story.data.mapper.book.BookMapper
import ua.acclorite.book_story.data.mapper.book.BookMapperImpl
import ua.acclorite.book_story.data.mapper.category.CategoryMapper
import ua.acclorite.book_story.data.mapper.category.CategoryMapperImpl
import ua.acclorite.book_story.data.mapper.color_preset.ColorPresetMapper
import ua.acclorite.book_story.data.mapper.color_preset.ColorPresetMapperImpl
import ua.acclorite.book_story.data.mapper.file.FileMapper
import ua.acclorite.book_story.data.mapper.file.FileMapperImpl
import ua.acclorite.book_story.data.mapper.history.HistoryMapper
import ua.acclorite.book_story.data.mapper.history.HistoryMapperImpl
import ua.acclorite.book_story.data.parser.cover.CoverParser
import ua.acclorite.book_story.data.parser.cover.CoverParserImpl
import ua.acclorite.book_story.data.parser.file.FileParser
import ua.acclorite.book_story.data.parser.file.FileParserImpl
import ua.acclorite.book_story.data.parser.text.TextParser
import ua.acclorite.book_story.data.parser.text.TextParserImpl
import ua.acclorite.book_story.data.repository.BookRepositoryImpl
import ua.acclorite.book_story.data.repository.CategoryRepositoryImpl
import ua.acclorite.book_story.data.repository.ColorPresetRepositoryImpl
import ua.acclorite.book_story.data.repository.FileSystemRepositoryImpl
import ua.acclorite.book_story.data.repository.HistoryRepositoryImpl
import ua.acclorite.book_story.data.repository.PermissionRepositoryImpl
import ua.acclorite.book_story.domain.repository.BookRepository
import ua.acclorite.book_story.domain.repository.CategoryRepository
import ua.acclorite.book_story.domain.repository.ColorPresetRepository
import ua.acclorite.book_story.domain.repository.FileSystemRepository
import ua.acclorite.book_story.domain.repository.HistoryRepository
import ua.acclorite.book_story.domain.repository.PermissionRepository
import org.dueattendant149.bookshelf.data.local.data_store.DataStore
import org.dueattendant149.bookshelf.data.local.data_store.DataStoreImpl
import org.dueattendant149.bookshelf.data.mapper.book.BookMapper
import org.dueattendant149.bookshelf.data.mapper.book.BookMapperImpl
import org.dueattendant149.bookshelf.data.mapper.category.CategoryMapper
import org.dueattendant149.bookshelf.data.mapper.category.CategoryMapperImpl
import org.dueattendant149.bookshelf.data.mapper.color_preset.ColorPresetMapper
import org.dueattendant149.bookshelf.data.mapper.color_preset.ColorPresetMapperImpl
import org.dueattendant149.bookshelf.data.mapper.file.FileMapper
import org.dueattendant149.bookshelf.data.mapper.file.FileMapperImpl
import org.dueattendant149.bookshelf.data.mapper.history.HistoryMapper
import org.dueattendant149.bookshelf.data.mapper.history.HistoryMapperImpl
import org.dueattendant149.bookshelf.data.parser.cover.CoverParser
import org.dueattendant149.bookshelf.data.parser.cover.CoverParserImpl
import org.dueattendant149.bookshelf.data.parser.file.FileParser
import org.dueattendant149.bookshelf.data.parser.file.FileParserImpl
import org.dueattendant149.bookshelf.data.parser.text.TextParser
import org.dueattendant149.bookshelf.data.parser.text.TextParserImpl
import org.dueattendant149.bookshelf.data.repository.BookRepositoryImpl
import org.dueattendant149.bookshelf.data.repository.CategoryRepositoryImpl
import org.dueattendant149.bookshelf.data.repository.ColorPresetRepositoryImpl
import org.dueattendant149.bookshelf.data.repository.FileSystemRepositoryImpl
import org.dueattendant149.bookshelf.data.repository.HistoryRepositoryImpl
import org.dueattendant149.bookshelf.data.repository.PermissionRepositoryImpl
import org.dueattendant149.bookshelf.domain.repository.BookRepository
import org.dueattendant149.bookshelf.domain.repository.CategoryRepository
import org.dueattendant149.bookshelf.domain.repository.ColorPresetRepository
import org.dueattendant149.bookshelf.domain.repository.FileSystemRepository
import org.dueattendant149.bookshelf.domain.repository.HistoryRepository
import org.dueattendant149.bookshelf.domain.repository.PermissionRepository
import javax.inject.Singleton
@Module

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.di
package org.dueattendant149.bookshelf.data.di
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import ua.acclorite.book_story.data.service.CoverImageHandlerImpl
import ua.acclorite.book_story.data.service.FileProviderImpl
import ua.acclorite.book_story.domain.service.CoverImageHandler
import ua.acclorite.book_story.domain.service.FileProvider
import org.dueattendant149.bookshelf.data.service.CoverImageHandlerImpl
import org.dueattendant149.bookshelf.data.service.FileProviderImpl
import org.dueattendant149.bookshelf.domain.service.CoverImageHandler
import org.dueattendant149.bookshelf.domain.service.FileProvider
import javax.inject.Singleton
@Module

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.data_store
package org.dueattendant149.bookshelf.data.local.data_store
import androidx.datastore.preferences.core.Preferences

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.data_store
package org.dueattendant149.bookshelf.data.local.data_store
import android.app.Application
import android.content.Context

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.dto
package org.dueattendant149.bookshelf.data.local.dto
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import ua.acclorite.book_story.data.converter.CategoryConverter
import org.dueattendant149.bookshelf.data.converter.CategoryConverter
@Entity
@TypeConverters(CategoryConverter::class)

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.dto
package org.dueattendant149.bookshelf.data.local.dto
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import ua.acclorite.book_story.presentation.library.model.LibrarySortOrder
import org.dueattendant149.bookshelf.presentation.library.model.LibrarySortOrder
@Entity
data class CategoryEntity(

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.dto
package org.dueattendant149.bookshelf.data.local.dto
import androidx.room.Entity
import androidx.room.PrimaryKey

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.dto
package org.dueattendant149.bookshelf.data.local.dto
import androidx.room.Entity
import androidx.room.PrimaryKey

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.dto
package org.dueattendant149.bookshelf.data.local.dto
import androidx.room.Embedded
import androidx.room.Relation

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.room
package org.dueattendant149.bookshelf.data.local.room
import androidx.room.Dao
import androidx.room.Delete
@ -12,7 +12,7 @@ import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import ua.acclorite.book_story.data.local.dto.BookEntity
import org.dueattendant149.bookshelf.data.local.dto.BookEntity
@Dao
interface BookDao {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.room
package org.dueattendant149.bookshelf.data.local.room
import android.app.Application
import androidx.room.AutoMigration
@ -15,10 +15,10 @@ import androidx.room.RoomDatabase
import androidx.room.migration.AutoMigrationSpec
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import ua.acclorite.book_story.data.local.dto.BookEntity
import ua.acclorite.book_story.data.local.dto.CategoryEntity
import ua.acclorite.book_story.data.local.dto.ColorPresetEntity
import ua.acclorite.book_story.data.local.dto.HistoryEntity
import org.dueattendant149.bookshelf.data.local.dto.BookEntity
import org.dueattendant149.bookshelf.data.local.dto.CategoryEntity
import org.dueattendant149.bookshelf.data.local.dto.ColorPresetEntity
import org.dueattendant149.bookshelf.data.local.dto.HistoryEntity
import java.io.File
@Database(

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.room
package org.dueattendant149.bookshelf.data.local.room
import androidx.room.Dao
import androidx.room.Delete
@ -12,7 +12,7 @@ import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import ua.acclorite.book_story.data.local.dto.CategoryEntity
import org.dueattendant149.bookshelf.data.local.dto.CategoryEntity
@Dao
interface CategoryDao {

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.room
package org.dueattendant149.bookshelf.data.local.room
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Query
import androidx.room.Upsert
import ua.acclorite.book_story.data.local.dto.ColorPresetEntity
import org.dueattendant149.bookshelf.data.local.dto.ColorPresetEntity
@Dao
interface ColorPresetDao {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.local.room
package org.dueattendant149.bookshelf.data.local.room
import androidx.room.Dao
import androidx.room.Delete
@ -12,8 +12,8 @@ import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Transaction
import ua.acclorite.book_story.data.local.dto.HistoryEntity
import ua.acclorite.book_story.data.local.dto.HistoryWithBook
import org.dueattendant149.bookshelf.data.local.dto.HistoryEntity
import org.dueattendant149.bookshelf.data.local.dto.HistoryWithBook
@Dao
interface HistoryDao {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.book
package org.dueattendant149.bookshelf.data.mapper.book
import ua.acclorite.book_story.data.local.dto.BookEntity
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.data.local.dto.BookEntity
import org.dueattendant149.bookshelf.domain.model.library.Book
interface BookMapper {
fun toBookEntity(book: Book): BookEntity

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.book
package org.dueattendant149.bookshelf.data.mapper.book
import androidx.core.net.toUri
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.local.dto.BookEntity
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.local.dto.BookEntity
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
class BookMapperImpl @Inject constructor() : BookMapper {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.category
package org.dueattendant149.bookshelf.data.mapper.category
import ua.acclorite.book_story.data.local.dto.CategoryEntity
import ua.acclorite.book_story.domain.model.library.Category
import org.dueattendant149.bookshelf.data.local.dto.CategoryEntity
import org.dueattendant149.bookshelf.domain.model.library.Category
interface CategoryMapper {
fun toCategoryEntity(category: Category): CategoryEntity

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.category
package org.dueattendant149.bookshelf.data.mapper.category
import ua.acclorite.book_story.data.local.dto.CategoryEntity
import ua.acclorite.book_story.domain.model.library.Category
import org.dueattendant149.bookshelf.data.local.dto.CategoryEntity
import org.dueattendant149.bookshelf.domain.model.library.Category
import javax.inject.Inject
class CategoryMapperImpl @Inject constructor() : CategoryMapper {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.color_preset
package org.dueattendant149.bookshelf.data.mapper.color_preset
import ua.acclorite.book_story.data.local.dto.ColorPresetEntity
import ua.acclorite.book_story.domain.model.reader.ColorPreset
import org.dueattendant149.bookshelf.data.local.dto.ColorPresetEntity
import org.dueattendant149.bookshelf.domain.model.reader.ColorPreset
interface ColorPresetMapper {
fun toColorPresetEntity(colorPreset: ColorPreset, order: Int): ColorPresetEntity

View file

@ -4,11 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.color_preset
package org.dueattendant149.bookshelf.data.mapper.color_preset
import androidx.compose.ui.graphics.Color
import ua.acclorite.book_story.data.local.dto.ColorPresetEntity
import ua.acclorite.book_story.domain.model.reader.ColorPreset
import org.dueattendant149.bookshelf.data.local.dto.ColorPresetEntity
import org.dueattendant149.bookshelf.domain.model.reader.ColorPreset
import javax.inject.Inject
class ColorPresetMapperImpl @Inject constructor() : ColorPresetMapper {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.file
package org.dueattendant149.bookshelf.data.mapper.file
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.file.File
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.file.File
interface FileMapper {
fun toCachedFile(file: File): CachedFile

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.file
package org.dueattendant149.bookshelf.data.mapper.file
import android.app.Application
import androidx.core.net.toUri
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.model.file.CachedFileCompat
import ua.acclorite.book_story.domain.model.file.File
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.model.file.CachedFileCompat
import org.dueattendant149.bookshelf.domain.model.file.File
import javax.inject.Inject
class FileMapperImpl @Inject constructor(

View file

@ -4,11 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.history
package org.dueattendant149.bookshelf.data.mapper.history
import ua.acclorite.book_story.data.local.dto.HistoryEntity
import ua.acclorite.book_story.data.local.dto.HistoryWithBook
import ua.acclorite.book_story.domain.model.history.History
import org.dueattendant149.bookshelf.data.local.dto.HistoryEntity
import org.dueattendant149.bookshelf.data.local.dto.HistoryWithBook
import org.dueattendant149.bookshelf.domain.model.history.History
interface HistoryMapper {
suspend fun toHistoryEntity(history: History): HistoryEntity

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.mapper.history
package org.dueattendant149.bookshelf.data.mapper.history
import ua.acclorite.book_story.data.local.dto.HistoryEntity
import ua.acclorite.book_story.data.local.dto.HistoryWithBook
import ua.acclorite.book_story.data.mapper.book.BookMapper
import ua.acclorite.book_story.domain.model.history.History
import org.dueattendant149.bookshelf.data.local.dto.HistoryEntity
import org.dueattendant149.bookshelf.data.local.dto.HistoryWithBook
import org.dueattendant149.bookshelf.data.mapper.book.BookMapper
import org.dueattendant149.bookshelf.domain.model.history.History
import javax.inject.Inject
class HistoryMapperImpl @Inject constructor(

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.model.file
package org.dueattendant149.bookshelf.data.model.file
import android.content.Context
import android.net.Uri

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.model.file
package org.dueattendant149.bookshelf.data.model.file
import androidx.compose.runtime.Immutable

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.model.file
package org.dueattendant149.bookshelf.data.model.file
import android.content.Context
import android.net.Uri

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.model.file.CachedFile
interface CoverParser {
suspend fun parse(cachedFile: CachedFile): CoverImage?

View file

@ -4,11 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import javax.inject.Inject
private const val TAG = "CoverParser"

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import android.graphics.BitmapFactory
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import java.net.URLDecoder
import java.nio.charset.StandardCharsets
import java.util.zip.ZipFile

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import javax.inject.Inject
class Fb2CoverParser @Inject constructor() : CoverParser {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import javax.inject.Inject
class HtmlCoverParser @Inject constructor() : CoverParser {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import javax.inject.Inject
class PdfCoverParser @Inject constructor() : CoverParser {

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.cover
package org.dueattendant149.bookshelf.data.parser.cover
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.model.file.CachedFile
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import javax.inject.Inject
class TxtCoverParser @Inject constructor() : CoverParser {

View file

@ -4,17 +4,17 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.document
package org.dueattendant149.bookshelf.data.parser.document
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import androidx.compose.ui.graphics.asImageBitmap
import kotlinx.coroutines.yield
import org.jsoup.nodes.Document
import ua.acclorite.book_story.core.helpers.clearAllMarkdown
import ua.acclorite.book_story.core.helpers.clearMarkdown
import ua.acclorite.book_story.core.helpers.containsVisibleText
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.helpers.clearAllMarkdown
import org.dueattendant149.bookshelf.core.helpers.clearMarkdown
import org.dueattendant149.bookshelf.core.helpers.containsVisibleText
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import java.io.File
import java.net.URLDecoder
import java.nio.charset.StandardCharsets

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.document
package org.dueattendant149.bookshelf.data.parser.document
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.LinkAnnotation
@ -23,7 +23,7 @@ import org.commonmark.node.Node
import org.commonmark.node.StrongEmphasis
import org.commonmark.node.Text
import org.commonmark.parser.Parser
import ua.acclorite.book_story.core.helpers.clearMarkdown
import org.dueattendant149.bookshelf.core.helpers.clearMarkdown
import javax.inject.Inject
class MarkdownParser @Inject constructor(

View file

@ -4,17 +4,17 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import java.util.zip.ZipFile
import javax.inject.Inject

View file

@ -4,15 +4,15 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
private const val TAG = "Fb2FileParser"

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
interface FileParser {
suspend fun parse(cachedFile: CachedFile): Book?

View file

@ -4,11 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
private const val TAG = "FileParser"

View file

@ -4,15 +4,15 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
private const val TAG = "HtmlFileParser"

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import android.app.Application
import com.tom_roush.pdfbox.android.PDFBoxResourceLoader
import com.tom_roush.pdfbox.pdmodel.PDDocument
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
private const val TAG = "PdfFileParser"

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.file
package org.dueattendant149.bookshelf.data.parser.file
import ua.acclorite.book_story.R
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.ui.UIText
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.ui.UIText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.library.Book
import javax.inject.Inject
private const val TAG = "TxtFileParser"

View file

@ -6,7 +6,7 @@
@file:OptIn(ExperimentalCoroutinesApi::class)
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import androidx.core.net.toUri
import kotlinx.coroutines.Dispatchers
@ -17,15 +17,15 @@ import kotlinx.coroutines.withContext
import kotlinx.coroutines.yield
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.core.data.ExtensionsData
import ua.acclorite.book_story.core.helpers.addAll
import ua.acclorite.book_story.core.helpers.containsVisibleText
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.core.log.logW
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.document.DocumentParser
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.data.ExtensionsData
import org.dueattendant149.bookshelf.core.helpers.addAll
import org.dueattendant149.bookshelf.core.helpers.containsVisibleText
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.core.log.logW
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.document.DocumentParser
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import java.io.File
import java.net.URLDecoder
import java.nio.charset.StandardCharsets

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import kotlinx.coroutines.yield
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.document.DocumentParser
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.document.DocumentParser
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import javax.inject.Inject
private const val TAG = "HtmlTextParser"

View file

@ -4,19 +4,19 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import android.app.Application
import com.tom_roush.pdfbox.android.PDFBoxResourceLoader
import com.tom_roush.pdfbox.pdmodel.PDDocument
import com.tom_roush.pdfbox.text.PDFTextStripper
import kotlinx.coroutines.yield
import ua.acclorite.book_story.core.helpers.clearAllMarkdown
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.document.MarkdownParser
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.helpers.clearAllMarkdown
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.document.MarkdownParser
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import javax.inject.Inject
private const val TAG = "PdfTextParser"

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
interface TextParser {
suspend fun parse(cachedFile: CachedFile): List<ReaderText>

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import javax.inject.Inject
private const val TAG = "TextParser"

View file

@ -4,17 +4,17 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlinx.coroutines.yield
import ua.acclorite.book_story.core.helpers.clearAllMarkdown
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.document.MarkdownParser
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.helpers.clearAllMarkdown
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.document.MarkdownParser
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import javax.inject.Inject
private const val TAG = "TxtTextParser"

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.parser.text
package org.dueattendant149.bookshelf.data.parser.text
import kotlinx.coroutines.yield
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import ua.acclorite.book_story.core.log.logE
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.document.DocumentParser
import ua.acclorite.book_story.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.core.log.logE
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.document.DocumentParser
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import javax.inject.Inject
private const val TAG = "XmlTextParser"

View file

@ -4,21 +4,21 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.mapper.book.BookMapper
import ua.acclorite.book_story.data.mapper.file.FileMapper
import ua.acclorite.book_story.data.parser.cover.CoverParser
import ua.acclorite.book_story.data.parser.text.TextParser
import ua.acclorite.book_story.domain.model.file.File
import ua.acclorite.book_story.domain.model.library.Book
import ua.acclorite.book_story.domain.model.reader.ReaderText
import ua.acclorite.book_story.domain.repository.BookRepository
import ua.acclorite.book_story.domain.service.FileProvider
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.mapper.book.BookMapper
import org.dueattendant149.bookshelf.data.mapper.file.FileMapper
import org.dueattendant149.bookshelf.data.parser.cover.CoverParser
import org.dueattendant149.bookshelf.data.parser.text.TextParser
import org.dueattendant149.bookshelf.domain.model.file.File
import org.dueattendant149.bookshelf.domain.model.library.Book
import org.dueattendant149.bookshelf.domain.model.reader.ReaderText
import org.dueattendant149.bookshelf.domain.repository.BookRepository
import org.dueattendant149.bookshelf.domain.service.FileProvider
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,14 +4,14 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.mapper.category.CategoryMapper
import ua.acclorite.book_story.domain.model.library.Category
import ua.acclorite.book_story.domain.repository.CategoryRepository
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.mapper.category.CategoryMapper
import org.dueattendant149.bookshelf.domain.model.library.Category
import org.dueattendant149.bookshelf.domain.repository.CategoryRepository
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,14 +4,14 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.mapper.color_preset.ColorPresetMapper
import ua.acclorite.book_story.domain.model.reader.ColorPreset
import ua.acclorite.book_story.domain.repository.ColorPresetRepository
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.mapper.color_preset.ColorPresetMapper
import org.dueattendant149.bookshelf.domain.model.reader.ColorPreset
import org.dueattendant149.bookshelf.domain.repository.ColorPresetRepository
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,21 +4,21 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.core.data.ExtensionsData
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.mapper.file.FileMapper
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.parser.cover.CoverParser
import ua.acclorite.book_story.data.parser.file.FileParser
import ua.acclorite.book_story.domain.model.file.File
import ua.acclorite.book_story.domain.model.library.Book
import ua.acclorite.book_story.domain.repository.FileSystemRepository
import ua.acclorite.book_story.domain.service.FileProvider
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.core.data.ExtensionsData
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.mapper.file.FileMapper
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.parser.cover.CoverParser
import org.dueattendant149.bookshelf.data.parser.file.FileParser
import org.dueattendant149.bookshelf.domain.model.file.File
import org.dueattendant149.bookshelf.domain.model.library.Book
import org.dueattendant149.bookshelf.domain.repository.FileSystemRepository
import org.dueattendant149.bookshelf.domain.service.FileProvider
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,14 +4,14 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.data.local.room.BookDatabase
import ua.acclorite.book_story.data.mapper.history.HistoryMapper
import ua.acclorite.book_story.domain.model.history.History
import ua.acclorite.book_story.domain.repository.HistoryRepository
import org.dueattendant149.bookshelf.data.local.room.BookDatabase
import org.dueattendant149.bookshelf.data.mapper.history.HistoryMapper
import org.dueattendant149.bookshelf.domain.model.history.History
import org.dueattendant149.bookshelf.domain.repository.HistoryRepository
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.repository
package org.dueattendant149.bookshelf.data.repository
import android.app.Application
import android.content.Intent
import androidx.core.net.toUri
import ua.acclorite.book_story.domain.repository.PermissionRepository
import org.dueattendant149.bookshelf.domain.repository.PermissionRepository
import javax.inject.Inject
import javax.inject.Singleton

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.service
package org.dueattendant149.bookshelf.data.service
import android.app.Application
import android.graphics.Bitmap
@ -13,8 +13,8 @@ import android.net.Uri
import androidx.core.net.toFile
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import ua.acclorite.book_story.core.CoverImage
import ua.acclorite.book_story.domain.service.CoverImageHandler
import org.dueattendant149.bookshelf.core.CoverImage
import org.dueattendant149.bookshelf.domain.service.CoverImageHandler
import java.io.BufferedOutputStream
import java.io.ByteArrayOutputStream
import java.io.File

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.service
package org.dueattendant149.bookshelf.data.service
import android.app.Application
import ua.acclorite.book_story.data.model.file.CachedFile
import ua.acclorite.book_story.data.model.file.CachedFileCompat
import ua.acclorite.book_story.domain.model.library.Book
import ua.acclorite.book_story.domain.service.FileProvider
import org.dueattendant149.bookshelf.data.model.file.CachedFile
import org.dueattendant149.bookshelf.data.model.file.CachedFileCompat
import org.dueattendant149.bookshelf.domain.model.library.Book
import org.dueattendant149.bookshelf.domain.service.FileProvider
import javax.inject.Inject
class FileProviderImpl @Inject constructor(

View file

@ -6,7 +6,7 @@
@file:Suppress("RemoveExplicitTypeArguments")
package ua.acclorite.book_story.data.settings
package org.dueattendant149.bookshelf.data.settings
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.booleanPreferencesKey
@ -21,30 +21,30 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import ua.acclorite.book_story.core.data.CoreData
import ua.acclorite.book_story.core.language.Language
import ua.acclorite.book_story.core.language.LanguageUtils
import ua.acclorite.book_story.core.log.logI
import ua.acclorite.book_story.data.local.data_store.DataStore
import ua.acclorite.book_story.data.settings.model.Setting
import ua.acclorite.book_story.presentation.browse.model.BrowseLayout
import ua.acclorite.book_story.presentation.browse.model.BrowseSortOrder
import ua.acclorite.book_story.presentation.library.model.LibraryLayout
import ua.acclorite.book_story.presentation.library.model.LibrarySortOrder
import ua.acclorite.book_story.presentation.library.model.LibraryTitlePosition
import ua.acclorite.book_story.presentation.reader.model.ReaderColorEffects
import ua.acclorite.book_story.presentation.reader.model.ReaderFontThickness
import ua.acclorite.book_story.presentation.reader.model.ReaderHorizontalGesture
import ua.acclorite.book_story.presentation.reader.model.ReaderProgressCount
import ua.acclorite.book_story.presentation.reader.model.ReaderScreenOrientation
import ua.acclorite.book_story.presentation.reader.model.ReaderTextAlignment
import ua.acclorite.book_story.ui.reader.data.ReaderData
import ua.acclorite.book_story.ui.reader.model.FontWithName
import ua.acclorite.book_story.ui.theme.model.DarkTheme
import ua.acclorite.book_story.ui.theme.model.HorizontalAlignment
import ua.acclorite.book_story.ui.theme.model.PureDark
import ua.acclorite.book_story.ui.theme.model.Theme
import ua.acclorite.book_story.ui.theme.model.ThemeContrast
import org.dueattendant149.bookshelf.core.data.CoreData
import org.dueattendant149.bookshelf.core.language.Language
import org.dueattendant149.bookshelf.core.language.LanguageUtils
import org.dueattendant149.bookshelf.core.log.logI
import org.dueattendant149.bookshelf.data.local.data_store.DataStore
import org.dueattendant149.bookshelf.data.settings.model.Setting
import org.dueattendant149.bookshelf.presentation.browse.model.BrowseLayout
import org.dueattendant149.bookshelf.presentation.browse.model.BrowseSortOrder
import org.dueattendant149.bookshelf.presentation.library.model.LibraryLayout
import org.dueattendant149.bookshelf.presentation.library.model.LibrarySortOrder
import org.dueattendant149.bookshelf.presentation.library.model.LibraryTitlePosition
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderColorEffects
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderFontThickness
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderHorizontalGesture
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderProgressCount
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderScreenOrientation
import org.dueattendant149.bookshelf.presentation.reader.model.ReaderTextAlignment
import org.dueattendant149.bookshelf.ui.reader.data.ReaderData
import org.dueattendant149.bookshelf.ui.reader.model.FontWithName
import org.dueattendant149.bookshelf.ui.theme.model.DarkTheme
import org.dueattendant149.bookshelf.ui.theme.model.HorizontalAlignment
import org.dueattendant149.bookshelf.ui.theme.model.PureDark
import org.dueattendant149.bookshelf.ui.theme.model.Theme
import org.dueattendant149.bookshelf.ui.theme.model.ThemeContrast
import java.util.Locale
import java.util.concurrent.atomic.AtomicInteger
import javax.inject.Inject

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.data.settings.model
package org.dueattendant149.bookshelf.data.settings.model
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.domain.model.file
package org.dueattendant149.bookshelf.domain.model.file
import androidx.compose.runtime.Immutable

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.domain.model.history
package org.dueattendant149.bookshelf.domain.model.history
import androidx.compose.runtime.Immutable
import ua.acclorite.book_story.domain.model.library.Book
import org.dueattendant149.bookshelf.domain.model.library.Book
@Immutable
data class History(

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.domain.model.library
package org.dueattendant149.bookshelf.domain.model.library
import android.net.Uri
import android.os.Parcelable
import androidx.compose.runtime.Immutable
import kotlinx.parcelize.Parcelize
import ua.acclorite.book_story.core.ui.UIText
import org.dueattendant149.bookshelf.core.ui.UIText
@Parcelize
@Immutable

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.domain.model.library
package org.dueattendant149.bookshelf.domain.model.library
import androidx.compose.runtime.Immutable
import ua.acclorite.book_story.presentation.library.model.LibrarySortOrder
import org.dueattendant149.bookshelf.presentation.library.model.LibrarySortOrder
@Immutable
data class Category(

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package ua.acclorite.book_story.domain.model.reader
package org.dueattendant149.bookshelf.domain.model.reader
import androidx.compose.runtime.Immutable
import androidx.compose.ui.graphics.Color

Some files were not shown because too many files have changed in this diff Show more