|
1 | | -# Nepdate calendar |
2 | | -`nepdate-calendar` provides a standalone Nepali calendar and converter for Bikram Sambat and Gregorian calendars. |
| 1 | +# Bikram Sambat Calendar |
3 | 2 |
|
4 | | -# Nepdate widget |
| 3 | +A modern React + TypeScript web application for converting and viewing Nepali (Bikram Sambat) and Gregorian dates, with tithi calculation, event/holiday display, and a beautiful calendar UI. |
5 | 4 |
|
6 | | -`nepdate-widget` is a desktop floating widget for Linux that displays the Nepali date. It provides the following features: |
| 5 | +## Features |
7 | 6 |
|
8 | | -- Displays the Nepali date on your desktop. |
9 | | -- Can be moved anywhere on the screen. |
10 | | -- with automatic text color adjustment based on the background color. |
| 7 | +- Convert between Bikram Sambat (BS) and Gregorian (AD) dates |
| 8 | +- View Nepali and English months, days, and years |
| 9 | +- Calculate lunar tithi for any date |
| 10 | +- See major Nepali festivals and holidays |
| 11 | +- Responsive, accessible, and print-friendly calendar UI |
| 12 | +- Toggle between Nepali and English language |
| 13 | +- "Show in Calendar" and event modal support |
| 14 | +- Built with [Vite](https://vitejs.dev/), [React](https://react.dev/), [Tailwind CSS](https://tailwindcss.com/), and [shadcn/ui](https://ui.shadcn.com/) |
11 | 15 |
|
12 | | -##To-Do List |
| 16 | +## Getting Started |
13 | 17 |
|
14 | | -1. Create an installable DEB file for Debian-based distributions. (released appimages for wider linux distributions but gcc version is high now in release build. I will build with lower gcc version in future release.) |
15 | | -2. Make the calendar responsive to window resizing.(Done) |
16 | | -3. Implement tithi and other panchanga calculations in the calendar app.( Tithi implemented. in future i will check other components like nakshatra karan and yoga too.) |
17 | | -4. make cross plateform application. now nepdate-calendar and widget builds and runs perfectly in windows. |
18 | | -using qtcreator and mingw compiler. not tested cmake.(Done) |
| 18 | +### Prerequisites |
19 | 19 |
|
20 | | -## Dependencies |
| 20 | +- [Node.js](https://nodejs.org/) (v18+ recommended) |
| 21 | +- [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/) |
21 | 22 |
|
22 | | -Nepdate and calendar relies on the following Qt libraries: |
| 23 | +### Installation |
23 | 24 |
|
24 | | -- Qt Core |
25 | | -- Qt Widgets |
26 | | -- Qt GUI |
| 25 | +```sh |
| 26 | +git clone https://github.com/yourusername/nepdate.git |
| 27 | +cd nepdate |
| 28 | +yarn install |
| 29 | +# or |
| 30 | +npm install |
| 31 | +``` |
27 | 32 |
|
28 | | -## Usage |
| 33 | +### Development |
29 | 34 |
|
30 | | -1. Clone this repository to your local machine. |
31 | | -2. Create a build folder in the project directory. |
32 | | -3. Build the project using `cmake ..` and then run `make all`. |
33 | | -4. You can also compile the project using Qt Creator or Qmake. |
34 | | -5. Run the Nepdate executables: |
35 | | - `nepdate-widget` for the desktop widget |
36 | | - `nepdate-calendar` for the calendar |
37 | | -6. The floating Nepali date widget will appear on your desktop, with automatic text color adjustment based on the background color. |
| 35 | +Start the local development server: |
38 | 36 |
|
39 | | -## Screenshots |
40 | | -nepdate in action  |
| 37 | +```sh |
| 38 | +yarn dev |
| 39 | +# or |
| 40 | +npm run dev |
| 41 | +``` |
41 | 42 |
|
| 43 | +Open [http://localhost:8080](http://localhost:8080) in your browser. |
42 | 44 |
|
43 | | -## License |
| 45 | +> **Note:** If you encounter a "too many open files" error, you may need to increase your system's file watch limit. See [this StackOverflow answer](https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached) for help. |
| 46 | +
|
| 47 | +### Local Production Build |
| 48 | + |
| 49 | +Build and preview locally: |
| 50 | + |
| 51 | +```sh |
| 52 | +yarn build |
| 53 | +yarn preview |
| 54 | +# or |
| 55 | +npm run build |
| 56 | +npm run preview |
| 57 | +``` |
| 58 | + |
| 59 | +This will output the production build to the `dist/` directory, which is **not pushed to GitHub**. |
| 60 | + |
| 61 | +### Build for GitHub Pages |
| 62 | + |
| 63 | +To build for GitHub Pages (output to `docs/` and set correct base path): |
| 64 | + |
| 65 | +```sh |
| 66 | +yarn build-gh |
| 67 | +# or |
| 68 | +npm run build-gh |
| 69 | +``` |
| 70 | + |
| 71 | +Preview the GitHub Pages build locally: |
44 | 72 |
|
45 | | -This project is licensed under the **GNU General Public License (GPL) version 3**. See the LICENSE file for details. |
| 73 | +```sh |
| 74 | +yarn preview-gh |
| 75 | +# or |
| 76 | +npm run preview-gh |
| 77 | +``` |
46 | 78 |
|
47 | | -## contribution |
| 79 | +This will output the production build to the `docs/` directory, which **should be committed and pushed** to your repository for GitHub Pages deployment. |
48 | 80 |
|
49 | | -first of all any suggestion and bug reports can be filed on github issue here https://github.com/khumnath/nepdate/issues |
| 81 | +### Deploy to GitHub Pages |
| 82 | + |
| 83 | +1. Commit and push the `docs` folder to your repository. |
| 84 | +2. In your repository settings, set GitHub Pages to serve from the `docs` folder on the `main` branch. |
| 85 | +3. Your site will be available at `https://<username>.github.io/nepdate/`. |
| 86 | + |
| 87 | +## Project Structure |
| 88 | + |
| 89 | +``` |
| 90 | +├── bikram-calendar/ # Bikram Sambat calendar calculation library |
| 91 | +├── src/ # React app source code |
| 92 | +│ ├── components/ # React components |
| 93 | +│ ├── data/ # Event and holiday data |
| 94 | +│ ├── hooks/ # Custom React hooks |
| 95 | +│ ├── utils/ # Utility functions |
| 96 | +│ └── index.css # Main CSS (Tailwind) |
| 97 | +├── docs/ # Production build output for GitHub Pages (should be pushed) |
| 98 | +├── dist/ # Production build output for local preview (not pushed) |
| 99 | +├── index.html # Main HTML entry |
| 100 | +├── package.json |
| 101 | +├── postcss.config.js |
| 102 | +├── tailwind.config.ts |
| 103 | +└── vite.config.ts |
| 104 | +``` |
| 105 | + |
| 106 | +## Scripts |
| 107 | + |
| 108 | +| Command | Description | |
| 109 | +|-----------------|---------------------------------------------| |
| 110 | +| `dev` | Start local dev server | |
| 111 | +| `build` | Build for local production (`dist/`) | |
| 112 | +| `preview` | Preview local production build | |
| 113 | +| `build-gh` | Build for GitHub Pages (`docs/`) | |
| 114 | +| `preview-gh` | Preview GitHub Pages build | |
| 115 | +| `lint` | Run ESLint | |
| 116 | + |
| 117 | +## Notes on Build Outputs |
| 118 | + |
| 119 | +- The `dist/` directory is for local production builds and **should not be pushed to Git**. |
| 120 | +- The `docs/` directory is for GitHub Pages deployment and **should be committed and pushed**. |
| 121 | + |
| 122 | +## License |
50 | 123 |
|
51 | | -# for contribution |
52 | | -1. Clone repository |
53 | | - 2. make changes |
54 | | - 3. make a pull request with proper description of changes. |
| 124 | +This project is licensed under the [GPL v3 or later](https://www.gnu.org/licenses/gpl-3.0.en.html). |
55 | 125 |
|
| 126 | +--- |
56 | 127 |
|
| 128 | +**Made with love by Khumnath.** |
0 commit comments