### Install Project Dependencies Source: https://github.com/sopaco/saga-reader/blob/main/README.md Installs project dependencies using Bun, pnpm, or npm. Bun is recommended for its speed. ```sh # **recommend, this is blazing fast** bun install # or use pnpm # pnpm install # or use npm # npm install ``` -------------------------------- ### Run Development Server Source: https://github.com/sopaco/saga-reader/blob/main/README.md Starts the development server for Saga Reader using Bun, pnpm, or npm. Bun is recommended for its speed. ```sh # **recommend, this is blazing fast** bun run dev # or use pnpm # pnpm run dev # or use npm # npm run dev ``` -------------------------------- ### Run Development Server with npm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Starts the development server using npm. ```sh # or use npm # npm run dev ``` -------------------------------- ### Run Development Server with pnpm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Starts the development server using pnpm. ```sh # or use pnpm # pnpm run dev ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Installs project dependencies using Bun, a fast JavaScript runtime and package manager. This is the recommended method. ```sh # **Recommended, this is very fast** bun install ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Installs project dependencies using pnpm, an alternative package manager. ```sh # or use pnpm # pnpm install ``` -------------------------------- ### Install Dependencies with npm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Installs project dependencies using npm, the default Node Package Manager. ```sh # or use npm # npm install ``` -------------------------------- ### Run Development Server with Bun Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Starts the development server using Bun, allowing for hot-reloading and quick iteration during development. This is the recommended method. ```sh # **Recommended, this is very fast** bun run dev ``` -------------------------------- ### macOS Quarantine Removal Source: https://github.com/sopaco/saga-reader/blob/main/docs/how-to-use-zh.md This command is used on macOS to remove the quarantine attribute from an application bundle, which is often required after downloading pre-compiled software to allow it to run without security warnings. ```sh sudo xattr -rd com.apple.quarantine /Applications/麒睿智库.app ``` -------------------------------- ### Remove Quarantine Attribute on macOS Source: https://github.com/sopaco/saga-reader/blob/main/docs/how-to-use-en.md This command is used on macOS to remove the quarantine attribute from an application bundle, which is often necessary after downloading and installing applications from untrusted sources or when building from source. ```sh sudo xattr -rd com.apple.quarantine /Applications/麒睿智库.app ``` -------------------------------- ### Build Project with Bun Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Builds the project for the current system using Bun. This is the recommended method for building the application. ```sh # **Recommended, this is very fast** bun run build ``` -------------------------------- ### Build Project with pnpm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Builds the project for the current system using pnpm. ```sh # or use pnpm # pnpm run build ``` -------------------------------- ### Rust Backend - Asynchronous Programming with Tokio Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution.md Demonstrates the use of Tokio, Rust's asynchronous runtime, for efficient I/O operations and task scheduling, enabling better concurrency compared to single-threaded event loops. ```rust // Tokio example (conceptual) use tokio::time::{sleep, Duration}; #[tokio::main] async fn main() { println!("Start"); let task1 = tokio::spawn(async { sleep(Duration::from_secs(2)).await; println!("Task 1 finished"); }); let task2 = tokio::spawn(async { sleep(Duration::from_secs(1)).await; println!("Task 2 finished"); }); // Wait for both tasks to complete let _ = tokio::join!(task1, task2); println!("End"); } ``` -------------------------------- ### Build Project with npm Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md Builds the project for the current system using npm. ```sh # or use npm # npm run build ``` -------------------------------- ### Rust Backend - Memory Safety and Performance Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution.md Highlights Rust's advantages in memory safety through its ownership and borrowing system, and its high performance due to zero-cost abstractions, making it competitive with native code. ```rust // Rust example (conceptual) fn main() { let mut message = String::from("Hello"); message.push_str(", world!"); println!("{}", message); } // Example demonstrating ownership and borrowing: fn calculate_length(s: &String) -> usize { s.len() } fn main_ownership() { let s1 = String::from("hello"); let len = calculate_length(&s1); println!("The length of '{}' is {}.", s1, len); } ``` -------------------------------- ### Build Saga Reader Application Source: https://github.com/sopaco/saga-reader/blob/main/README.md Builds the Saga Reader application for the current system. Cross-compilation can be achieved using specific build scripts. ```sh # **recommend, this is blazing fast** bun run build # or use pnpm # pnpm run build # or use npm # npm run build ``` -------------------------------- ### Saga Reader 架构图 Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution-zh.md 展示了 Saga Reader 的前端(Svelte/SvelteKit)和后端(Rust Modules)的模块划分以及它们之间的交互关系。 ```plaintext +---------------------+ | Frontend | | (Svelte/SvelteKit) | +---------------------+ ^ ^ ^ | | | +------+---+---+-------+ | UI/UX Components | | State Management | | Internationalization| | Styling (Tailwind) | | Build Tools (Vite) | +----------------------+ +---------------------+ | Backend | | (Rust Modules) | +---------------------+ | | +------+---+---+-------+ | tauri-plugin-feed-api| | feed_api_rs | | llm | | ollama | | recorder | | scrap | | types | | intelligent | +-----------------------+ ``` -------------------------------- ### 数据库连接池实现 Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution-zh.md Rust 代码示例,定义了数据库连接池的类型别名,并展示了其基本实现结构,用于管理数据库连接。 ```rust // db_pool.rs use sea_orm::DatabaseConnection; use std::sync::Arc; use tokio::sync::Mutex; pub type DBConnPool = Arc>; // 数据库连接池实现 ``` -------------------------------- ### Saga Reader Overall Architecture Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution-ja.md Illustrates the layered architecture of the Saga Reader application, showing the interaction between the Presentation (Frontend UI), Application (Tauri Backend), Domain Logic (Business Modules), and Data Access layers. ```plaintext +---------------------+ | Presentation | | (Frontend UI) | +----------+----------+ | Tauri API +----------v----------+ | Application | | (Tauri Backend) | +----------+----------+ | Module Calls +----------v----------+ | Domain Logic | | (Business Modules) | +----------+----------+ | Data Calls +----------v----------+ | Data Access | | (DB/Config/API) | +---------------------+ ``` -------------------------------- ### Contribution Guidelines Source: https://github.com/sopaco/saga-reader/blob/main/README.md Guidelines for contributing to the Saga Reader project, including reporting bugs, submitting feature requests, and implementing new features like internet search providers and LLM integrations. It also provides information on internationalization and support. ```markdown # 🤝 Contribute Help improve Saga Reader by reporting bugs or submitting feature requests through [GitHub Issues](https://github.com/sopaco/saga-reader/issues). Similarly, there are some features in wunderlist that need to be improved. **For Example** - You can help implement additional [Internet Search Providers](https://github.com/sopaco/saga-reader/tree/master/crates/scrap/src/search) beyond Bing, such as Google. - You can assist in integrating more [Online LLM Providers](https://github.com/sopaco/saga-reader/tree/master/crates/llm/src/providers) besides GLM Flash, like OpenAI. - You can also contribute to the internationalization of the app by providing [translations into additional languages](https://github.com/sopaco/saga-reader/tree/master/app/src/lib/i18n/locales). Refer to the [svelte-i18n](https://github.com/kaisermann/svelte-i18n/blob/main/docs/Getting%20Started.md#5-localizing-your-app) repository to get started with internationalization. If you enjoy using this app, consider supporting its development by donating through [GitHub Sponsors](https://github.com/sponsors/sopaco), [Paypal](https://paypal.me/skyronj), or [Alipay](https://aiqino.netlify.app/uprise-assets/alipay.jpg). ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/sopaco/saga-reader/blob/main/README.md Changes the current directory to the root of the cloned Saga Reader project. ```sh cd saga-reader ``` -------------------------------- ### Saga Reader Hierarchical Architecture Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution.md Illustrates the modular and hierarchical structure of the Saga Reader project, showing the interaction between frontend (Svelte/SvelteKit) and backend (Rust Modules) components, including specific libraries and plugins. ```plaintext +---------------------+ | Frontend | | (Svelte/SvelteKit) | +---------------------+ ^ ^ ^ | | | +------+---+---+-------+ | UI/UX Components | | State Management | | Internationalization| | Styling (Tailwind) | | Build Tools (Vite) | | | +----------------------+ +---------------------+ | Backend | | (Rust Modules) | +---------------------+ | | | | | | +------+---+---+-------+ | tauri-plugin-feed-api| | feed_api_rs | | llm | | ollama | | recorder | | scrap | | types | | intelligent | +-----------------------+ ``` -------------------------------- ### License Information Source: https://github.com/sopaco/saga-reader/blob/main/README.md Specifies the licensing terms for the Saga Reader project. ```markdown # 🪪 License **MIT**. A copy of the license is provided in the [LICENSE](./LICENSE) file. ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md This command changes the current directory to the cloned saga-reader project folder. ```sh cd saga-reader ``` -------------------------------- ### Cross-compilation Build Commands Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md These commands are used to build the project for specific operating systems (macOS, Windows) if cross-compilation is needed. These commands are typically found in the package.json file. ```sh # To cross-compile, you can run commands like: # bun run build:macos # bun run build:windows ``` -------------------------------- ### Svelte Compile-time Optimization Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution.md Explains Svelte's approach to optimizing component code during the build phase, converting it into efficient JavaScript for direct DOM manipulation, contrasting it with React's runtime virtual DOM diffing. ```svelte // Svelte component example (conceptual) ``` -------------------------------- ### Developed With Technologies Source: https://github.com/sopaco/saga-reader/blob/main/README.md Lists the core technologies and frameworks used in the development of the Saga Reader project. ```markdown # ⚛️ Developed with - [Rust](https://github.com/rust-lang/rust) - [Tauri](https://github.com/tauri-apps/tauri) - [Svelte](https://github.com/sveltejs/svelte) - [SvelteKit](https://github.com/sveltejs/kit) - [Skeleton](https://github.com/skeletonlabs/skeleton) - [sea-orm](https://github.com/SeaQL/sea-orm) ``` -------------------------------- ### Saga Reader Project Architecture Source: https://github.com/sopaco/saga-reader/blob/main/README.md This diagram illustrates the high-level architecture of the Saga Reader project, showing the interaction between the frontend (Svelte/SvelteKit) and the backend (Rust Modules). It also lists key components within each layer. ```plaintext +---------------------+ | Frontend | | (Svelte/SvelteKit) | +---------------------+ ^ ^ ^ | | | +------+---+---+-------+ | UI/UX Components | | State Management | | Internationalization| | Styling (Tailwind) | | Build Tools (Vite) | +----------------------+ +---------------------+ | Backend | | (Rust Modules) | +---------------------+ | | | | | | +------+---+---+-------+ | tauri-plugin-feed-api| | feed_api_rs | | llm | | ollama | | recorder | | scrap | | types | | intelligent | +-----------------------+ ``` -------------------------------- ### About the Developer Source: https://github.com/sopaco/saga-reader/blob/main/README.md Information about the developer of the Saga Reader project, including their experience and contact details. ```markdown # 👨 About Me > 🚀 Help me develop this software better by [sponsoring on GitHub](https://github.com/sponsors/sopaco) An experienced internet veteran, having navigated through the waves of PC internet, mobile internet, and AI applications. Starting from an individual mobile application developer to a professional in the corporate world, I possess rich experience in product design and research and development. Currently, I am employed at [Kuaishou](https://en.wikipedia.org/wiki/Kuaishou), focusing on the R&D of universal front-end systems and AI exploration. WeChat: dokhell Email: dokhell@hotmail.com ``` -------------------------------- ### Clone Saga Reader Repository Source: https://github.com/sopaco/saga-reader/blob/main/README.md Clones the Saga Reader project repository from GitHub, ensuring all submodules are also initialized. ```sh git clone https://github.com/sopaco/saga-reader.git --recursive ``` -------------------------------- ### Saga Reader Project Structure Overview Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md This diagram illustrates the high-level architecture of the Saga Reader project, showing the interaction between the frontend (Svelte/SvelteKit) and the backend (Rust Modules). It details the various components and their responsibilities within the application. ```plaintext +---------------------+ +---------------------+ | Frontend | | Backend | | (Svelte/SvelteKit) |<--->| (Rust Modules) | +---------------------+ +---------------------+ ^ ^ ^ | | | | | | | | | +------+---+---+-------+ +------+---+---+-------+ | UI/UX Components | | tauri-plugin-feed-api| | State Management | | feed_api_rs | | Internationalization| | llm | | Styling (Tailwind) | | ollama | | Build Tools (Vite) | | recorder | | | | scrap | | | | types | | | | intelligent | +----------------------+ +-----------------------+ ``` -------------------------------- ### Database Connection Pool Implementation Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution-ja.md Defines a type alias for a database connection pool using SeaORM and Tokio's Mutex, facilitating efficient database access in the Rust backend. ```rust // db_pool.rs use sea_orm::DatabaseConnection; use std::sync::Arc; use tokio::sync::Mutex; pub type DBConnPool = Arc>; // データベース接続プールの実装 ``` -------------------------------- ### Clone Saga Reader Repository Source: https://github.com/sopaco/saga-reader/blob/main/README_zh.md This command clones the Saga Reader project from its GitHub repository to your local machine. ```sh git clone https://github.com/sopaco/saga-reader.git ``` -------------------------------- ### Feed API Permissions for Set App Config Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `set_app_config` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-set-app-config Enables the set_app_config command without any pre-configured scope. feed-api:deny-set-app-config Denies the set_app_config command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions for Search Contents by Keyword Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `search_contents_by_keyword` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-search-contents-by-keyword Enables the search_contents_by_keyword command without any pre-configured scope. feed-api:deny-search-contents-by-keyword Denies the search_contents_by_keyword command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions for Scrap Text by URL Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `scrap_text_by_url` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-scrap-text-by-url Enables the scrap_text_by_url command without any pre-configured scope. feed-api:deny-scrap-text-by-url Denies the scrap_text_by_url command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md This section details the permission identifiers for the feed API, specifying whether they allow or deny actions such as adding feeds, changing feed data, and interacting with article assistants. Each permission is linked to a specific command. ```APIDOC feed-api:allow-add-feed Description: Enables the add_feed command without any pre-configured scope. feed-api:deny-add-feed Description: Denies the add_feed command without any pre-configured scope. feed-api:allow-add-feeds-package Description: Enables the add_feeds_package command without any pre-configured scope. feed-api:deny-add-feeds-package Description: Denies the add_feeds_package command without any pre-configured scope. feed-api:allow-change-feed-data Description: Enables the change_feed_data command without any pre-configured scope. feed-api:deny-change-feed-data Description: Denies the change_feed_data command without any pre-configured scope. feed-api:allow-chat-with-article-assistant Description: Enables the chat_with_article_assistant command without any pre-configured scope. feed-api:deny-chat-with-article-assistant Description: Denies the chat_with_article_assistant command without any pre-configured scope. feed-api:allow-download-ollama Description: Enables the download_ollama command without any pre-configured scope. feed-api:deny-download-ollama Description: Denies the download_ollama command without any pre-configured scope. feed-api:allow-get-app-config Description: Enables the get_app_config command without any pre-configured scope. feed-api:deny-get-app-config Description: Denies the get_app_config command without any pre-configured scope. feed-api:allow-get-feeds-by-package Description: Enables the get_feeds_by_package command without any pre-configured scope. feed-api:deny-get-feeds-by-package Description: Denies the get_feeds_by_package command without any pre-configured scope. feed-api:allow-get-feeds-packages Description: Enables the get_feeds_packages command without any pre-configured scope. feed-api:deny-get-feeds-packages Description: Denies the get_feeds_packages command without any pre-configured scope. feed-api:allow-get-ollama-status Description: Enables the get_ollama_status command without any pre-configured scope. feed-api:deny-get-ollama-status Description: Denies the get_ollama_status command without any pre-configured scope. feed-api:allow-launch-ollama Description: Enables the launch_ollama command without any pre-configured scope. feed-api:deny-launch-ollama Description: Denies the launch_ollama command without any pre-configured scope. feed-api:allow-mark-as-read Description: Enables the mark_as_read command without any pre-configured scope. feed-api:deny-mark-as-read Description: Denies the mark_as_read command without any pre-configured scope. feed-api:allow-open-article-external Description: Enables the open_article_external command without any pre-configured scope. feed-api:deny-open-article-external Description: Denies the open_article_external command without any pre-configured scope. feed-api:allow-query-by-id Description: Enables the query_by_id command without any pre-configured scope. feed-api:deny-query-by-id Description: Denies the query_by_id command without any pre-configured scope. feed-api:allow-read-feed-contents Description: Enables the read_feed_contents command without any pre-configured scope. feed-api:deny-read-feed-contents Description: Denies the read_feed_contents command without any pre-configured scope. feed-api:allow-remove-feed Description: Enables the remove_feed command without any pre-configured scope. feed-api:deny-remove-feed Description: Denies the remove_feed command without any pre-configured scope. feed-api:allow-remove-feeds-package Description: Enables the remove_feeds_package command without any pre-configured scope. feed-api:deny-remove-feeds-package Description: Denies the remove_feeds_package command without any pre-configured scope. feed-api:allow-rename-feed Description: Enables the rename_feed command without any pre-configured scope. feed-api:deny-rename-feed Description: Denies the rename_feed command without any pre-configured scope. feed-api:allow-rename-feeds-package Description: Enables the rename_feeds_package command without any pre-configured scope. ``` -------------------------------- ### Rust Database Connection Pool Type Source: https://github.com/sopaco/saga-reader/blob/main/docs/Introduction-of-the-solution.md Defines a type alias for a thread-safe, asynchronous database connection pool using Tokio's Mutex and SeaORM. ```rust use sea_orm::DatabaseConnection; use std::sync::Arc; use tokio::sync::Mutex; pub type DBConnPool = Arc>; // Database connection pool implementation ``` -------------------------------- ### Feed API Permissions for Rename Feeds Package Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `rename_feeds_package` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-rename-feeds-package Enables the rename_feeds_package command without any pre-configured scope. feed-api:deny-rename-feeds-package Denies the rename_feeds_package command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions for Set Favorite Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `set_favorite` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-set-favorite Enables the set_favorite command without any pre-configured scope. feed-api:deny-set-favorite Denies the set_favorite command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions for Update Article by Source Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `update_article_by_source` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-update-article-by-source Enables the update_article_by_source command without any pre-configured scope. feed-api:deny-update-article-by-source Denies the update_article_by_source command without any pre-configured scope. ``` -------------------------------- ### Feed API Permissions for Update Feed Contents Source: https://github.com/sopaco/saga-reader/blob/main/crates/tauri-plugin-feed-api/permissions/autogenerated/reference.md Manages permissions for the `update_feed_contents` command. This includes enabling and denying the command without any pre-configured scope. ```APIDOC feed-api:allow-update-feed-contents Enables the update_feed_contents command without any pre-configured scope. feed-api:deny-update-feed-contents Denies the update_feed_contents command without any pre-configured scope. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.