diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f037bcd..cb1aebd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,110 @@ -name: "Build Organizer" -on: workflow_dispatch +name: 'build_release' + +on: + workflow_dispatch: + push: + branches: + - master jobs: - publish-tauri: + create-release: + permissions: + contents: write + runs-on: ubuntu-20.04 + outputs: + release_id: ${{ steps.create-release.outputs.result }} + + steps: + - uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: get version + run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV + - name: create release + id: create-release + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { data } = await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: `SmartOrganizer-v${process.env.PACKAGE_VERSION}`, + name: `SmartOrganizer-v${process.env.PACKAGE_VERSION}`, + body: 'Take a look at the assets to download and install this app.', + draft: true, + prerelease: false + }) + return data.id + + build-tauri: + needs: create-release + permissions: + contents: write strategy: fail-fast: false matrix: - platform: [macos-latest, ubuntu-latest, windows-latest] + platform: [macos-latest, ubuntu-20.04, windows-latest] + runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 - - name: setup node - uses: actions/setup-node@v1 - with: - node-version: 16 - - name: install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: install webkit2gtk (ubuntu only) - if: matrix.platform == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 - - name: install app dependencies and build it - run: npm i - - uses: tauri-apps/tauri-action@v0.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tagName: smart-organizer-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version - releaseName: "smart-organizer-v__VERSION__" - releaseBody: "See the assets to download this version and install." - releaseDraft: false - prerelease: false + - uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: install Rust stable + uses: dtolnay/rust-toolchain@nightly + + - name: caching rust stuff + uses: Swatinem/rust-cache@v2 + + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + + - name: install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: install frontend dependencies + run: pnpm install # change this to npm or pnpm depending on which one you use + + - uses: tauri-apps/tauri-action@dev + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + + with: + releaseId: ${{ needs.create-release.outputs.release_id }} + includeUpdaterJson: true + + publish-release: + permissions: + contents: write + runs-on: ubuntu-20.04 + needs: [create-release, build-tauri] + + steps: + - name: publish release + id: publish-release + uses: actions/github-script@v6 + env: + release_id: ${{ needs.create-release.outputs.release_id }} + with: + script: | + github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: process.env.release_id, + draft: false, + prerelease: false + }) diff --git a/.gitignore b/.gitignore index 8cc795e..2a88694 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +pnpm-lock.yaml + node_modules -.DS_Store dist dist-ssr *.local -config.yaml -generate_data.py -package-lock.json \ No newline at end of file +Cargo.lock + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +payload-example.ts +.vscode +/**/*.db \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 3dc5b08..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["johnsoncodehk.volar"] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 17d535f..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "css.lint.unknownAtRules": "ignore", -} \ No newline at end of file diff --git a/README.md b/README.md index 9119f64..0275f7a 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,40 @@ -# ![alt repo-icon](./src/assets/icons/broom.svg) Smart Organizer - -Smart Organizer is an application that aims to improve your overall desktop/workspace tidiness, by allowing you to set a variety of **Rules**. - -## Demo: -![alt repo-icon](./demo/demo.gif) -## Personal Usecases: - - Removing unwanted files. - - Sorting Light Novel Books, Coding Books. - - Moving school documents into appropriate folders. - - Moving anime episodes into correct folder. - - Cleaning unused environment directories or project folders like venv folders, node_modules and rust target folders etc. - -## How does it work? -This app is uses quite a bit of jargons, namely: -- **Listener** - This is the term given to the component that sends the signal to the rust backend to organize on a defined interval. -- **Rule** - A rule is a condition a file or path must follow in order to carry out an **Action**. Definition: -```ts -interface Rule { - search_type: "Folder Name" | "File Name" | "File Extension" | "File Content" | "FileSize" | "Path Name", - condition: "Includes" | "Not Includes" | "Exact Match" | "Is Not", - text: string // text being the value to match -} -``` -- **Action** - A tuple consisting of the action to perform as well as optionally a destination respectively. Definition: -```ts -type ActionType = "MOVE" | "COPY" | "DELETE" | "UNLINK" | "RENAME"; - -type Action = [ActionType, string]; - -``` -A **Rule** is provided and in accordance to that rule, if files/directories match in the specified path an **Action** is performed. The option of scanning a directory of depth 1 or recursively is also made possible. -## Major changes from prerelease - - More modern UI. - - More readable codebase. - - Tree browser moved from clicking listener to dedicated button in listener's modal. - - Listener's modal opens on a single click instead of double. - -## Upcoming -- Empty States -- Refactor rust backend -- MacOs like titlebar and more... - -## Additionals -- If you wanna see the previous version for contrast check releases and download the prerelease. Idk why but the option I guess. +# SmartOrganizer +SmartOrganizer is a powerful application designed to enhance your desktop/workspace tidiness by allowing you to define custom rules and actions for automated organization tasks. Whether you need to declutter your desktop, sort files into specific folders, or clean up unused directories, SmartOrganizer has you covered. +## Features + +- **Book Sorting:** Organize your light novel books, coding books, or any other category with ease. +- **Document Management:** Efficiently categorize and move school documents into appropriate folders. +- **Directory Cleanup:** Automatically clean up unused environment directories or project folders, such as `python venv` directories, `node_modules/`, and `src/target/`. + +## How It Works + +SmartOrganizer simplifies the task of maintaining a tidy workspace. You can define rules and actions using a simple configuration, and the application will take care of the rest. Here's a basic example of how it works: + +# Getting Started + +To get started with SmartOrganizer, follow these steps: + + Installation: Clone this repository or download the latest release from the Releases page. + + Configuration: Customize the rules and actions in the config.yaml file to suit your organization needs. + + Execution: Run SmartOrganizer, and watch as it automatically organizes your workspace according to your rules. + + Enjoy a Tidier Workspace: Sit back and enjoy your organized desktop/workspace without the hassle of manual organization. + +## Contributing + +We welcome contributions from the open-source community. If you'd like to contribute to SmartOrganizer, please follow our Contribution Guidelines. +License + +This project is licensed under the MIT License - see the LICENSE file for details. +## Acknowledgments + + Special thanks to [Author Name] for [specific contribution]. + Inspiration drawn from [inspiration source]. + +## Contact + +If you have any questions or suggestions, feel free to contact us at [your-email@example.com]. diff --git a/components.json b/components.json new file mode 100644 index 0000000..8211d31 --- /dev/null +++ b/components.json @@ -0,0 +1,15 @@ +{ + "style": "default", + "typescript": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/style.css", + "baseColor": "slate", + "cssVariables": true + }, + "framework": "vite", + "aliases": { + "components": "@/components", + "utils": "@/lib/utils" + } +} \ No newline at end of file diff --git a/demo/demo.gif b/demo/demo.gif deleted file mode 100644 index e3e0ab9..0000000 Binary files a/demo/demo.gif and /dev/null differ diff --git a/index.html b/index.html index 09ecc2a..ab69285 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,21 @@ - - - - - Vite App - - -
-