├── docs ├── CNAME └── script.js ├── src ├── linux │ ├── .gitignore │ ├── main.cc │ ├── runner │ │ ├── main.cc │ │ ├── my_application.h │ │ ├── CMakeLists.txt │ │ └── my_application.cc │ ├── my_application.h │ ├── flutter │ │ └── CMakeLists.txt │ └── my_application.cc ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-50x50@1x.png │ │ │ │ ├── Icon-App-50x50@2x.png │ │ │ │ ├── Icon-App-57x57@1x.png │ │ │ │ ├── Icon-App-57x57@2x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-72x72@1x.png │ │ │ │ ├── Icon-App-72x72@2x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ │ └── LaunchBackground.imageset │ │ │ │ ├── background.png │ │ │ │ ├── darkbackground.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── .gitignore ├── run.bat ├── macos │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ └── Flutter-Release.xcconfig │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ ├── app_icon_64.png │ │ │ │ ├── app_icon_1024.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Release.entitlements │ │ ├── DebugProfile.entitlements │ │ ├── MainFlutterWindow.swift │ │ └── Info.plist │ ├── .gitignore │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── RunnerTests │ │ └── RunnerTests.swift ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── splash │ │ └── img │ │ │ ├── dark-1x.png │ │ │ ├── dark-2x.png │ │ │ ├── dark-3x.png │ │ │ ├── dark-4x.png │ │ │ ├── light-1x.png │ │ │ ├── light-2x.png │ │ │ ├── light-3x.png │ │ │ └── light-4x.png │ ├── manifest.json │ └── index.html ├── assets │ ├── images │ │ └── app_icon_for_bar.png │ ├── launcher_icon │ │ ├── app_icon.png │ │ └── app_icon_foreground.png │ └── data │ │ ├── yerushalmi.json │ │ ├── tanach.json │ │ ├── shas.json │ │ ├── halakha.json │ │ └── mishna.json ├── windows │ ├── runner │ │ ├── resources │ │ │ └── app_icon.ico │ │ ├── resource.h │ │ ├── runner.exe.manifest │ │ ├── utils.h │ │ ├── flutter_window.h │ │ ├── main.cpp │ │ ├── CMakeLists.txt │ │ ├── utils.cpp │ │ ├── Runner.rc │ │ ├── flutter_window.cpp │ │ └── win32_window.h │ ├── .gitignore │ ├── CMakeLists.txt │ └── flutter │ │ └── CMakeLists.txt ├── android │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable-night │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── values │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── drawable-night-v21 │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ │ └── launcher_icon.xml │ │ │ │ │ ├── values-v31 │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── values-night-v31 │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── top │ │ │ │ │ │ └── zekal │ │ │ │ │ │ └── shamor_vezachor │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── build.gradle.kts │ │ └── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── build.gradle │ ├── build.gradle.kts │ └── settings.gradle ├── devtools_options.yaml ├── README.md ├── .gitignore ├── lib │ ├── widgets │ │ ├── hebrew_utils.dart │ │ └── completion_animation_overlay.dart │ ├── utils │ │ └── category_sorter.dart │ ├── models │ │ └── progress_model.dart │ ├── providers │ │ ├── theme_provider.dart │ │ └── data_provider.dart │ ├── screens │ │ └── main_layout_screen.dart │ └── services │ │ ├── data_loader_service.dart │ │ └── custom_book_service.dart ├── analysis_options.yaml ├── .metadata └── pubspec.yaml ├── .gitattributes ├── assets ├── icon.png ├── favicon.png └── screen.png ├── run-repomix.bat ├── delete-tag.bat ├── .vscode └── launch.json ├── LICENSE ├── .github └── workflows │ ├── windows-build.yml.txt │ ├── apk-build.yml.txt │ ├── flutter-build.yml │ └── build-and-release.yml.txt ├── scripts ├── converter.py ├── convert_rambam.py ├── convert_tanach.py └── convert_shas.py └── README.md /docs/CNAME: -------------------------------------------------------------------------------- 1 | shamor-zachor.ze-kal.top -------------------------------------------------------------------------------- /src/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /src/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /src/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /src/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | flutter run -d chrome --web-port 54862 -------------------------------------------------------------------------------- /src/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/assets/favicon.png -------------------------------------------------------------------------------- /assets/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/assets/screen.png -------------------------------------------------------------------------------- /src/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /src/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /src/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/favicon.png -------------------------------------------------------------------------------- /src/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/icons/Icon-192.png -------------------------------------------------------------------------------- /src/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/icons/Icon-512.png -------------------------------------------------------------------------------- /src/web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /src/web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /src/web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /src/web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /run-repomix.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | npx repomix "src\lib" --style markdown --remove-comments -i "assets/**" 4 | 5 | pause -------------------------------------------------------------------------------- /src/web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /src/web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /src/web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /src/web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /src/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /src/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /src/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /src/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /src/assets/images/app_icon_for_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/assets/images/app_icon_for_bar.png -------------------------------------------------------------------------------- /src/assets/launcher_icon/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/assets/launcher_icon/app_icon.png -------------------------------------------------------------------------------- /src/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /src/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /src/assets/launcher_icon/app_icon_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/assets/launcher_icon/app_icon_foreground.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-night/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-night/background.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFDBCF 4 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-night-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-night-v21/background.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /src/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx6G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | org.gradle.caching=true 5 | -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/HEAD/src/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png -------------------------------------------------------------------------------- /src/android/app/src/main/kotlin/top/zekal/shamor_vezachor/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package top.zekal.shamor_vezachor 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /src/devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /src/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /src/linux/runner/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /src/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip 6 | -------------------------------------------------------------------------------- /src/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /src/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-night/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable-night-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /src/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/linux/runner/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "darkbackground.png", 15 | "idiom" : "universal" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /delete-tag.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Prompt for tag name 3 | set /p TAG=Enter tag name to delete: 4 | 5 | rem Validate input 6 | if "%TAG%"=="" ( 7 | echo Error: no tag specified. 8 | exit /b 1 9 | ) 10 | 11 | rem Delete the local tag (force‑delete) 12 | echo Deleting local tag "%TAG%"... 13 | git tag -d "%TAG%" || echo Warning: local tag "%TAG%" may not exist. 14 | 15 | rem Delete the remote tag 16 | echo Deleting remote tag "%TAG%"... 17 | git push --delete origin "%TAG%" || echo Warning: remote deletion failed. 18 | 19 | echo. 20 | echo Tag "%TAG%" has been deleted (if it existed). 21 | pause 22 | -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | # shamor_vezachor 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /src/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() 9 | rootProject.layout.buildDirectory.value(newBuildDir) 10 | 11 | subprojects { 12 | val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) 13 | project.layout.buildDirectory.value(newSubprojectBuildDir) 14 | } 15 | subprojects { 16 | project.evaluationDependsOn(":app") 17 | } 18 | 19 | tasks.register("clean") { 20 | delete(rootProject.layout.buildDirectory) 21 | } 22 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Flutter: Launch app from src", 6 | "request": "launch", 7 | "type": "dart", 8 | "program": "lib/main.dart", 9 | "cwd": "${workspaceFolder}/src" 10 | }, 11 | { 12 | "name": "שמור וזכור (Android)", 13 | "request": "launch", 14 | "type": "dart", 15 | "program": "lib/main.dart", 16 | "cwd": "${workspaceFolder}/src", 17 | "env": { 18 | "JAVA_HOME": "C:\\Users\\me\\AppData\\Local\\Programs\\Eclipse Adoptium\\jdk-17.0.15.6-hotspot" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /src/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = shamor_vezachor 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.shamorVezachor 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /src/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /src/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /src/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.3.2" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /src/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shamor_vezachor", 3 | "short_name": "shamor_vezachor", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#FFDBCF", 7 | "theme_color": "#FFDBCF", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /src/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /src/linux/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} 10 | "main.cc" 11 | "my_application.cc" 12 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 13 | ) 14 | 15 | # Apply the standard set of build settings. This can be removed for applications 16 | # that need different build settings. 17 | apply_standard_settings(${BINARY_NAME}) 18 | 19 | # Add preprocessor definitions for the application ID. 20 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 21 | 22 | # Add dependency libraries. Add any application-specific dependencies here. 23 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 24 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 25 | 26 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 NHLOCAL 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values-night-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /src/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 11 | CreateAndAttachConsole(); 12 | } 13 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 14 | 15 | flutter::DartProject project(L"data"); 16 | 17 | std::vector command_line_arguments = 18 | GetCommandLineArguments(); 19 | 20 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 21 | 22 | FlutterWindow window(project); 23 | Win32Window::Point origin(10, 10); 24 | Win32Window::Size size(1280, 720); 25 | if (!window.Create(L"שמור וזכור", origin, size)) { 26 | return EXIT_FAILURE; 27 | } 28 | window.SetQuitOnClose(true); 29 | 30 | ::MSG msg; 31 | while (::GetMessage(&msg, nullptr, 0, 0)) { 32 | ::TranslateMessage(&msg); 33 | ::DispatchMessage(&msg); 34 | } 35 | 36 | ::CoUninitialize(); 37 | return EXIT_SUCCESS; 38 | } -------------------------------------------------------------------------------- /src/lib/widgets/hebrew_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:gematria/gematria.dart'; 2 | import 'package:kosher_dart/kosher_dart.dart'; 3 | 4 | class HebrewUtils { 5 | static String intToGematria(int number) { 6 | if (number <= 0) { 7 | return number.toString(); 8 | } 9 | // The gematria package handles all cases. We cast the result to a String. 10 | return Gematria().gematria(number) as String; 11 | } 12 | 13 | static String? getCompletionDateString(String? dateStrYYYYMMDD) { 14 | if (dateStrYYYYMMDD == null || dateStrYYYYMMDD.isEmpty) { 15 | return null; 16 | } 17 | 18 | try { 19 | final DateTime gregorianDate = DateTime.parse(dateStrYYYYMMDD); 20 | 21 | JewishDate hebrewDate = JewishDate.fromDateTime(gregorianDate); 22 | 23 | int dayInt = hebrewDate.getJewishDayOfMonth(); 24 | String dayGematria = HebrewUtils.intToGematria(dayInt); 25 | 26 | HebrewDateFormatter hdf = HebrewDateFormatter(); 27 | hdf.hebrewFormat = true; 28 | 29 | String monthName = hdf.formatMonth(hebrewDate); 30 | String yearHebrew = hdf.formatHebrewNumber(hebrewDate.getJewishYear()); 31 | 32 | return '$dayGematria $monthName $yearHebrew'; 33 | } catch (e) { 34 | print("Error in getCompletionDateString: $e"); 35 | return null; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /src/lib/utils/category_sorter.dart: -------------------------------------------------------------------------------- 1 | class CategorySorter { 2 | // כאן מגדירים את הסדר הרצוי של הקטגוריות. 3 | // ניתן לשנות את הרשימה הזו בקלות כדי להתאים את הסדר. 4 | static const List _desiredOrder = [ 5 | 'תנ"ך', 6 | 'משנה', 7 | 'תוספתא', 8 | 'תלמוד בבלי', 9 | 'תלמוד ירושלמי', 10 | 'מדרשי הלכה', 11 | 'מדרשי אגדה', 12 | 'ספרי זוהר', 13 | 'רמב"ם', 14 | 'ראשונים', 15 | 'הלכה', 16 | 'אחרונים', 17 | 'מוסר', 18 | 'חסידות', 19 | 'מחשבה', 20 | // הוסף לכאן עוד קטגוריות לפי הצורך 21 | ]; 22 | 23 | /// ממיין רשימה של קטגוריות לפי הסדר שהוגדר ב-_desiredOrder. 24 | /// קטגוריות שאינן ברשימה יופיעו בסוף, ממויינות לפי סדר א-ב. 25 | static List sort(List categories) { 26 | categories.sort((a, b) { 27 | final int indexA = _desiredOrder.indexOf(a); 28 | final int indexB = _desiredOrder.indexOf(b); 29 | 30 | if (indexA != -1 && indexB != -1) { 31 | // שתיהן קיימות ברשימה, נמיין לפי הסדר שהוגדר 32 | return indexA.compareTo(indexB); 33 | } else if (indexA != -1) { 34 | // רק A קיימת, אז היא קודמת 35 | return -1; 36 | } else if (indexB != -1) { 37 | // רק B קיימת, אז היא קודמת 38 | return 1; 39 | } else { 40 | // שתיהן לא קיימות ברשימה, נמיין לפי א-ב 41 | return a.compareTo(b); 42 | } 43 | }); 44 | return categories; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/android/app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.application") 3 | id("kotlin-android") 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id("dev.flutter.flutter-gradle-plugin") 6 | } 7 | 8 | android { 9 | namespace = "top.zekal.shamor_vezachor" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_11 15 | targetCompatibility = JavaVersion.VERSION_11 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_11.toString() 20 | } 21 | 22 | defaultConfig { 23 | applicationId = "top.zekal.shamor_vezachor" 24 | // You can update the following values to match your application needs. 25 | // For more information, see: https://flutter.dev/to/review-gradle-config. 26 | minSdk = flutter.minSdkVersion 27 | targetSdk = flutter.targetSdkVersion 28 | versionCode = flutter.versionCode 29 | versionName = flutter.versionName 30 | } 31 | 32 | buildTypes { 33 | release { 34 | // TODO: Add your own signing config for the release build. 35 | // Signing with the debug keys for now, so `flutter run --release` works. 36 | signingConfig = signingConfigs.getByName("debug") 37 | } 38 | } 39 | } 40 | 41 | flutter { 42 | source = "../.." 43 | } 44 | -------------------------------------------------------------------------------- /src/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /src/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /.github/workflows/windows-build.yml.txt: -------------------------------------------------------------------------------- 1 | name: Windows Build 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | # Allows you to run this workflow manually from the Actions tab of the repository 9 | workflow_dispatch: 10 | 11 | env: 12 | # https://flet.dev/docs/publish#versioning 13 | BUILD_NUMBER: 1 14 | BUILD_VERSION: 1.0.0 15 | PYTHON_VERSION: 3.12.2 16 | FLUTTER_VERSION: 3.27.0 17 | 18 | jobs: 19 | build: 20 | runs-on: windows-latest 21 | 22 | steps: 23 | - name: Checkout code 24 | uses: actions/checkout@v4 25 | 26 | - name: Setup Python ${{ env.PYTHON_VERSION }} 27 | uses: actions/setup-python@v5 28 | with: 29 | python-version: ${{ env.PYTHON_VERSION }} 30 | 31 | - name: Install Python Dependencies 32 | run: | 33 | python -m pip install --upgrade pip 34 | pip install -r requirements.txt 35 | 36 | - name: Setup Flutter ${{ env.FLUTTER_VERSION }} 37 | uses: subosito/flutter-action@v2 38 | with: 39 | flutter-version: ${{ env.FLUTTER_VERSION }} 40 | 41 | - name: Flet Build Windows 42 | run: | 43 | flutter config --no-analytics 44 | flet build windows --v --no-rich-output 45 | env: 46 | PYTHONIOENCODING: utf-8 47 | PYTHONUTF8: 1 48 | 49 | 50 | - name: Upload Windows Artifact 51 | uses: actions/upload-artifact@v4.3.4 52 | with: 53 | name: windows-build-artifact 54 | path: build/windows 55 | if-no-files-found: error 56 | overwrite: false 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/lib/models/progress_model.dart: -------------------------------------------------------------------------------- 1 | class PageProgress { 2 | bool learn; 3 | bool review1; 4 | bool review2; 5 | bool review3; 6 | 7 | PageProgress({ 8 | this.learn = false, 9 | this.review1 = false, 10 | this.review2 = false, 11 | this.review3 = false, 12 | }); 13 | 14 | Map toJson() => { 15 | 'learn': learn, 16 | 'review1': review1, 17 | 'review2': review2, 18 | 'review3': review3, 19 | }; 20 | 21 | factory PageProgress.fromJson(Map json) { 22 | return PageProgress( 23 | learn: json['learn'] ?? false, 24 | review1: json['review1'] ?? false, 25 | review2: json['review2'] ?? false, 26 | review3: json['review3'] ?? false, 27 | ); 28 | } 29 | 30 | bool get isEmpty => !learn && !review1 && !review2 && !review3; 31 | 32 | void setProperty(String propertyName, bool value) { 33 | switch (propertyName) { 34 | case 'learn': 35 | learn = value; 36 | break; 37 | case 'review1': 38 | review1 = value; 39 | break; 40 | case 'review2': 41 | review2 = value; 42 | break; 43 | case 'review3': 44 | review3 = value; 45 | break; 46 | default: 47 | break; 48 | } 49 | } 50 | 51 | bool getProperty(String propertyName) { 52 | switch (propertyName) { 53 | case 'learn': 54 | return learn; 55 | case 'review1': 56 | return review1; 57 | case 'review2': 58 | return review2; 59 | case 'review3': 60 | return review3; 61 | default: 62 | return false; 63 | } 64 | } 65 | } 66 | 67 | typedef FullProgressMap = Map>>; 68 | 69 | typedef CompletionDatesMap = Map>; 70 | -------------------------------------------------------------------------------- /src/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "b25305a8832cfc6ba632a7f87ad455e319dccce8" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 17 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 18 | - platform: android 19 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 20 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 21 | - platform: ios 22 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 23 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 24 | - platform: linux 25 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 26 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 27 | - platform: macos 28 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 29 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 30 | - platform: web 31 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 32 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 33 | - platform: windows 34 | create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 35 | base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /src/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | }, 6 | "images": [ 7 | { 8 | "size": "16x16", 9 | "idiom": "mac", 10 | "filename": "app_icon_16.png", 11 | "scale": "1x" 12 | }, 13 | { 14 | "size": "16x16", 15 | "idiom": "mac", 16 | "filename": "app_icon_32.png", 17 | "scale": "2x" 18 | }, 19 | { 20 | "size": "32x32", 21 | "idiom": "mac", 22 | "filename": "app_icon_32.png", 23 | "scale": "1x" 24 | }, 25 | { 26 | "size": "32x32", 27 | "idiom": "mac", 28 | "filename": "app_icon_64.png", 29 | "scale": "2x" 30 | }, 31 | { 32 | "size": "128x128", 33 | "idiom": "mac", 34 | "filename": "app_icon_128.png", 35 | "scale": "1x" 36 | }, 37 | { 38 | "size": "128x128", 39 | "idiom": "mac", 40 | "filename": "app_icon_256.png", 41 | "scale": "2x" 42 | }, 43 | { 44 | "size": "256x256", 45 | "idiom": "mac", 46 | "filename": "app_icon_256.png", 47 | "scale": "1x" 48 | }, 49 | { 50 | "size": "256x256", 51 | "idiom": "mac", 52 | "filename": "app_icon_512.png", 53 | "scale": "2x" 54 | }, 55 | { 56 | "size": "512x512", 57 | "idiom": "mac", 58 | "filename": "app_icon_512.png", 59 | "scale": "1x" 60 | }, 61 | { 62 | "size": "512x512", 63 | "idiom": "mac", 64 | "filename": "app_icon_1024.png", 65 | "scale": "2x" 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /src/lib/providers/theme_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | // Enum to represent the available theme modes 5 | enum ThemeModeOption { system, light, dark } 6 | 7 | class ThemeProvider with ChangeNotifier { 8 | static const String _themePreferenceKey = 'theme_mode'; 9 | ThemeModeOption _themeModeOption = 10 | ThemeModeOption.system; // Default to system theme 11 | 12 | ThemeProvider() { 13 | _loadThemePreference(); 14 | } 15 | 16 | ThemeMode get themeMode { 17 | switch (_themeModeOption) { 18 | case ThemeModeOption.light: 19 | return ThemeMode.light; 20 | case ThemeModeOption.dark: 21 | return ThemeMode.dark; 22 | case ThemeModeOption.system: 23 | return ThemeMode.system; 24 | } 25 | } 26 | 27 | ThemeModeOption get themeModeOption => _themeModeOption; 28 | 29 | // Load theme preference from SharedPreferences 30 | Future _loadThemePreference() async { 31 | final prefs = await SharedPreferences.getInstance(); 32 | final themeIndex = prefs.getInt(_themePreferenceKey); 33 | 34 | if (themeIndex != null && 35 | themeIndex >= 0 && 36 | themeIndex < ThemeModeOption.values.length) { 37 | _themeModeOption = ThemeModeOption.values[themeIndex]; 38 | } else { 39 | _themeModeOption = ThemeModeOption 40 | .system; // Default if nothing is stored or value is invalid 41 | } 42 | notifyListeners(); 43 | } 44 | 45 | // Save theme preference to SharedPreferences and notify listeners 46 | Future setThemeMode(ThemeModeOption themeModeOption) async { 47 | if (_themeModeOption == themeModeOption) return; 48 | 49 | _themeModeOption = themeModeOption; 50 | final prefs = await SharedPreferences.getInstance(); 51 | await prefs.setInt(_themePreferenceKey, _themeModeOption.index); 52 | notifyListeners(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Shamor Vezachor 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | shamor_vezachor 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | UIStatusBarHidden 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: shamor_vezachor 2 | description: "שמור וזכור: כלי יעיל ללומדי תורה למעקב מסודר אחר לימוד ספרי יסוד וניהול חזרות" 3 | publish_to: 'none' 4 | version: 0.9.1+5 5 | 6 | environment: 7 | sdk: ^3.5.4 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | flutter_localizations: 13 | sdk: flutter 14 | intl: 0.20.2 15 | provider: ^6.0.5 16 | shared_preferences: ^2.2.0 17 | path_provider: ^2.1.1 18 | uuid: ^4.5.1 19 | cupertino_icons: ^1.0.8 20 | kosher_dart: ^2.0.17 21 | confetti: ^0.8.0 22 | gematria: ^1.0.0+1 23 | file_picker: ^10.1.9 24 | 25 | dependency_overrides: 26 | intl: ^0.20.2 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | flutter_native_splash: ^2.4.0 32 | flutter_lints: ^6.0.0 33 | mockito: ^5.4.4 34 | build_runner: ^2.4.10 35 | flutter_launcher_icons: ^0.14.3 36 | pub_version_plus: ^3.0.0 37 | 38 | flutter_native_splash: 39 | color: "#FFDBCF" 40 | color_dark: "#FFDBCF" 41 | image: assets/launcher_icon/app_icon.png 42 | android: true 43 | ios: true 44 | web: true 45 | 46 | flutter_launcher_icons: 47 | # הגדרות כלליות 48 | android: true 49 | ios: true 50 | min_sdk_android: 21 51 | remove_alpha_ios: true 52 | 53 | image_path: "assets/launcher_icon/app_icon.png" 54 | 55 | adaptive_icon_background: "#FFDBCF" 56 | 57 | adaptive_icon_foreground: "assets/launcher_icon/app_icon_foreground.png" 58 | 59 | # הגדרות לפלטפורמות אחרות 60 | web: 61 | generate: true 62 | image_path: "assets/launcher_icon/app_icon.png" 63 | background_color: "#FFDBCF" 64 | theme_color: "#FFDBCF" 65 | windows: 66 | generate: true 67 | image_path: "assets/launcher_icon/app_icon.png" 68 | icon_size: 256 69 | macos: 70 | generate: true 71 | image_path: "assets/launcher_icon/app_icon.png" 72 | 73 | flutter: 74 | uses-material-design: true 75 | assets: 76 | - assets/data/ 77 | - assets/launcher_icon/ 78 | - assets/images/ -------------------------------------------------------------------------------- /src/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /src/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | import java.util.Properties 8 | import java.io.FileInputStream 9 | 10 | // ---- Load keystore properties from android/app/key.properties ---- 11 | def keystorePropertiesFile = file("key.properties") 12 | def keystoreProperties = new Properties() 13 | if (keystorePropertiesFile.exists()) { 14 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 15 | } else { 16 | throw new FileNotFoundException("Keystore properties file not found: ${keystorePropertiesFile.path}") 17 | } 18 | 19 | android { 20 | namespace = "top.zekal.shamor_vezachor" 21 | compileSdk = flutter.compileSdkVersion 22 | ndkVersion = flutter.ndkVersion 23 | 24 | compileOptions { 25 | sourceCompatibility JavaVersion.VERSION_1_8 26 | targetCompatibility JavaVersion.VERSION_1_8 27 | } 28 | 29 | kotlinOptions { 30 | jvmTarget = "1.8" 31 | } 32 | 33 | defaultConfig { 34 | applicationId "top.zekal.shamor_vezachor" 35 | minSdk flutter.minSdkVersion 36 | targetSdk flutter.targetSdkVersion 37 | versionCode flutter.versionCode 38 | versionName flutter.versionName 39 | } 40 | 41 | signingConfigs { 42 | release { 43 | // כיוון שקבצי ה-keystore נטענים בהצלחה, נגדיר את ה־storeFile וכד' 44 | storeFile file(keystoreProperties['storeFile']) 45 | storePassword keystoreProperties['storePassword'] 46 | keyAlias keystoreProperties['keyAlias'] 47 | keyPassword keystoreProperties['keyPassword'] 48 | } 49 | } 50 | 51 | buildTypes { 52 | release { 53 | signingConfig signingConfigs.release 54 | minifyEnabled false 55 | shrinkResources false 56 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 57 | } 58 | } 59 | } 60 | 61 | flutter { 62 | source "../.." 63 | } 64 | -------------------------------------------------------------------------------- /src/windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /src/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} -------------------------------------------------------------------------------- /.github/workflows/apk-build.yml.txt: -------------------------------------------------------------------------------- 1 | name: APK Build 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | 9 | # Allows you to run this workflow manually from the Actions tab of the repository 10 | workflow_dispatch: 11 | 12 | env: 13 | # https://flet.dev/docs/publish#versioning 14 | BUILD_NUMBER: 1 15 | BUILD_VERSION: 1.0.0 16 | PYTHON_VERSION: 3.12.2 17 | FLUTTER_VERSION: 3.27.0 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - name: Checkout code 25 | uses: actions/checkout@v4 26 | 27 | - name: Setup Python ${{ env.PYTHON_VERSION }} 28 | uses: actions/setup-python@v5 29 | with: 30 | python-version: ${{ env.PYTHON_VERSION }} 31 | 32 | - name: Install Python Dependencies 33 | run: | 34 | python -m pip install --upgrade pip 35 | pip install -r requirements.txt 36 | 37 | - name: Setup Flutter ${{ env.FLUTTER_VERSION }} 38 | uses: subosito/flutter-action@v2 39 | with: 40 | flutter-version: ${{ env.FLUTTER_VERSION }} 41 | 42 | - name: Setup Java JDK 43 | uses: actions/setup-java@v4.2.1 44 | with: 45 | distribution: 'temurin' # See https://github.com/marketplace/actions/setup-java-jdk#supported-distributions for available options 46 | java-version: '21' 47 | 48 | - name: Flet Build APK 49 | run: | 50 | flutter config --no-analytics # disable flutter analytics 51 | flet build apk -v # adapt the command to your needs - https://flet.dev/docs/publish 52 | 53 | - name: Upload APK Artifact 54 | uses: actions/upload-artifact@v4.3.4 # https://github.com/marketplace/actions/upload-a-build-artifact 55 | with: 56 | name: apk-build-artifact # the name of the artifact 57 | path: build/apk # location of Flet build output 58 | if-no-files-found: error # Fail the action with an error message if no files are found 59 | overwrite: false # If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist. 60 | 61 | -------------------------------------------------------------------------------- /src/windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | #define APSTUDIO_READONLY_SYMBOLS 4 | #include "winres.h" 5 | #undef APSTUDIO_READONLY_SYMBOLS 6 | 7 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 8 | LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT 9 | 10 | #ifdef APSTUDIO_INVOKED 11 | 1 TEXTINCLUDE 12 | BEGIN 13 | "resource.h\0" 14 | END 15 | 16 | 2 TEXTINCLUDE 17 | BEGIN 18 | "#include ""winres.h""\r\n" 19 | "\0" 20 | END 21 | 22 | 3 TEXTINCLUDE 23 | BEGIN 24 | "\r\n" 25 | "\0" 26 | END 27 | #endif 28 | 29 | IDI_APP_ICON ICON "resources\\app_icon.ico" 30 | 31 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 32 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 33 | #else 34 | #define VERSION_AS_NUMBER 1,0,0,0 35 | #endif 36 | 37 | #if defined(FLUTTER_VERSION) 38 | #define VERSION_AS_STRING FLUTTER_VERSION 39 | #else 40 | #define VERSION_AS_STRING "1.0.0" 41 | #endif 42 | 43 | VS_VERSION_INFO VERSIONINFO 44 | FILEVERSION VERSION_AS_NUMBER 45 | PRODUCTVERSION VERSION_AS_NUMBER 46 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 47 | #ifdef _DEBUG 48 | FILEFLAGS VS_FF_DEBUG 49 | #else 50 | FILEFLAGS 0x0L 51 | #endif 52 | FILEOS VOS__WINDOWS32 53 | FILETYPE VFT_APP 54 | FILESUBTYPE 0x0L 55 | BEGIN 56 | BLOCK "StringFileInfo" 57 | BEGIN 58 | BLOCK "040D04B0" // Hebrew (Israel), Unicode 59 | BEGIN 60 | VALUE "CompanyName", "ze-kal.top" "\0" 61 | VALUE "FileDescription", "שמור וזכור" "\0" 62 | VALUE "FileVersion", VERSION_AS_STRING "\0" 63 | VALUE "InternalName", "ShamorVezachor" "\0" 64 | VALUE "LegalCopyright", "כל הזכויות שמורות © 2025 ze-kal.top" "\0" 65 | VALUE "OriginalFilename", "ShamorVezachor.exe" "\0" 66 | VALUE "ProductName", "שמור וזכור" "\0" 67 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 68 | END 69 | END 70 | BLOCK "VarFileInfo" 71 | BEGIN 72 | VALUE "Translation", 0x040D, 1200 // Hebrew (Israel), Unicode (UTF-8) 73 | END 74 | END 75 | #endif 76 | #ifndef APSTUDIO_INVOKED 77 | #endif -------------------------------------------------------------------------------- /src/assets/data/yerushalmi.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "תלמוד ירושלמי", 3 | "content_type": "דף", 4 | "subcategories": [ 5 | { 6 | "name": "סדר זרעים", 7 | "content_type": "דף", 8 | "books": { 9 | "ברכות": { "pages": 68 }, 10 | "פאה": { "pages": 37 }, 11 | "דמאי": { "pages": 34 }, 12 | "כלאים": { "pages": 44 }, 13 | "שביעית": { "pages": 31 }, 14 | "תרומות": { "pages": 59 }, 15 | "מעשרות": { "pages": 26 }, 16 | "מעשר שני": { "pages": 33 }, 17 | "חלה": { "pages": 28 }, 18 | "ערלה": { "pages": 20 }, 19 | "ביכורים": { "pages": 13 } 20 | } 21 | }, 22 | { 23 | "name": "סדר מועד", 24 | "content_type": "דף", 25 | "books": { 26 | "שבת": { "pages": 92 }, 27 | "עירובין": { "pages": 65 }, 28 | "פסחים": { "pages": 71 }, 29 | "ביצה": { "pages": 22 }, 30 | "ראש השנה": { "pages": 22 }, 31 | "יומא": { "pages": 42 }, 32 | "סוכה": { "pages": 26 }, 33 | "תענית": { "pages": 26 }, 34 | "שקלים": { "pages": 33 }, 35 | "מגילה": { "pages": 34 }, 36 | "חגיגה": { "pages": 22 }, 37 | "מועד קטן": { "pages": 19 } 38 | } 39 | }, 40 | { 41 | "name": "סדר נשים", 42 | "content_type": "דף", 43 | "books": { 44 | "יבמות": { "pages": 85 }, 45 | "כתובות": { "pages": 72 }, 46 | "סוטה": { "pages": 47 }, 47 | "נדרים": { "pages": 40 }, 48 | "נזיר": { "pages": 47 }, 49 | "גיטין": { "pages": 54 }, 50 | "קידושין": { "pages": 48 } 51 | } 52 | }, 53 | { 54 | "name": "סדר נזיקין", 55 | "content_type": "דף", 56 | "books": { 57 | "בבא קמא": { "pages": 44 }, 58 | "בבא מציעא": { "pages": 37 }, 59 | "בבא בתרא": { "pages": 34 }, 60 | "שבועות": { "pages": 44 }, 61 | "מכות": { "pages": 9 }, 62 | "סנהדרין": { "pages": 57 }, 63 | "עבודה זרה": { "pages": 37 }, 64 | "הוריות": { "pages": 19 } 65 | } 66 | }, 67 | { 68 | "name": "סדר טהרות", 69 | "content_type": "דף", 70 | "books": { 71 | "נדה": { "pages": 13 } 72 | } 73 | } 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /src/windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /docs/script.js: -------------------------------------------------------------------------------- 1 | const GITHUB_OWNER = 'NHLOCAL'; 2 | const GITHUB_REPO = 'Shamor-Zachor'; 3 | const API_URL = `https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/releases/latest`; 4 | 5 | const versionWindowsEl = document.getElementById('version-windows'); 6 | const versionAndroidEl = document.getElementById('version-android'); 7 | const downloadWindowsBtn = document.getElementById('download-windows'); 8 | const downloadAndroidBtn = document.getElementById('download-android'); 9 | const errorMessageEl = document.getElementById('error-message'); 10 | 11 | async function fetchLatestRelease() { 12 | try { 13 | const response = await fetch(API_URL); 14 | if (!response.ok) { 15 | throw new Error(`GitHub API error: ${response.status}`); 16 | } 17 | const release = await response.json(); 18 | 19 | const tagName = release.tag_name; // e.g., "v0.9.0" 20 | const version = tagName.startsWith('v') ? tagName.substring(1) : tagName; // "0.9.0" 21 | 22 | const assets = release.assets; 23 | 24 | // --- Find assets --- 25 | const windowsAsset = assets.find(asset => asset.name.endsWith('-windows.zip')); 26 | const androidAsset = assets.find(asset => asset.name.endsWith('.apk')); 27 | 28 | // --- Update UI --- 29 | if (windowsAsset) { 30 | versionWindowsEl.textContent = `גרסה ${version}`; 31 | downloadWindowsBtn.href = windowsAsset.browser_download_url; 32 | // The line below was updated 33 | downloadWindowsBtn.innerHTML = ' הורדה'; 34 | downloadWindowsBtn.classList.remove('disabled'); 35 | } else { 36 | versionWindowsEl.textContent = 'לא נמצאה גרסה'; 37 | downloadWindowsBtn.textContent = 'לא זמין'; 38 | } 39 | 40 | if (androidAsset) { 41 | versionAndroidEl.textContent = `גרסה ${version}`; 42 | downloadAndroidBtn.href = androidAsset.browser_download_url; 43 | // The line below was updated 44 | downloadAndroidBtn.innerHTML = ' הורדה'; 45 | downloadAndroidBtn.classList.remove('disabled'); 46 | } else { 47 | versionAndroidEl.textContent = 'לא נמצאה גרסה'; 48 | downloadAndroidBtn.textContent = 'לא זמין'; 49 | } 50 | 51 | } catch (error) { 52 | console.error('Failed to fetch release info:', error); 53 | errorMessageEl.style.display = 'block'; 54 | document.getElementById('download-loader').style.display = 'none'; 55 | } 56 | } 57 | 58 | fetchLatestRelease(); -------------------------------------------------------------------------------- /src/assets/data/tanach.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "תנ\"ך", 3 | "content_type": "פרק", 4 | "subcategories": [ 5 | { 6 | "name": "תורה", 7 | "content_type": "פרק", 8 | "books": { 9 | "בראשית": { 10 | "pages": 50 11 | }, 12 | "שמות": { 13 | "pages": 40 14 | }, 15 | "ויקרא": { 16 | "pages": 27 17 | }, 18 | "במדבר": { 19 | "pages": 36 20 | }, 21 | "דברים": { 22 | "pages": 34 23 | } 24 | } 25 | }, 26 | { 27 | "name": "נביאים", 28 | "content_type": "פרק", 29 | "books": { 30 | "יהושע": { 31 | "pages": 24 32 | }, 33 | "שופטים": { 34 | "pages": 21 35 | }, 36 | "שמואל א": { 37 | "pages": 31 38 | }, 39 | "שמואל ב": { 40 | "pages": 24 41 | }, 42 | "מלכים א": { 43 | "pages": 22 44 | }, 45 | "מלכים ב": { 46 | "pages": 25 47 | }, 48 | "ישעיהו": { 49 | "pages": 66 50 | }, 51 | "ירמיהו": { 52 | "pages": 52 53 | }, 54 | "יחזקאל": { 55 | "pages": 48 56 | }, 57 | "הושע": { 58 | "pages": 14 59 | }, 60 | "יואל": { 61 | "pages": 4 62 | }, 63 | "עמוס": { 64 | "pages": 9 65 | }, 66 | "עובדיה": { 67 | "pages": 1 68 | }, 69 | "יונה": { 70 | "pages": 4 71 | }, 72 | "מיכה": { 73 | "pages": 7 74 | }, 75 | "נחום": { 76 | "pages": 3 77 | }, 78 | "חבקוק": { 79 | "pages": 3 80 | }, 81 | "צפניה": { 82 | "pages": 3 83 | }, 84 | "חגי": { 85 | "pages": 2 86 | }, 87 | "זכריה": { 88 | "pages": 14 89 | }, 90 | "מלאכי": { 91 | "pages": 3 92 | } 93 | } 94 | }, 95 | { 96 | "name": "כתובים", 97 | "content_type": "פרק", 98 | "books": { 99 | "תהילים": { 100 | "pages": 150 101 | }, 102 | "משלי": { 103 | "pages": 31 104 | }, 105 | "איוב": { 106 | "pages": 42 107 | }, 108 | "שיר השירים": { 109 | "pages": 8 110 | }, 111 | "רות": { 112 | "pages": 4 113 | }, 114 | "איכה": { 115 | "pages": 5 116 | }, 117 | "קהלת": { 118 | "pages": 12 119 | }, 120 | "אסתר": { 121 | "pages": 10 122 | }, 123 | "דניאל": { 124 | "pages": 12 125 | }, 126 | "עזרא": { 127 | "pages": 10 128 | }, 129 | "נחמיה": { 130 | "pages": 13 131 | }, 132 | "דברי הימים א": { 133 | "pages": 29 134 | }, 135 | "דברי הימים ב": { 136 | "pages": 36 137 | } 138 | } 139 | } 140 | ] 141 | } -------------------------------------------------------------------------------- /src/windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(shamor_vezachor LANGUAGES CXX) 3 | 4 | add_definitions(-DUNICODE -D_UNICODE) 5 | 6 | set(BINARY_NAME "ShamorVezachor") 7 | cmake_policy(VERSION 3.14...3.25) 8 | 9 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 10 | if(IS_MULTICONFIG) 11 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 12 | CACHE STRING "" FORCE) 13 | else() 14 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 15 | set(CMAKE_BUILD_TYPE "Debug" CACHE 16 | STRING "Flutter build mode" FORCE) 17 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 18 | "Debug" "Profile" "Release") 19 | endif() 20 | endif() 21 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 22 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 23 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 24 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 25 | 26 | add_definitions(-DUNICODE -D_UNICODE) 27 | 28 | function(APPLY_STANDARD_SETTINGS TARGET) 29 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 30 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 31 | target_compile_options(${TARGET} PRIVATE /EHsc) 32 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 33 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 34 | endfunction() 35 | 36 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 37 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 38 | add_subdirectory("runner") 39 | include(flutter/generated_plugins.cmake) 40 | 41 | set(BUILD_BUNDLE_DIR "$") 42 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 43 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 44 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 45 | endif() 46 | 47 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 48 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 49 | 50 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 51 | COMPONENT Runtime) 52 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 53 | COMPONENT Runtime) 54 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 55 | COMPONENT Runtime) 56 | 57 | if(PLUGIN_BUNDLED_LIBRARIES) 58 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 59 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 60 | COMPONENT Runtime) 61 | endif() 62 | 63 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") 64 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 65 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 66 | COMPONENT Runtime) 67 | 68 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 69 | install(CODE " 70 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 71 | " COMPONENT Runtime) 72 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 73 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 74 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 75 | CONFIGURATIONS Profile;Release 76 | COMPONENT Runtime) -------------------------------------------------------------------------------- /src/lib/screens/main_layout_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './tracking_screen.dart'; 3 | import './books_screen.dart'; 4 | import './settings_screen.dart'; // Assuming settings_screen.dart is in the same directory 5 | 6 | class MainLayoutScreen extends StatefulWidget { 7 | const MainLayoutScreen({super.key}); 8 | 9 | @override 10 | State createState() => _MainLayoutScreenState(); 11 | } 12 | 13 | class _MainLayoutScreenState extends State { 14 | int _selectedIndex = 0; 15 | 16 | static const List _widgetOptions = [ 17 | TrackingScreen(), 18 | BooksScreen(), 19 | SettingsScreen(), // New screen added 20 | ]; 21 | 22 | void _onItemTapped(int index) { 23 | setState(() { 24 | _selectedIndex = index; 25 | }); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | final Color appBarFgColor = Theme.of(context).appBarTheme.foregroundColor ?? 31 | const Color(0xFF8F4C33); 32 | final TextStyle? appBarTitleTextStyle = 33 | Theme.of(context).appBarTheme.titleTextStyle; 34 | 35 | return Directionality( 36 | textDirection: TextDirection.rtl, 37 | child: Scaffold( 38 | appBar: _selectedIndex != 2 39 | ? AppBar( 40 | title: Row( 41 | mainAxisAlignment: MainAxisAlignment.center, // ממורכז כבר 42 | children: [ 43 | ImageIcon( 44 | const AssetImage('assets/images/app_icon_for_bar.png'), 45 | color: appBarFgColor, 46 | size: 28, // הגדלתי קצת את האייקון 47 | ), 48 | const SizedBox(width: 8), 49 | Text('שמור וזכור', style: appBarTitleTextStyle), 50 | ], 51 | ), 52 | centerTitle: true, // מוודא שהכותרת ממורכזת 53 | ) 54 | : null, // אין AppBar במסך הגדרות 55 | body: IndexedStack( 56 | // Padding הוסר מכאן ויושם בתוך המסכים עצמם 57 | index: _selectedIndex, 58 | children: _widgetOptions, 59 | ), 60 | bottomNavigationBar: Material( 61 | child: NavigationBar( 62 | selectedIndex: _selectedIndex, 63 | onDestinationSelected: _onItemTapped, 64 | destinations: const [ 65 | NavigationDestination( 66 | icon: Icon(Icons.timeline_outlined), 67 | selectedIcon: Icon(Icons.timeline), 68 | label: 'מעקב', 69 | ), 70 | NavigationDestination( 71 | icon: Icon(Icons.menu_book_outlined), 72 | selectedIcon: Icon(Icons.menu_book), 73 | label: 'ספרים', 74 | ), 75 | NavigationDestination( 76 | // New destination added 77 | icon: Icon(Icons.settings_outlined), 78 | selectedIcon: Icon(Icons.settings), 79 | label: 'הגדרות', 80 | ), 81 | ], 82 | ), 83 | ), 84 | ), 85 | ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /scripts/converter.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | def convert_analysis_to_structure(source_file_path, target_file_path): 4 | """ 5 | Converts a JSON file from the 'analysis' format to the 'structured' format. 6 | 7 | Args: 8 | source_file_path (str): The path to the input JSON file (e.g., 'משנה ברורה_analysis.json'). 9 | target_file_path (str): The path to save the output JSON file. 10 | """ 11 | try: 12 | # Step 1: Read the source JSON file with UTF-8 encoding 13 | with open(source_file_path, 'r', encoding='utf-8') as f: 14 | source_data = json.load(f) 15 | 16 | books_data = source_data.get("books_data", {}) 17 | if not books_data: 18 | print("Warning: No 'books_data' found in the source file.") 19 | return 20 | 21 | # Determine the content type from the first book, default to 'פרק' 22 | first_book_info = next(iter(books_data.values()), {}) 23 | content_type = first_book_info.get("division_type", "פרק") 24 | 25 | # Step 2: Build the basic structure of the target JSON 26 | target_data = { 27 | "name": source_data.get("collection_name", "N/A"), 28 | "content_type": content_type, 29 | "subcategories": [ 30 | { 31 | "name": "ספרים", # Generic subcategory name 32 | "content_type": content_type, 33 | "books": {} 34 | } 35 | ] 36 | } 37 | 38 | # Step 3: Iterate through each book in the source data 39 | for book_name, book_info in books_data.items(): 40 | # Create a single part for the book 41 | part = { 42 | "name": book_name, # Use the book's name for the part name 43 | "start": 1, 44 | "end": book_info.get("last_identifier_gematria", 0) 45 | } 46 | 47 | # Add 'exclude' field only if 'missing_divisions' exists and is not empty 48 | missing_divisions = book_info.get("missing_divisions") 49 | if missing_divisions: 50 | part["exclude"] = missing_divisions 51 | 52 | # Add the book with its single part to the 'books' dictionary 53 | target_data["subcategories"][0]["books"][book_name] = { 54 | "parts": [part] 55 | } 56 | 57 | # Step 4: Write the new structure to the target file 58 | with open(target_file_path, 'w', encoding='utf-8') as f: 59 | # ensure_ascii=False for correct Hebrew output, indent for readability 60 | json.dump(target_data, f, ensure_ascii=False, indent=4) 61 | 62 | print(f"Successfully converted '{source_file_path}' to '{target_file_path}'") 63 | 64 | except FileNotFoundError: 65 | print(f"Error: The file '{source_file_path}' was not found.") 66 | except json.JSONDecodeError: 67 | print(f"Error: The file '{source_file_path}' is not a valid JSON file.") 68 | except Exception as e: 69 | print(f"An unexpected error occurred: {e}") 70 | 71 | 72 | # --- Usage Example --- 73 | 74 | # Define the input and output file names 75 | source_file = "משנה ברורה_analysis.json" 76 | output_file = "mishna_berura_structured.json" 77 | 78 | # Run the conversion 79 | convert_analysis_to_structure(source_file, output_file) -------------------------------------------------------------------------------- /src/lib/services/data_loader_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:flutter/services.dart' show rootBundle; 3 | import 'package:path/path.dart' as p; 4 | import '../models/book_model.dart'; 5 | import './custom_book_service.dart'; 6 | 7 | class DataLoaderService { 8 | Map? _cachedData; 9 | 10 | void clearCache() { 11 | _cachedData = null; 12 | } 13 | 14 | Future> loadData() async { 15 | final customBookService = CustomBookService(); 16 | if (_cachedData != null) { 17 | return _cachedData!; 18 | } 19 | 20 | final manifestContent = await rootBundle.loadString('AssetManifest.json'); 21 | final Map manifestMap = json.decode(manifestContent); 22 | 23 | final List jsonFilesPaths = manifestMap.keys 24 | .where((String key) => 25 | key.startsWith('assets/data/') && key.endsWith('.json')) 26 | .toList(); 27 | 28 | Map combinedData = {}; 29 | 30 | for (String path in jsonFilesPaths) { 31 | try { 32 | final String jsonString = await rootBundle.loadString(path); 33 | final Map jsonData = json.decode(jsonString); 34 | 35 | if (jsonData['name'] == null || 36 | jsonData['name'] is! String || 37 | jsonData['content_type'] == null || 38 | jsonData['content_type'] is! String || 39 | (jsonData['data'] == null && 40 | jsonData['books'] == null && 41 | jsonData['subcategories'] == null) || 42 | (jsonData['data'] != null && jsonData['data'] is! Map) || 43 | (jsonData['books'] != null && jsonData['books'] is! Map) || 44 | (jsonData['subcategories'] != null && 45 | jsonData['subcategories'] is! List)) { 46 | print( 47 | "Skipping invalid JSON file (missing name, content_type, or any data/books/subcategories, or invalid types): $path"); 48 | continue; 49 | } 50 | 51 | String fileName = p.basename(path); 52 | BookCategory category = BookCategory.fromJson(jsonData, fileName); 53 | combinedData[category.name] = category; 54 | } catch (e) { 55 | print("Error loading or parsing $path: $e"); 56 | } 57 | } 58 | 59 | final List customBooksList = 60 | await customBookService.loadCustomBooks(); 61 | for (final customBook in customBooksList) { 62 | final bookDetails = BookDetails.fromJson( 63 | {'pages': customBook.pages}, 64 | contentType: customBook.contentType, 65 | isCustom: true, 66 | id: customBook.id, 67 | ); 68 | 69 | if (combinedData.containsKey(customBook.categoryName)) { 70 | combinedData[customBook.categoryName]!.books[customBook.bookName] = 71 | bookDetails; 72 | } else { 73 | combinedData[customBook.categoryName] = BookCategory( 74 | name: customBook.categoryName, 75 | contentType: customBook.contentType, 76 | books: {customBook.bookName: bookDetails}, 77 | defaultStartPage: customBook.contentType == "דף" ? 2 : 1, 78 | isCustom: true, 79 | sourceFile: "custom_books.json", 80 | ); 81 | } 82 | } 83 | 84 | _cachedData = combinedData; 85 | return combinedData; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/assets/data/shas.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "תלמוד בבלי", 3 | "content_type": "דף", 4 | "subcategories": [ 5 | { 6 | "name": "סדר זרעים", 7 | "content_type": "דף", 8 | "books": { 9 | "ברכות": { 10 | "pages": 62.5 11 | } 12 | } 13 | }, 14 | { 15 | "name": "סדר מועד", 16 | "content_type": "דף", 17 | "books": { 18 | "שבת": { 19 | "pages": 156.0 20 | }, 21 | "עירובין": { 22 | "pages": 103.5 23 | }, 24 | "פסחים": { 25 | "pages": 120.0 26 | }, 27 | "יומא": { 28 | "pages": 86.5 29 | }, 30 | "סוכה": { 31 | "pages": 55.0 32 | }, 33 | "ביצה": { 34 | "pages": 39.0 35 | }, 36 | "ראש השנה": { 37 | "pages": 33.5 38 | }, 39 | "תענית": { 40 | "pages": 29.5 41 | }, 42 | "מגילה": { 43 | "pages": 30.5 44 | }, 45 | "מועד קטן": { 46 | "pages": 27.5 47 | }, 48 | "חגיגה": { 49 | "pages": 25.5 50 | } 51 | } 52 | }, 53 | { 54 | "name": "סדר נשים", 55 | "content_type": "דף", 56 | "books": { 57 | "יבמות": { 58 | "pages": 121.0 59 | }, 60 | "כתובות": { 61 | "pages": 111.0 62 | }, 63 | "נדרים": { 64 | "pages": 90.0 65 | }, 66 | "נזיר": { 67 | "pages": 64.5 68 | }, 69 | "סוטה": { 70 | "pages": 48.0 71 | }, 72 | "גיטין": { 73 | "pages": 89.0 74 | }, 75 | "קידושין": { 76 | "pages": 81.0 77 | } 78 | } 79 | }, 80 | { 81 | "name": "סדר נזיקין", 82 | "content_type": "דף", 83 | "books": { 84 | "בבא קמא": { 85 | "pages": 118.0 86 | }, 87 | "בבא מציעא": { 88 | "pages": 117.5 89 | }, 90 | "בבא בתרא": { 91 | "pages": 175.0 92 | }, 93 | "סנהדרין": { 94 | "pages": 112.0 95 | }, 96 | "מכות": { 97 | "pages": 23.0 98 | }, 99 | "שבועות": { 100 | "pages": 48.0 101 | }, 102 | "עבודה זרה": { 103 | "pages": 75.0 104 | }, 105 | "הוריות": { 106 | "pages": 12.5 107 | } 108 | } 109 | }, 110 | { 111 | "name": "סדר קדשים", 112 | "content_type": "דף", 113 | "books": { 114 | "זבחים": { 115 | "pages": 119.0 116 | }, 117 | "מנחות": { 118 | "pages": 108.5 119 | }, 120 | "חולין": { 121 | "pages": 140.5 122 | }, 123 | "בכורות": { 124 | "pages": 59.5 125 | }, 126 | "ערכין": { 127 | "pages": 32.5 128 | }, 129 | "תמורה": { 130 | "pages": 32.5 131 | }, 132 | "כריתות": { 133 | "pages": 27.0 134 | }, 135 | "מעילה": { 136 | "pages": 20.5 137 | }, 138 | "תמיד": { 139 | "pages": 8.5 140 | } 141 | } 142 | }, 143 | { 144 | "name": "סדר טהרות", 145 | "content_type": "דף", 146 | "books": { 147 | "נדה": { 148 | "pages": 71.5 149 | } 150 | } 151 | } 152 | ] 153 | } -------------------------------------------------------------------------------- /src/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | shamor_vezachor 31 | 32 | 33 | 34 | 35 | 99 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /src/windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /src/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /src/assets/data/halakha.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "הלכה", 3 | "content_type": "סימן", 4 | "subcategories": [ 5 | { 6 | "name": "ארבע טורים", 7 | "content_type": "סימן", 8 | "books": { 9 | "טור אורח חיים": { "pages": 697 }, 10 | "טור יורה דעה": { "pages": 403, "exclude": [169]}, 11 | "טור אבן העזר": { "pages": 178 }, 12 | "טור חושן משפט": { "pages": 426 } 13 | } 14 | }, 15 | { 16 | "name": "שולחן ערוך", 17 | "content_type": "סימן", 18 | "books": { 19 | "שולחן ערוך אורח חיים": { "pages": 697 }, 20 | "שולחן ערוך יורה דעה": { "pages": 403 }, 21 | "שולחן ערוך אבן העזר": { "pages": 178 }, 22 | "שולחן ערוך חושן משפט": { "pages": 427 } 23 | } 24 | }, 25 | { 26 | "name": "משנה ברורה", 27 | "content_type": "סימן", 28 | "books": { 29 | "משנה ברורה": { 30 | "parts": [ 31 | { 32 | "name": "חלק א'", 33 | "start": 1, 34 | "end": 127 35 | }, 36 | { 37 | "name": "חלק ב'", 38 | "start": 128, 39 | "end": 241 40 | }, 41 | { 42 | "name": "חלק ג'", 43 | "start": 242, 44 | "end": 344 45 | }, 46 | { 47 | "name": "חלק ד'", 48 | "start": 345, 49 | "end": 428 50 | }, 51 | { 52 | "name": "חלק ה'", 53 | "start": 429, 54 | "end": 529 55 | }, 56 | { 57 | "name": "חלק ו'", 58 | "start": 530, 59 | "end": 697 60 | } 61 | ] 62 | }, 63 | "ביאור הלכה": { 64 | "parts": [ 65 | { 66 | "name": "חלק א'", 67 | "start": 1, 68 | "end": 127, 69 | "exclude": [ 5, 6, 17, 18, 19, 23, 24, 28, 29, 35, 36, 48, 50, 56, 68, 86, 93, 96, 97, 99, 100, 105, 112, 115, 116, 118, 120 ] 70 | }, 71 | { 72 | "name": "חלק ב'", 73 | "start": 128, 74 | "end": 241, 75 | "exclude": [ 129, 133, 134, 138, 145, 148, 149, 157, 166, 175, 180, 182, 189, 196, 198, 207, 220, 224, 226, 227, 230, 234, 236, 237, 238, 241 ] 76 | }, 77 | { 78 | "name": "חלק ג'", 79 | "start": 242, 80 | "end": 344, 81 | "exclude": [ 255, 269, 270, 274, 283, 290, 292, 297, 300, 327 ] 82 | }, 83 | { 84 | "name": "חלק ד'", 85 | "start": 345, 86 | "end": 428, 87 | "exclude": [ 378, 379, 388, 390, 395, 396, 400, 407, 412, 419, 420, 421, 424, 425 ] 88 | }, 89 | { 90 | "name": "חלק ה'", 91 | "start": 429, 92 | "end": 529, 93 | "exclude": [ 432, 435, 438, 439, 449, 456, 458, 464, 469, 470, 474, 476, 480, 486, 488, 491, 492, 496, 508, 513, 516, 517, 520, 521, 522, 524, 525, 528 ] 94 | }, 95 | { 96 | "name": "חלק ו'", 97 | "start": 530, 98 | "end": 697, 99 | "exclude": [ 534, 535, 555, 556, 561, 563, 564, 569, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 589, 591, 592, 594, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 607, 609, 610, 615, 619, 620, 621, 622, 623, 625, 636, 642, 644, 647, 650, 653, 654, 655, 659, 660, 661, 662, 663, 666, 668, 674, 678, 679, 680, 682, 683, 685, 686, 687 ] 100 | } 101 | ] 102 | } 103 | } 104 | } 105 | ] 106 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # שמור וזכור - מערכת מעקב לימוד 📖 2 | 3 | **שמור וזכור** הוא כלי ייחודי שנועד לסייע ללומדי תורה במעקב אחר לימוד ספרי יסוד תורניים בצורה מסודרת וברורה. היישום מאפשר לעקוב בצורה יעילה אחר ההתקדמות בלימוד, כולל תמיכה במגוון ספרים מארון הספרים היהודי. הממשק פשוט לשימוש וכולל אפשרויות המקלות על המעקב והניהול של תהליך הלימוד. 4 | 5 | ## 📸 תמונת מסך 6 | 7 | ![תמונת מסך - עמוד מעקב](https://raw.githubusercontent.com/NHLOCAL/Shamor-Zachor/refs/heads/dev/assets/screen.png?raw=true) 8 | 9 | ## ✨ מאפייני היישום 10 | 11 | - **מעקב אחר ספרי יסוד**: אפשרות לעקוב אחר הלימוד במגוון רחב של ספרים תורניים מרכזיים. 12 | - **מעקב התקדמות מפורט**: ניתן לסמן לא רק את הלימוד הראשוני אלא גם שלוש חזרות נוספות עבור כל דף/עמוד/פרק. 13 | - **תצוגת מעקב מרכזית**: עמוד "מעקב" ייעודי המציג פריטים הנמצאים "בתהליך" או שכבר "סיימתי". 14 | - כולל סרגל התקדמות ויזואלי עם אחוזים. 15 | - מציג את המיקום האחרון אליו הגעת או את תאריך הסיום העברי. 16 | - **סימון השלמה ברור**: אייקון ✔️ מסמן השלמה של ספר/מסכת בתצוגת ה"ספרים". 17 | - **סימון כולל**: אפשרות לסמן את כל הדפים או הפרקים בספר/מסכת כנלמדו בלחיצה אחת. 18 | - **חיפוש מהיר**: פונקציית חיפוש במסך ה"ספרים" לאיתור מהיר של ספר או מסכת. 19 | - **שמירת נתונים מקומית**: ההתקדמות נשמרת אוטומטית באחסון המקומי של היישום במכשירך. 20 | - **ממשק משתמש ידידותי**: ניווט קל בין מסך "מעקב" למסך "ספרים" בעזרת סרגל ניווט תחתון, ותצוגת רשת נוחה במסך הספרים. 21 | 22 | ## 🚀 הורדה והפעלה 23 | 24 | הדרך הקלה ביותר להשתמש ב"שמור וזכור" היא להוריד את גרסת ההפצה העדכנית ביותר מהקישור הבא. היישום זמין למגוון מערכות הפעלה הודות לפיתוח באמצעות Flutter. 25 | 26 | 🔗 [**הורד את הגרסה האחרונה מכאן**](https://github.com/NHLOCAL/Shamor-Zachor/releases/latest) 27 | 28 | הורידו את קובץ ההתקנה המתאים למערכת ההפעלה שלכם (לדוגמה, **APK** עבור **Android**, קובץ התקנה עבור **Windows**, וכו') והפעילו/התקינו אותו בהתאם להוראות הפלטפורמה. 29 | 30 | ## 🔍 אופן השימוש 31 | 32 | 1. **ניווט**: השתמשו בסרגל הניווט התחתון כדי לעבור בין מסך ה"מעקב" (סקירה כללית) למסך ה"ספרים" (בחירת לימוד). 33 | 2. **בחירת ספר**: במסך ה"ספרים", בחרו את הקטגוריה (תנ"ך, ש"ס וכו') ואז את הספר/מסכת שברצונכם ללמוד או לעדכן. ניתן להשתמש בשורת החיפוש לאיתור מהיר. 34 | 3. **מעקב אחר ההתקדמות**: במסך הספר/מסכת שנבחר, סמנו את תיבות הסימון המתאימות עבור כל דף/עמוד/פרק: 35 | - התיבה הראשונה מייצגת **לימוד ראשוני**. 36 | - שלוש התיבות הבאות מייצגות **חזרות נוספות**. 37 | 4. **צפייה בהתקדמות**: חזרו למסך ה"מעקב" כדי לראות סקירה כללית של הפריטים בתהליך ואלו שהושלמו, כולל סרגל התקדמות ותאריך סיום (אם רלוונטי). 38 | 5. **שמירה אוטומטית**: כל שינוי נשמר באופן אוטומטי באחסון המקומי של המכשיר. 39 | 40 | ## 📂 מבנה הקבצים (למפתחים) 41 | 42 | הפרויקט פותח באמצעות Flutter ומאורגן במבנה הסטנדרטי של פרויקטי Flutter: 43 | 44 | - **`src/lib/main.dart`**: נקודת הכניסה הראשית של היישום. מכיל את הגדרות האפליקציה והניווט הראשי. 45 | - **`src/lib/models/`**: מכיל את מודלי הנתונים של האפליקציה (למשל, `book_model.dart`, `progress_model.dart`). 46 | - **`src/lib/providers/`**: מכיל את ספקי המצב (Providers) לניהול מצב האפליקציה (למשל, `data_provider.dart`, `progress_provider.dart`). 47 | - **`src/lib/screens/`**: מכיל את קבצי הווידג'טים המייצגים את המסכים השונים באפליקציה (למשל, `books_screen.dart`, `tracking_screen.dart`). 48 | - **`src/lib/services/`**: מכיל לוגיקה עסקית ושירותים, כגון טעינת נתונים (`data_loader_service.dart`) וניהול התקדמות (`progress_service.dart`). 49 | - **`src/lib/widgets/`**: מכיל ווידג'טים לשימוש חוזר ברחבי האפליקציה. 50 | - **`src/pubspec.yaml`**: קובץ התצורה של הפרויקט, המגדיר את התלויות (dependencies), נכסים (assets) ופרטים נוספים של הפרויקט. 51 | - **`src/assets/data/`**: תיקייה המכילה קבצי JSON עם המבנה והמידע עבור כל קטגוריית לימוד (תנ"ך, תלמוד בבלי וכו'). 52 | - **`src/assets/images/`**: תיקייה המכילה קבצי תמונות ואייקונים המשמשים באפליקציה. 53 | - **`legacy/`**: תיקייה המכילה את קוד המקור של הגרסה הקודמת של היישום, שהייתה מבוססת Python. 54 | 55 | ## 📋 דרישות מערכת (להרצה מקוד המקור) 56 | 57 | - [Flutter SDK](https://flutter.dev/docs/get-started/install) (יש לוודא התקנה תקינה וזמינות הפקודה `flutter` בשורת הפקודה) 58 | - סביבת פיתוח מתאימה לפלטפורמה הרצויה (למשל, Android Studio עבור פיתוח לאנדרואיד, Xcode עבור iOS, וכו'). 59 | 60 | לפני ההרצה הראשונה, יש למשוך את התלויות של הפרויקט. בתיקיית השורש של הפרויקט (`src/`), הריצו: 61 | ```bash 62 | flutter pub get 63 | ``` 64 | לאחר מכן, ניתן להריץ את האפליקציה באמצעות הפקודה הבאה (מומלץ להריץ מתוך תיקיית `src/`): 65 | ```bash 66 | flutter run 67 | ``` 68 | האפליקציה תרוץ על המכשיר/אמולטור המחובר או על דפדפן האינטרנט, בהתאם להגדרות. 69 | 70 | ## 🤝 תרומה ושיפור 71 | 72 | נשמח לקבל תרומות קוד ושיפורים! אם ברצונכם לעזור ולשפר את היישום, אתם מוזמנים לשבט את הריפו, לבצע את השיפורים הנדרשים, ולפתוח [Pull Request](https://github.com/NHLOCAL/Shamor-Zachor/pulls). לשאלות ותקלות, פתחו [דיווח בעיה (Issue)](https://github.com/NHLOCAL/Shamor-Zachor/issues) בגיטהאב. 73 | -------------------------------------------------------------------------------- /src/lib/widgets/completion_animation_overlay.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:confetti/confetti.dart'; 4 | 5 | class CompletionAnimationOverlay extends StatefulWidget { 6 | final String message; 7 | final VoidCallback onDismiss; 8 | 9 | const CompletionAnimationOverlay({ 10 | super.key, 11 | required this.message, 12 | required this.onDismiss, 13 | }); 14 | 15 | static void show(BuildContext context, String message) { 16 | OverlayEntry? overlayEntry; 17 | 18 | void removeOverlay() { 19 | if (overlayEntry != null) { 20 | overlayEntry!.remove(); 21 | overlayEntry = null; 22 | } 23 | } 24 | 25 | overlayEntry = OverlayEntry( 26 | builder: (context) => CompletionAnimationOverlay( 27 | message: message, 28 | onDismiss: removeOverlay, 29 | ), 30 | ); 31 | // The fix is here: using the '!' operator to assert that overlayEntry is not null. 32 | Overlay.of(context).insert(overlayEntry!); 33 | } 34 | 35 | @override 36 | State createState() => 37 | _CompletionAnimationOverlayState(); 38 | } 39 | 40 | class _CompletionAnimationOverlayState 41 | extends State { 42 | late ConfettiController _confettiController; 43 | Timer? _dismissTimer; 44 | 45 | @override 46 | void initState() { 47 | super.initState(); 48 | _confettiController = 49 | ConfettiController(duration: const Duration(seconds: 5)); 50 | _confettiController.play(); 51 | 52 | _dismissTimer = Timer(const Duration(seconds: 7), () { 53 | if (mounted) { 54 | widget.onDismiss(); 55 | } 56 | }); 57 | } 58 | 59 | @override 60 | void dispose() { 61 | _confettiController.dispose(); 62 | _dismissTimer?.cancel(); 63 | super.dispose(); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | final theme = Theme.of(context); 69 | return Material( 70 | color: theme.colorScheme.scrim.withOpacity(0.5), 71 | child: Stack( 72 | alignment: Alignment.center, 73 | children: [ 74 | Align( 75 | alignment: Alignment.topCenter, 76 | child: ConfettiWidget( 77 | confettiController: _confettiController, 78 | blastDirectionality: BlastDirectionality.explosive, 79 | shouldLoop: false, 80 | numberOfParticles: 30, 81 | gravity: 0.2, 82 | emissionFrequency: 0.05, 83 | colors: [ 84 | theme.colorScheme.primary, 85 | theme.colorScheme.secondary, 86 | theme.colorScheme.secondaryContainer, 87 | theme.colorScheme.error, 88 | theme.colorScheme.primaryContainer 89 | ], 90 | ), 91 | ), 92 | Center( 93 | child: Container( 94 | padding: const EdgeInsets.all(24.0), 95 | decoration: BoxDecoration( 96 | color: Theme.of(context).cardColor, 97 | borderRadius: BorderRadius.circular(16.0), 98 | boxShadow: [ 99 | BoxShadow( 100 | color: theme.shadowColor.withOpacity(0.25), 101 | blurRadius: 10.0, 102 | offset: const Offset(0, 4), 103 | ), 104 | ], 105 | ), 106 | constraints: BoxConstraints( 107 | maxWidth: MediaQuery.of(context).size.width * 0.8, 108 | ), 109 | child: Column( 110 | mainAxisSize: MainAxisSize.min, 111 | children: [ 112 | Text( 113 | widget.message, 114 | textAlign: TextAlign.center, 115 | style: TextStyle( 116 | fontSize: 22, 117 | fontWeight: FontWeight.bold, 118 | color: Theme.of(context).textTheme.titleLarge?.color, 119 | ), 120 | ), 121 | const SizedBox(height: 20), 122 | ElevatedButton( 123 | style: ElevatedButton.styleFrom( 124 | backgroundColor: Theme.of(context).primaryColor, 125 | ), 126 | onPressed: widget.onDismiss, 127 | child: Text( 128 | 'אישור', 129 | style: TextStyle(color: theme.colorScheme.onPrimary), 130 | ), 131 | ) 132 | ], 133 | ), 134 | ), 135 | ), 136 | ], 137 | ), 138 | ); 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /scripts/convert_rambam.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | def create_mishneh_torah_json(input_dir, output_file): 5 | """ 6 | Scans a directory of Mishneh Torah analysis JSON files, consolidates them 7 | into a single structured JSON file, and ensures the Sefarim are in a 8 | predefined order. 9 | 10 | Args: 11 | input_dir (str): The path to the directory containing the source JSON files. 12 | output_file (str): The path where the final consolidated JSON will be saved. 13 | """ 14 | # Define the canonical order of the 14 books of Mishneh Torah 15 | SEFARIM_ORDER = [ 16 | "ספר המדע", "ספר אהבה", "ספר זמנים", "ספר נשים", 17 | "ספר קדושה", "ספר הפלאה", "ספר זרעים", "ספר עבודה", 18 | "ספר קרבנות", "ספר טהרה", "ספר נזיקין", "ספר קניין", 19 | "ספר משפטים", "ספר שופטים" 20 | ] 21 | 22 | # --- שלב 1: איסוף כל המידע מהקבצים --- 23 | collected_sefarim = {} 24 | print(f"שלב 1: מתחיל סריקה ואיסוף מידע מהתיקיה: {input_dir}") 25 | 26 | for filename in os.listdir(input_dir): 27 | if filename.endswith("_analysis.json"): 28 | file_path = os.path.join(input_dir, filename) 29 | 30 | try: 31 | with open(file_path, 'r', encoding='utf-8') as f: 32 | data = json.load(f) 33 | 34 | sefer_name = data.get("collection_name") 35 | hilchot_data = data.get("books_data") 36 | 37 | if not sefer_name or not hilchot_data: 38 | print(f" [אזהרה] קובץ {filename} חסר 'collection_name' או 'books_data'. מדלג.") 39 | continue 40 | 41 | print(f" מעבד את הקובץ עבור: {sefer_name}") 42 | 43 | parts_list = [] 44 | for full_hilchot_name, details in hilchot_data.items(): 45 | cleaned_name = full_hilchot_name.replace("משנה תורה, ", "").strip() 46 | chapter_count = details.get("count") 47 | 48 | if chapter_count is not None: 49 | parts_list.append({ 50 | "name": cleaned_name, 51 | "start": 1, 52 | "end": chapter_count 53 | }) 54 | 55 | # Store the processed data with the sefer name as the key 56 | collected_sefarim[sefer_name] = {"parts": parts_list} 57 | 58 | except Exception as e: 59 | print(f" [שגיאה] אירעה שגיאה בעיבוד הקובץ {filename}: {e}") 60 | 61 | # --- שלב 2: בניית מבנה ה-JSON הסופי לפי הסדר הרצוי --- 62 | print("\nשלב 2: מרכיב את קובץ הפלט הסופי לפי הסדר שהוגדר.") 63 | 64 | # Use a standard dict, as Python 3.7+ and json.dump preserve insertion order 65 | ordered_books_dict = {} 66 | 67 | found_sefarim_in_order = [] 68 | for sefer_name in SEFARIM_ORDER: 69 | if sefer_name in collected_sefarim: 70 | ordered_books_dict[sefer_name] = collected_sefarim[sefer_name] 71 | found_sefarim_in_order.append(sefer_name) 72 | else: 73 | print(f" [אזהרה] לא נמצא קובץ מתאים עבור '{sefer_name}' בתיקיית הקלט.") 74 | 75 | # Check for any found books that were not in the predefined order list 76 | collected_keys = set(collected_sefarim.keys()) 77 | ordered_keys = set(found_sefarim_in_order) 78 | extra_books = collected_keys - ordered_keys 79 | if extra_books: 80 | print(f" [אזהרה] נמצאו ספרים נוספים שאינם ברשימת הסדר: {', '.join(extra_books)}") 81 | for book in extra_books: 82 | ordered_books_dict[book] = collected_sefarim[book] 83 | 84 | # Construct the final data structure 85 | final_json_data = { 86 | "name": "רמב\"ם", 87 | "content_type": "פרק", 88 | "subcategories": [ 89 | { 90 | "name": "משנה תורה", 91 | "content_type": "פרק", 92 | "books": ordered_books_dict 93 | } 94 | ] 95 | } 96 | 97 | # --- שלב 3: שמירה לקובץ --- 98 | with open(output_file, 'w', encoding='utf-8') as f: 99 | json.dump(final_json_data, f, ensure_ascii=False, indent=2) 100 | 101 | print(f"\nהתהליך הושלם. המידע המאוחד והמסודר נשמר בקובץ: {output_file}") 102 | 103 | 104 | if __name__ == "__main__": 105 | # --- הגדרות --- 106 | # הגדר את שם תיקיית הקלט שבה נמצאים כל קובצי ה-JSON של ספרי הרמב"ם 107 | input_directory = "משנה תורה" 108 | 109 | # הגדר את שם קובץ הפלט 110 | output_filename = "mishneh_torah_complete_ordered.json" 111 | 112 | # ודא שתיקיית הקלט קיימת 113 | if not os.path.isdir(input_directory): 114 | print(f"שגיאה: תיקיית הקלט '{input_directory}' לא נמצאה.") 115 | print("אנא צור את התיקיה והנח בתוכה את קובצי ה-JSON של הרמב\"ם.") 116 | else: 117 | create_mishneh_torah_json(input_directory, output_filename) -------------------------------------------------------------------------------- /scripts/convert_tanach.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | def create_tanach_json(input_dir, output_file): 5 | """ 6 | Scans a directory of Tanach analysis JSON files (one for each main part 7 | like Torah, Nevi'im, etc.), consolidates them into a single structured 8 | JSON file, and ensures the canonical order of all books. 9 | 10 | Args: 11 | input_dir (str): The path to the directory containing the source JSON files. 12 | output_file (str): The path where the final consolidated JSON will be saved. 13 | """ 14 | # Define the canonical order of all parts and their books 15 | TANACH_ORDER = { 16 | "תורה": [ 17 | "בראשית", "שמות", "ויקרא", "במדבר", "דברים" 18 | ], 19 | "נביאים": [ 20 | "יהושע", "שופטים", "שמואל א", "שמואל ב", "מלכים א", "מלכים ב", 21 | "ישעיהו", "ירמיהו", "יחזקאל", "הושע", "יואל", "עמוס", "עובדיה", "יונה", "מיכה", "נחום", "חבקוק", "צפניה", "חגי", "זכריה", "מלאכי" 22 | ], 23 | "כתובים": [ 24 | "תהילים", "משלי", "איוב", "שיר השירים", "רות", "איכה", 25 | "קהלת", "אסתר", "דניאל", "עזרא", "נחמיה", "דברי הימים א", "דברי הימים ב" 26 | ] 27 | } 28 | 29 | # --- שלב 1: איסוף כל המידע מהקבצים --- 30 | collected_data = {} 31 | print(f"שלב 1: מתחיל סריקה ואיסוף מידע מהתיקיה: {input_dir}") 32 | 33 | for filename in os.listdir(input_dir): 34 | if filename.endswith("_analysis.json"): 35 | file_path = os.path.join(input_dir, filename) 36 | try: 37 | with open(file_path, 'r', encoding='utf-8') as f: 38 | data = json.load(f) 39 | 40 | category_name = data.get("collection_name") # e.g., "תורה" 41 | books_data = data.get("books_data") 42 | 43 | if not category_name or not books_data: 44 | print(f" [אזהרה] קובץ {filename} חסר מידע. מדלג.") 45 | continue 46 | 47 | print(f" מעבד את הקובץ עבור: {category_name}") 48 | 49 | collected_data[category_name] = {} 50 | for book_name, details in books_data.items(): 51 | chapter_count = details.get("count") 52 | if chapter_count is not None: 53 | # The key is already the clean book name 54 | collected_data[category_name][book_name.strip()] = chapter_count 55 | else: 56 | print(f" [אזהרה] לא נמצא 'count' עבור '{book_name}'.") 57 | 58 | except Exception as e: 59 | print(f" [שגיאה] אירעה שגיאה בעיבוד הקובץ {filename}: {e}") 60 | 61 | # --- שלב 2: בניית מבנה ה-JSON הסופי לפי הסדר שהוגדר --- 62 | print("\nשלב 2: מרכיב את קובץ הפלט הסופי לפי הסדר המלא.") 63 | 64 | final_json_data = { 65 | "name": "תנ\"ך", 66 | "content_type": "פרק", 67 | "subcategories": [] 68 | } 69 | 70 | # Iterate through the categories in the predefined order 71 | for category_name, books_in_order in TANACH_ORDER.items(): 72 | if category_name not in collected_data: 73 | print(f" [אזהרה] לא נמצא קובץ מתאים עבור '{category_name}'. מדלג על קטגוריה זו.") 74 | continue 75 | 76 | print(f" מרכיב את '{category_name}'...") 77 | 78 | ordered_books_dict = {} 79 | # Iterate through the books for this category in the predefined order 80 | for book_name in books_in_order: 81 | if book_name in collected_data[category_name]: 82 | chapter_count = collected_data[category_name][book_name] 83 | ordered_books_dict[book_name] = {"pages": chapter_count} 84 | else: 85 | print(f" [אזהרה] לא נמצא הספר '{book_name}' בנתונים של '{category_name}'.") 86 | 87 | category_subcategory = { 88 | "name": category_name, 89 | "content_type": "פרק", 90 | "books": ordered_books_dict 91 | } 92 | final_json_data["subcategories"].append(category_subcategory) 93 | 94 | # --- שלב 3: שמירה לקובץ --- 95 | with open(output_file, 'w', encoding='utf-8') as f: 96 | json.dump(final_json_data, f, ensure_ascii=False, indent=2) 97 | 98 | print(f"\nהתהליך הושלם. המידע המאוחד והמסודר נשמר בקובץ: {output_file}") 99 | 100 | 101 | if __name__ == "__main__": 102 | # --- הגדרות --- 103 | # הגדר את שם תיקיית הקלט שבה נמצאים קובצי ה-JSON של התנ"ך 104 | input_directory = "תנך" 105 | 106 | # הגדר את שם קובץ הפלט 107 | output_filename = "tanach_complete_ordered.json" 108 | 109 | # ודא שתיקיית הקלט קיימת 110 | if not os.path.isdir(input_directory): 111 | print(f"שגיאה: תיקיית הקלט '{input_directory}' לא נמצאה.") 112 | print("אנא צור את התיקיה והנח בתוכה את קובצי ה-JSON של התנ\"ך.") 113 | else: 114 | create_tanach_json(input_directory, output_filename) -------------------------------------------------------------------------------- /src/linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "shamor_vezachor"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "shamor_vezachor"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GApplication::startup. 85 | static void my_application_startup(GApplication* application) { 86 | //MyApplication* self = MY_APPLICATION(object); 87 | 88 | // Perform any actions required at application startup. 89 | 90 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 91 | } 92 | 93 | // Implements GApplication::shutdown. 94 | static void my_application_shutdown(GApplication* application) { 95 | //MyApplication* self = MY_APPLICATION(object); 96 | 97 | // Perform any actions required at application shutdown. 98 | 99 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 100 | } 101 | 102 | // Implements GObject::dispose. 103 | static void my_application_dispose(GObject* object) { 104 | MyApplication* self = MY_APPLICATION(object); 105 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 106 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 107 | } 108 | 109 | static void my_application_class_init(MyApplicationClass* klass) { 110 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 111 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 112 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 113 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 114 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 115 | } 116 | 117 | static void my_application_init(MyApplication* self) {} 118 | 119 | MyApplication* my_application_new() { 120 | return MY_APPLICATION(g_object_new(my_application_get_type(), 121 | "application-id", APPLICATION_ID, 122 | "flags", G_APPLICATION_NON_UNIQUE, 123 | nullptr)); 124 | } 125 | -------------------------------------------------------------------------------- /src/assets/data/mishna.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "משנה", 3 | "content_type": "פרק", 4 | "subcategories": [ 5 | { 6 | "name": "סדר זרעים", 7 | "content_type": "פרק", 8 | "books": { 9 | "ברכות": { 10 | "pages": 9 11 | }, 12 | "פאה": { 13 | "pages": 8 14 | }, 15 | "דמאי": { 16 | "pages": 7 17 | }, 18 | "כלאים": { 19 | "pages": 9 20 | }, 21 | "שביעית": { 22 | "pages": 10 23 | }, 24 | "תרומות": { 25 | "pages": 11 26 | }, 27 | "מעשרות": { 28 | "pages": 5 29 | }, 30 | "מעשר שני": { 31 | "pages": 5 32 | }, 33 | "חלה": { 34 | "pages": 4 35 | }, 36 | "ערלה": { 37 | "pages": 3 38 | }, 39 | "ביכורים": { 40 | "pages": 4 41 | } 42 | } 43 | }, 44 | { 45 | "name": "סדר מועד", 46 | "content_type": "פרק", 47 | "books": { 48 | "שבת": { 49 | "pages": 24 50 | }, 51 | "עירובין": { 52 | "pages": 10 53 | }, 54 | "פסחים": { 55 | "pages": 10 56 | }, 57 | "שקלים": { 58 | "pages": 8 59 | }, 60 | "יומא": { 61 | "pages": 8 62 | }, 63 | "סוכה": { 64 | "pages": 5 65 | }, 66 | "ביצה": { 67 | "pages": 5 68 | }, 69 | "ראש השנה": { 70 | "pages": 4 71 | }, 72 | "תענית": { 73 | "pages": 4 74 | }, 75 | "מגילה": { 76 | "pages": 4 77 | }, 78 | "מועד קטן": { 79 | "pages": 3 80 | }, 81 | "חגיגה": { 82 | "pages": 3 83 | } 84 | } 85 | }, 86 | { 87 | "name": "סדר נשים", 88 | "content_type": "פרק", 89 | "books": { 90 | "יבמות": { 91 | "pages": 16 92 | }, 93 | "כתובות": { 94 | "pages": 13 95 | }, 96 | "נדרים": { 97 | "pages": 11 98 | }, 99 | "נזיר": { 100 | "pages": 9 101 | }, 102 | "סוטה": { 103 | "pages": 9 104 | }, 105 | "גיטין": { 106 | "pages": 9 107 | }, 108 | "קידושין": { 109 | "pages": 4 110 | } 111 | } 112 | }, 113 | { 114 | "name": "סדר נזיקין", 115 | "content_type": "פרק", 116 | "books": { 117 | "בבא קמא": { 118 | "pages": 10 119 | }, 120 | "בבא מציעא": { 121 | "pages": 10 122 | }, 123 | "בבא בתרא": { 124 | "pages": 10 125 | }, 126 | "סנהדרין": { 127 | "pages": 11 128 | }, 129 | "מכות": { 130 | "pages": 3 131 | }, 132 | "שבועות": { 133 | "pages": 8 134 | }, 135 | "עדיות": { 136 | "pages": 8 137 | }, 138 | "עבודה זרה": { 139 | "pages": 5 140 | }, 141 | "אבות": { 142 | "pages": 6 143 | }, 144 | "הוריות": { 145 | "pages": 3 146 | } 147 | } 148 | }, 149 | { 150 | "name": "סדר קדשים", 151 | "content_type": "פרק", 152 | "books": { 153 | "זבחים": { 154 | "pages": 14 155 | }, 156 | "מנחות": { 157 | "pages": 13 158 | }, 159 | "חולין": { 160 | "pages": 12 161 | }, 162 | "בכורות": { 163 | "pages": 9 164 | }, 165 | "ערכין": { 166 | "pages": 9 167 | }, 168 | "תמורה": { 169 | "pages": 7 170 | }, 171 | "כריתות": { 172 | "pages": 6 173 | }, 174 | "מעילה": { 175 | "pages": 6 176 | }, 177 | "תמיד": { 178 | "pages": 7 179 | }, 180 | "מדות": { 181 | "pages": 5 182 | }, 183 | "קינים": { 184 | "pages": 3 185 | } 186 | } 187 | }, 188 | { 189 | "name": "סדר טהרות", 190 | "content_type": "פרק", 191 | "books": { 192 | "כלים": { 193 | "pages": 30 194 | }, 195 | "אהלות": { 196 | "pages": 18 197 | }, 198 | "נגעים": { 199 | "pages": 14 200 | }, 201 | "פרה": { 202 | "pages": 12 203 | }, 204 | "טהרות": { 205 | "pages": 10 206 | }, 207 | "מקואות": { 208 | "pages": 10 209 | }, 210 | "נדה": { 211 | "pages": 10 212 | }, 213 | "מכשירין": { 214 | "pages": 6 215 | }, 216 | "זבים": { 217 | "pages": 5 218 | }, 219 | "טבול יום": { 220 | "pages": 4 221 | }, 222 | "ידים": { 223 | "pages": 4 224 | }, 225 | "עוקצים": { 226 | "pages": 3 227 | } 228 | } 229 | } 230 | ] 231 | } -------------------------------------------------------------------------------- /.github/workflows/flutter-build.yml: -------------------------------------------------------------------------------- 1 | # קובץ: .github/workflows/flutter-build.yml 2 | name: Build Flutter APK + EXE & Create Release 3 | 4 | on: 5 | push: 6 | branches: 7 | - main 8 | - dev 9 | - release/* 10 | tags: 11 | - '*' 12 | workflow_dispatch: 13 | 14 | jobs: 15 | android: 16 | name: Build Android APK 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout Repository 20 | uses: actions/checkout@v4 21 | 22 | - name: Set up Java 17 23 | uses: actions/setup-java@v4 24 | with: 25 | distribution: 'temurin' 26 | java-version: '17' 27 | 28 | - name: Set up Flutter 29 | uses: subosito/flutter-action@v2 30 | with: 31 | flutter-version: '3.32.1' 32 | channel: 'stable' 33 | 34 | - name: Install Dependencies 35 | working-directory: src 36 | run: flutter pub get 37 | 38 | - name: Decode Keystore and Create Properties File 39 | working-directory: src/android/app 40 | env: 41 | KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} 42 | KEY_ALIAS: ${{ secrets.KEY_ALIAS }} 43 | KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} 44 | STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} 45 | run: | 46 | echo "$KEYSTORE_BASE64" | base64 --decode > upload-keystore.jks 47 | echo "storePassword=$STORE_PASSWORD" > key.properties 48 | echo "keyPassword=$KEY_PASSWORD" >> key.properties 49 | echo "keyAlias=$KEY_ALIAS" >> key.properties 50 | echo "storeFile=upload-keystore.jks" >> key.properties 51 | 52 | - name: Build Signed Android APK 53 | working-directory: src 54 | run: flutter build apk --release 55 | 56 | - name: Upload APK Artifact 57 | uses: actions/upload-artifact@v4 58 | with: 59 | name: android-apk-artifact 60 | path: src/build/app/outputs/flutter-apk/app-release.apk 61 | 62 | windows: 63 | name: Build Windows EXE 64 | runs-on: windows-latest 65 | steps: 66 | - name: Checkout Repository 67 | uses: actions/checkout@v4 68 | 69 | - name: Set up Flutter 70 | uses: subosito/flutter-action@v2 71 | with: 72 | flutter-version: '3.32.1' 73 | channel: 'stable' 74 | 75 | - name: Install Dependencies 76 | working-directory: src 77 | run: flutter pub get 78 | 79 | - name: Build Windows EXE 80 | working-directory: src 81 | run: flutter build windows --release 82 | 83 | - name: Zip Windows Release 84 | working-directory: src/build/windows/x64/runner/Release 85 | run: Compress-Archive -Path * -DestinationPath ../../../../../../windows-release.zip 86 | 87 | - name: Upload Windows ZIP Artifact 88 | uses: actions/upload-artifact@v4 89 | with: 90 | name: windows-zip-artifact 91 | # ✅ תיקון: הנתיב לקובץ ה-ZIP הוא בתיקייה הראשית של הפרויקט 92 | path: windows-release.zip 93 | 94 | publish-release: 95 | name: Publish GitHub Release 96 | if: startsWith(github.ref, 'refs/tags/') 97 | needs: [android, windows] 98 | runs-on: ubuntu-latest 99 | permissions: 100 | contents: write 101 | 102 | steps: 103 | - name: Download Android APK artifact 104 | uses: actions/download-artifact@v4 105 | with: 106 | name: android-apk-artifact 107 | path: artifacts/android 108 | 109 | - name: Download Windows ZIP artifact 110 | uses: actions/download-artifact@v4 111 | with: 112 | name: windows-zip-artifact 113 | path: artifacts/windows 114 | 115 | - name: Prepare Release Assets and Rename 116 | id: prepare_assets 117 | env: 118 | TAG_VERSION: ${{ github.ref_name }} 119 | run: | 120 | APK_ORIGINAL_PATH="artifacts/android/app-release.apk" 121 | APK_NEW_NAME="shamor-vezachor-${TAG_VERSION}.apk" 122 | mv "${APK_ORIGINAL_PATH}" "artifacts/android/${APK_NEW_NAME}" 123 | 124 | ZIP_ORIGINAL_PATH="artifacts/windows/windows-release.zip" 125 | ZIP_NEW_NAME="shamor-vezachor-${TAG_VERSION}-windows.zip" 126 | mv "${ZIP_ORIGINAL_PATH}" "artifacts/windows/${ZIP_NEW_NAME}" 127 | 128 | echo "Final files for release:" 129 | ls -R artifacts/ 130 | 131 | - name: Create GitHub Release 132 | uses: softprops/action-gh-release@v2 133 | with: 134 | files: | 135 | artifacts/android/shamor-vezachor-${{ github.ref_name }}.apk 136 | artifacts/windows/shamor-vezachor-${{ github.ref_name }}-windows.zip 137 | tag_name: ${{ github.ref_name }} 138 | name: Release ${{ github.ref_name }} 139 | body: | 140 | גרסה ${{ github.ref_name }} של שמור וזכור. 141 | קבצים מצורפים: 142 | - `shamor-vezachor-${{ github.ref_name }}.apk` (אנדרואיד) 143 | - `shamor-vezachor-${{ github.ref_name }}-windows.zip` (חלונות) 144 | draft: true 145 | prerelease: false -------------------------------------------------------------------------------- /src/lib/services/custom_book_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | import 'package:uuid/uuid.dart'; 5 | 6 | class CustomBook { 7 | final String id; 8 | final String categoryName; 9 | final String bookName; 10 | final String contentType; 11 | final num pages; 12 | 13 | CustomBook({ 14 | required this.id, 15 | required this.categoryName, 16 | required this.bookName, 17 | required this.contentType, 18 | required this.pages, 19 | }); 20 | 21 | Map toJson() { 22 | return { 23 | 'id': id, 24 | 'categoryName': categoryName, 25 | 'bookName': bookName, 26 | 'contentType': contentType, 27 | 'pages': pages, 28 | }; 29 | } 30 | 31 | factory CustomBook.fromJson(Map json) { 32 | return CustomBook( 33 | id: json['id'] as String? ?? const Uuid().v4(), 34 | categoryName: json['categoryName'] as String? ?? 'קטגוריה לא ידועה', 35 | bookName: json['bookName'] as String? ?? 'ספר לא ידוע', 36 | contentType: json['contentType'] as String? ?? 'פרק', 37 | pages: json['pages'] as num? ?? 0, 38 | ); 39 | } 40 | } 41 | 42 | class CustomBookService { 43 | static const String _appPrefix = "nhlocal.shamor_vezachor"; 44 | static const String customBooksKey = "$_appPrefix.custom_books_data"; 45 | final Uuid _uuid = const Uuid(); 46 | 47 | Future _getPrefs() async { 48 | return SharedPreferences.getInstance(); 49 | } 50 | 51 | String generateId() { 52 | return _uuid.v4(); 53 | } 54 | 55 | Future> loadCustomBooks() async { 56 | final prefs = await _getPrefs(); 57 | try { 58 | final String? jsonString = prefs.getString(customBooksKey); 59 | if (jsonString == null || jsonString.isEmpty) { 60 | return []; 61 | } 62 | final List jsonList = json.decode(jsonString); 63 | return jsonList 64 | .map((jsonItem) => 65 | CustomBook.fromJson(jsonItem as Map)) 66 | .toList(); 67 | } catch (e) { 68 | print('Error loading custom books from SharedPreferences: $e'); 69 | 70 | return []; 71 | } 72 | } 73 | 74 | Future _saveCustomBooks(List books) async { 75 | final prefs = await _getPrefs(); 76 | try { 77 | final jsonList = books.map((book) => book.toJson()).toList(); 78 | await prefs.setString(customBooksKey, json.encode(jsonList)); 79 | } catch (e) { 80 | print('Error saving custom books to SharedPreferences: $e'); 81 | } 82 | } 83 | 84 | Future exportCustomBooksJsonString() async { 85 | final prefs = await _getPrefs(); 86 | return prefs.getString(customBooksKey); 87 | } 88 | 89 | Future importCustomBooksJsonString(String? jsonString) async { 90 | final prefs = await _getPrefs(); 91 | if (jsonString != null && jsonString.isNotEmpty) { 92 | try { 93 | final decoded = json.decode(jsonString); 94 | if (decoded is List) { 95 | await prefs.setString(customBooksKey, jsonString); 96 | } else { 97 | print( 98 | 'Import failed: Provided string is not a valid JSON list for custom books.'); 99 | 100 | await prefs.setString(customBooksKey, '[]'); 101 | } 102 | } catch (e) { 103 | print('Import failed: Provided string is not valid JSON. Error: $e'); 104 | 105 | await prefs.setString(customBooksKey, '[]'); 106 | } 107 | } else { 108 | await prefs.setString(customBooksKey, '[]'); 109 | } 110 | } 111 | 112 | Future addCustomBook({ 113 | required String categoryName, 114 | required String bookName, 115 | required String contentType, 116 | required num pages, 117 | }) async { 118 | final books = await loadCustomBooks(); 119 | 120 | final newBook = CustomBook( 121 | id: generateId(), 122 | categoryName: categoryName, 123 | bookName: bookName, 124 | contentType: contentType, 125 | pages: pages, 126 | ); 127 | books.add(newBook); 128 | await _saveCustomBooks(books); 129 | return newBook; 130 | } 131 | 132 | Future editCustomBook({ 133 | required String id, 134 | required String categoryName, 135 | required String bookName, 136 | required String contentType, 137 | required num pages, 138 | }) async { 139 | final books = await loadCustomBooks(); 140 | final index = books.indexWhere((book) => book.id == id); 141 | if (index != -1) { 142 | books[index] = CustomBook( 143 | id: id, 144 | categoryName: categoryName, 145 | bookName: bookName, 146 | contentType: contentType, 147 | pages: pages, 148 | ); 149 | await _saveCustomBooks(books); 150 | return true; 151 | } 152 | return false; 153 | } 154 | 155 | Future deleteCustomBook(String id) async { 156 | final books = await loadCustomBooks(); 157 | final initialLength = books.length; 158 | books.removeWhere((book) => book.id == id); 159 | if (books.length < initialLength) { 160 | await _saveCustomBooks(books); 161 | return true; 162 | } 163 | return false; 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /src/linux/runner/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "shamor_vezachor"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "shamor_vezachor"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GApplication::startup. 85 | static void my_application_startup(GApplication* application) { 86 | //MyApplication* self = MY_APPLICATION(object); 87 | 88 | // Perform any actions required at application startup. 89 | 90 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 91 | } 92 | 93 | // Implements GApplication::shutdown. 94 | static void my_application_shutdown(GApplication* application) { 95 | //MyApplication* self = MY_APPLICATION(object); 96 | 97 | // Perform any actions required at application shutdown. 98 | 99 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 100 | } 101 | 102 | // Implements GObject::dispose. 103 | static void my_application_dispose(GObject* object) { 104 | MyApplication* self = MY_APPLICATION(object); 105 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 106 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 107 | } 108 | 109 | static void my_application_class_init(MyApplicationClass* klass) { 110 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 111 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 112 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 113 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 114 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 115 | } 116 | 117 | static void my_application_init(MyApplication* self) {} 118 | 119 | MyApplication* my_application_new() { 120 | // Set the program name to the application ID, which helps various systems 121 | // like GTK and desktop environments map this running application to its 122 | // corresponding .desktop file. This ensures better integration by allowing 123 | // the application to be recognized beyond its binary name. 124 | g_set_prgname(APPLICATION_ID); 125 | 126 | return MY_APPLICATION(g_object_new(my_application_get_type(), 127 | "application-id", APPLICATION_ID, 128 | "flags", G_APPLICATION_NON_UNIQUE, 129 | nullptr)); 130 | } 131 | -------------------------------------------------------------------------------- /scripts/convert_shas.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | def create_shas_json(input_dir, output_file): 5 | """ 6 | Scans a directory of Talmud Bavli analysis JSON files, consolidates them 7 | into a single structured JSON file, and ensures canonical order for 8 | Sedarim and Masechtot. It also calculates daf count from amud count. 9 | 10 | Args: 11 | input_dir (str): The path to the directory containing the source JSON files. 12 | output_file (str): The path where the final consolidated JSON will be saved. 13 | """ 14 | # Define the canonical order based on the provided shas.json example 15 | SHAS_ORDER = { 16 | "סדר זרעים": ["ברכות"], 17 | "סדר מועד": [ 18 | "שבת", "עירובין", "פסחים", "שקלים", "יומא", "סוכה", 19 | "ביצה", "ראש השנה", "תענית", "מגילה", "מועד קטן", "חגיגה" 20 | ], 21 | "סדר נשים": [ 22 | "יבמות", "כתובות", "נדרים", "נזיר", "סוטה", "גיטין", "קידושין" 23 | ], 24 | "סדר נזיקין": [ 25 | "בבא קמא", "בבא מציעא", "בבא בתרא", "סנהדרין", "מכות", 26 | "שבועות", "עבודה זרה", "הוריות" 27 | ], 28 | "סדר קדשים": [ 29 | "זבחים", "מנחות", "חולין", "בכורות", "ערכין", "תמורה", 30 | "כריתות", "מעילה", "תמיד" 31 | ], 32 | "סדר טהרות": ["נדה"] 33 | } 34 | 35 | # --- שלב 1: איסוף כל המידע מהקבצים --- 36 | collected_data = {} 37 | print(f"שלב 1: מתחיל סריקה ואיסוף מידע מהתיקיה: {input_dir}") 38 | 39 | for filename in os.listdir(input_dir): 40 | if filename.endswith("_analysis.json"): 41 | file_path = os.path.join(input_dir, filename) 42 | try: 43 | with open(file_path, 'r', encoding='utf-8') as f: 44 | data = json.load(f) 45 | 46 | seder_name = data.get("collection_name") 47 | masechtot_data = data.get("books_data") 48 | 49 | if not seder_name or not masechtot_data: 50 | print(f" [אזהרה] קובץ {filename} חסר מידע. מדלג.") 51 | continue 52 | 53 | print(f" מעבד את הקובץ עבור: {seder_name}") 54 | 55 | collected_data[seder_name] = {} 56 | 57 | for masechet_name, details in masechtot_data.items(): 58 | amud_count = details.get("count") 59 | 60 | if amud_count is not None: 61 | # Logic to calculate daf count from amud count. 62 | # The formula is count / 2, allowing for floating point numbers (e.g., 14.5). 63 | daf_count = amud_count / 2 64 | 65 | # The key in books_data is already the clean Masechet name 66 | collected_data[seder_name][masechet_name.strip()] = daf_count 67 | else: 68 | print(f" [אזהרה] לא נמצא 'count' עבור '{masechet_name}'.") 69 | 70 | except Exception as e: 71 | print(f" [שגיאה] אירעה שגיאה בעיבוד הקובץ {filename}: {e}") 72 | 73 | # --- שלב 2: בניית מבנה ה-JSON הסופי לפי הסדר שהוגדר --- 74 | print("\nשלב 2: מרכיב את קובץ הפלט הסופי לפי הסדר המלא.") 75 | 76 | final_json_data = { 77 | "name": "תלמוד בבלי", 78 | "content_type": "דף", 79 | "subcategories": [] 80 | } 81 | 82 | # Iterate through the Sedarim in the predefined order 83 | for seder_name, masechtot_in_order in SHAS_ORDER.items(): 84 | if seder_name not in collected_data: 85 | print(f" [אזהרה] לא נמצא קובץ מתאים עבור '{seder_name}'. מדלג על סדר זה.") 86 | continue 87 | 88 | print(f" מרכיב את '{seder_name}'...") 89 | 90 | ordered_books_dict = {} 91 | # Iterate through the Masechtot for this Seder in the predefined order 92 | for masechet_name in masechtot_in_order: 93 | if masechet_name in collected_data[seder_name]: 94 | daf_count = collected_data[seder_name][masechet_name] 95 | ordered_books_dict[masechet_name] = {"pages": daf_count} 96 | else: 97 | print(f" [אזהרה] לא נמצאה מסכת '{masechet_name}' בנתונים של '{seder_name}'.") 98 | 99 | seder_subcategory = { 100 | "name": seder_name, 101 | "content_type": "דף", 102 | "books": ordered_books_dict 103 | } 104 | final_json_data["subcategories"].append(seder_subcategory) 105 | 106 | # --- שלב 3: שמירה לקובץ --- 107 | with open(output_file, 'w', encoding='utf-8') as f: 108 | json.dump(final_json_data, f, ensure_ascii=False, indent=2) 109 | 110 | print(f"\nהתהליך הושלם. המידע המאוחד והמסודר נשמר בקובץ: {output_file}") 111 | 112 | 113 | if __name__ == "__main__": 114 | # --- הגדרות --- 115 | # הגדר את שם תיקיית הקלט שבה נמצאים קובצי ה-JSON של סדרי הש"ס 116 | input_directory = "תלמוד בבלי" 117 | 118 | # הגדר את שם קובץ הפלט 119 | output_filename = "shas_complete_ordered.json" 120 | 121 | # ודא שתיקיית הקלט קיימת 122 | if not os.path.isdir(input_directory): 123 | print(f"שגיאה: תיקיית הקלט '{input_directory}' לא נמצאה.") 124 | print("אנא צור את התיקיה והנח בתוכה את קובצי ה-JSON של התלמוד הבבלי.") 125 | else: 126 | create_shas_json(input_directory, output_filename) -------------------------------------------------------------------------------- /.github/workflows/build-and-release.yml.txt: -------------------------------------------------------------------------------- 1 | name: Release Build and Draft Release 2 | 3 | permissions: 4 | contents: write 5 | 6 | on: 7 | push: 8 | tags: 9 | - '*' # כל תג חדש 10 | workflow_dispatch: # להרצה ידנית 11 | 12 | env: 13 | APP_NAME: shamor-vezachor 14 | BUILD_VERSION: ${{ github.ref_name }} # משתמש בשם התג כגרסה 15 | 16 | jobs: 17 | build-windows: 18 | name: Build Windows ZIP 19 | runs-on: windows-latest 20 | 21 | steps: 22 | - name: Checkout code 23 | uses: actions/checkout@v4 24 | 25 | - name: Setup Python ${{ env.PYTHON_VERSION || '3.12.2' }} 26 | uses: actions/setup-python@v5 27 | with: 28 | python-version: ${{ env.PYTHON_VERSION || '3.12.2' }} 29 | 30 | - name: Install Python dependencies 31 | run: | 32 | python -m pip install --upgrade pip 33 | pip install -r requirements.txt 34 | 35 | - name: Setup Flutter ${{ env.FLUTTER_VERSION || '3.27.0' }} 36 | uses: subosito/flutter-action@v2 37 | with: 38 | flutter-version: ${{ env.FLUTTER_VERSION || '3.27.0' }} 39 | 40 | - name: Flet Build Windows 41 | env: 42 | PYTHONIOENCODING: utf-8 43 | PYTHONUTF8: 1 44 | run: | 45 | flutter config --no-analytics 46 | flet build windows --v --no-rich-output 47 | 48 | - name: Create ZIP artifact 49 | id: zip 50 | run: | 51 | powershell -Command "Compress-Archive -Path build/windows/* -DestinationPath '${{ env.APP_NAME }}-${{ env.BUILD_VERSION }}.zip'" 52 | echo "::set-output name=zip-file::${{ env.APP_NAME }}-${{ env.BUILD_VERSION }}.zip" 53 | 54 | - name: Upload Windows ZIP 55 | uses: actions/upload-artifact@v4 56 | with: 57 | name: windows_zip 58 | path: ${{ steps.zip.outputs.zip-file }} 59 | 60 | build-apk: 61 | name: Build APK 62 | runs-on: ubuntu-latest 63 | env: 64 | # הגדרת שם האפליקציה והגרסה מבוססי תג Git 65 | APP_NAME: shamor-vezachor 66 | BUILD_VERSION: ${{ github.ref_name }} 67 | 68 | steps: 69 | - name: Checkout code 70 | uses: actions/checkout@v4 71 | 72 | - name: Setup Python ${{ env.PYTHON_VERSION || '3.12.2' }} 73 | uses: actions/setup-python@v5 74 | with: 75 | python-version: ${{ env.PYTHON_VERSION || '3.12.2' }} 76 | 77 | - name: Install Python dependencies 78 | run: | 79 | python -m pip install --upgrade pip 80 | pip install -r requirements.txt 81 | 82 | - name: Setup Flutter ${{ env.FLUTTER_VERSION || '3.27.0' }} 83 | uses: subosito/flutter-action@v2 84 | with: 85 | flutter-version: ${{ env.FLUTTER_VERSION || '3.27.0' }} 86 | 87 | - name: Setup Java JDK 88 | uses: actions/setup-java@v4 89 | with: 90 | distribution: 'temurin' 91 | java-version: '21' 92 | 93 | - name: Flet Build APK 94 | run: | 95 | flutter config --no-analytics 96 | flet build apk -v 97 | 98 | - name: Rename APK 99 | id: apk 100 | run: | 101 | mv build/apk/app-release.apk "${{ env.APP_NAME }}-${{ env.BUILD_VERSION }}.apk" 102 | echo "::set-output name=apk-file::${{ env.APP_NAME }}-${{ env.BUILD_VERSION }}.apk" 103 | 104 | - name: Upload APK artifact 105 | uses: actions/upload-artifact@v4 106 | with: 107 | name: apk_file 108 | path: ${{ steps.apk.outputs.apk-file }} 109 | 110 | 111 | create-release: 112 | name: Create Draft GitHub Release 113 | runs-on: ubuntu-latest 114 | needs: 115 | - build-windows 116 | - build-apk 117 | 118 | steps: 119 | - name: Download Windows ZIP 120 | uses: actions/download-artifact@v4 121 | with: 122 | name: windows_zip 123 | 124 | - name: Download APK file 125 | uses: actions/download-artifact@v4 126 | with: 127 | name: apk_file 128 | 129 | - name: Create draft release 130 | id: create_release 131 | uses: actions/create-release@v1 132 | env: 133 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # העברת ה-token כ-env, לא ב-with :contentReference[oaicite:5]{index=5} 134 | with: 135 | tag_name: ${{ github.ref_name }} 136 | release_name: Release ${{ github.ref_name }} 137 | draft: true 138 | prerelease: false 139 | 140 | - name: Upload Windows asset 141 | uses: actions/upload-release-asset@v1 142 | env: 143 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # שוב, כ-env ולא ב-with :contentReference[oaicite:6]{index=6} 144 | with: 145 | upload_url: ${{ steps.create_release.outputs.upload_url }} 146 | asset_path: "${{ env.APP_NAME }}-${{ github.ref_name }}.zip" 147 | asset_name: "${{ env.APP_NAME }}-${{ github.ref_name }}.zip" 148 | asset_content_type: application/zip 149 | 150 | - name: Upload APK asset 151 | uses: actions/upload-release-asset@v1 152 | env: 153 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 154 | with: 155 | upload_url: ${{ steps.create_release.outputs.upload_url }} 156 | asset_path: "${{ env.APP_NAME }}-${{ github.ref_name }}.apk" 157 | asset_name: "${{ env.APP_NAME }}-${{ github.ref_name }}.apk" 158 | asset_content_type: application/vnd.android.package-archive -------------------------------------------------------------------------------- /src/lib/providers/data_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import '../models/book_model.dart'; 3 | import '../services/data_loader_service.dart'; 4 | import '../services/custom_book_service.dart'; 5 | 6 | class DataProvider with ChangeNotifier { 7 | final DataLoaderService _dataLoaderService = DataLoaderService(); 8 | final CustomBookService _customBookService = CustomBookService(); 9 | Map _allBookData = {}; 10 | bool _isLoading = false; 11 | String? _error; 12 | 13 | Map get allBookData => _allBookData; 14 | bool get isLoading => _isLoading; 15 | String? get error => _error; 16 | 17 | DataProvider() { 18 | loadAllData(); 19 | } 20 | 21 | Future loadAllData() async { 22 | _dataLoaderService.clearCache(); 23 | _isLoading = true; 24 | _error = null; 25 | notifyListeners(); 26 | try { 27 | _allBookData = await _dataLoaderService.loadData(); 28 | print( 29 | "[DataProvider] LoadAllData Complete. _allBookData keys: ${_allBookData.keys.toList()}"); 30 | _allBookData.forEach((key, category) { 31 | print("[DataProvider] Category: ${category.name}"); 32 | print( 33 | " Has subcategories: ${category.subcategories != null && category.subcategories!.isNotEmpty}"); 34 | if (category.subcategories != null && 35 | category.subcategories!.isNotEmpty) { 36 | for (var subCat in category.subcategories!) { 37 | print( 38 | " SubCategory: ${subCat.name}, Books count: ${subCat.books.length}, Sub-subcategories: ${subCat.subcategories != null && subCat.subcategories!.isNotEmpty}"); 39 | if (subCat.subcategories != null && 40 | subCat.subcategories!.isNotEmpty) { 41 | for (var deepSubCat in subCat.subcategories!) { 42 | print( 43 | " DeepSubCategory: ${deepSubCat.name}, Books count: ${deepSubCat.books.length}"); 44 | } 45 | } 46 | } 47 | } 48 | print(" Direct books count: ${category.books.length}"); 49 | }); 50 | } catch (e) { 51 | _error = e.toString(); 52 | print("Error in DataProvider: $e"); 53 | } 54 | _isLoading = false; 55 | notifyListeners(); 56 | } 57 | 58 | BookCategory? getCategory(String categoryName) { 59 | return _allBookData[categoryName]; 60 | } 61 | 62 | BookDetails? getBookDetails(String categoryName, String bookName) { 63 | return _allBookData[categoryName]?.books[bookName]; 64 | } 65 | 66 | Future addCustomBook({ 67 | required String categoryName, 68 | required String bookName, 69 | required String contentType, 70 | required num pages, 71 | }) async { 72 | _isLoading = true; 73 | _error = null; 74 | notifyListeners(); 75 | try { 76 | await _customBookService.addCustomBook( 77 | categoryName: categoryName, 78 | bookName: bookName, 79 | contentType: contentType, 80 | pages: pages, 81 | ); 82 | await loadAllData(); 83 | } catch (e) { 84 | _error = "Error adding custom book: ${e.toString()}"; 85 | } 86 | _isLoading = false; 87 | notifyListeners(); 88 | } 89 | 90 | Future editCustomBook({ 91 | required String id, 92 | required String categoryName, 93 | required String bookName, 94 | required String contentType, 95 | required num pages, 96 | }) async { 97 | _isLoading = true; 98 | _error = null; 99 | notifyListeners(); 100 | try { 101 | final success = await _customBookService.editCustomBook( 102 | id: id, 103 | categoryName: categoryName, 104 | bookName: bookName, 105 | contentType: contentType, 106 | pages: pages, 107 | ); 108 | if (success) { 109 | await loadAllData(); 110 | } else { 111 | _error = "Failed to find custom book to edit (ID: $id)."; 112 | } 113 | } catch (e) { 114 | _error = "Error editing custom book: ${e.toString()}"; 115 | } 116 | _isLoading = false; 117 | notifyListeners(); 118 | } 119 | 120 | Future deleteCustomBook(String id) async { 121 | _isLoading = true; 122 | _error = null; 123 | notifyListeners(); 124 | try { 125 | final success = await _customBookService.deleteCustomBook(id); 126 | if (success) { 127 | await loadAllData(); 128 | } else { 129 | _error = "Failed to find custom book to delete (ID: $id)."; 130 | } 131 | } catch (e) { 132 | _error = "Error deleting custom book: ${e.toString()}"; 133 | } 134 | _isLoading = false; 135 | notifyListeners(); 136 | } 137 | 138 | Future getCustomBooksJsonForBackup() async { 139 | _error = null; 140 | try { 141 | return await _customBookService.exportCustomBooksJsonString(); 142 | } catch (e) { 143 | _error = "Error exporting custom books: ${e.toString()}"; 144 | notifyListeners(); 145 | return null; 146 | } 147 | } 148 | 149 | Future restoreCustomBooksFromJsonBackup(String? jsonString) async { 150 | _isLoading = true; 151 | _error = null; 152 | notifyListeners(); 153 | 154 | try { 155 | await _customBookService.importCustomBooksJsonString(jsonString); 156 | 157 | await loadAllData(); 158 | } catch (e) { 159 | _error = "Error restoring custom books: ${e.toString()}"; 160 | _isLoading = false; 161 | notifyListeners(); 162 | } 163 | } 164 | } 165 | --------------------------------------------------------------------------------