Skip to content

Commit

Permalink
Merge pull request #6 from dre-bk201/dev
Browse files Browse the repository at this point in the history
merging dev branch
  • Loading branch information
dre-bk201 authored Oct 22, 2023
2 parents 3dc32ba + d3f5268 commit b7508d1
Show file tree
Hide file tree
Showing 223 changed files with 11,968 additions and 15,318 deletions.
131 changes: 102 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
})
29 changes: 25 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Cargo.lock

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
payload-example.ts
.vscode
/**/*.db
3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

83 changes: 38 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 [[email protected]].
15 changes: 15 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
Binary file removed demo/demo.gif
Binary file not shown.
29 changes: 18 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app" class="dark"></div>
<div id="modal" />
<script type="module" src="/src/main.ts"></script>
</body>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SmartOrganizer</title>
<style>
.events {
pointer-events: unset !important;
}
</style>
</head>

<body oncontextmenu="return false;" class="events">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
Loading

0 comments on commit b7508d1

Please sign in to comment.