From 645064e7749592980fed4eb1127150448f8e1ae5 Mon Sep 17 00:00:00 2001 From: Zihlu Wang Date: Mon, 7 Aug 2023 11:56:09 +0800 Subject: [PATCH] docs(webcal): Optimised docs --- README.md | 16 +--- pom.xml | 15 ++++ simple-jwt-spring-boot-starter/README.md | 1 + webcal/README.md | 95 ++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 14 deletions(-) create mode 100644 webcal/README.md diff --git a/README.md b/README.md index 567d27b..2ddfb14 100644 --- a/README.md +++ b/README.md @@ -21,25 +21,13 @@ high-precision chained mathematical calculations, and string hashing or message A facade for Simple JWT (JSON Web Token) implementations in Java. This module provides a unified interface to work with JWTs regardless of the underlying implementation. -### `simple-jwt-auth0` _[Learn more](./simple-jwt-facade/README.md)_ +### `simple-jwt-authzero` _[Learn more](./simple-jwt-facade/README.md)_ A Simple JWT implementation using the com.auth0:java-jwt library. ### `simple-jwt-spring-boot-starter` _[Learn more](./simple-jwt-spring-boot-starter/README.md)_ A Spring Boot auto-configuration wrapper for the simple-jwt module, making it easier to integrate JWT functionality into Spring Boot applications. -### `sms-sender-facade` _[Learn more](./sms-sender-facade/README.md)_ -A facade for sending SMS messages in Java. This module abstracts the interfaces of various SMS service providers. - -### `sms-sender-aliyun` _[Learn more](./sms-sender-aliyun/README.md)_ -An implementation of SMS Sender using the Alibaba Cloud (Aliyun) service. - -### `sms-sender-tencent` _[Learn more](./sms-sender-tencent/README.md)_ -An implementation of SMS Sender using the Tencent Cloud service. - -### `sms-sender-spring-boot-starter` _[Learn more](./sms-sender-spring-boot-starter/README.md)_ -A Spring Boot auto-configuration wrapper for the `sms-sender-facade` module, simplifying the integration of SMS sending capabilities into Spring Boot applications. - ## Installation and Usage If you are using `maven`, please paste the following codes to `pom.xml` in your project. @@ -61,7 +49,7 @@ If you want to check the available versions, please check out at our [official s ## Contribution Contributions are welcome! If you encounter any issues or want to contribute to the project, please feel free to -**[raise an issue](https://github.com/CodeCraftersCN/jdevkit/issues/new)** or **[submit a pull request]()**. +**[raise an issue](https://github.com/CodeCraftersCN/jdevkit/issues/new)** or **[submit a pull request](https://github.com/CodeCraftersCN/jdevkit/compare)**. ## License This project is licensed under the [Apache License 2.0](LICENSE). diff --git a/pom.xml b/pom.xml index 98e423b..2177a31 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,7 @@ + org.junit junit-bom @@ -90,35 +91,42 @@ import + org.slf4j slf4j-api ${slf4j-api.version} + + ch.qos.logback logback-classic ${logback.version} + org.projectlombok lombok ${lombok.version} + com.fasterxml.jackson.core jackson-databind ${jackson.version} + com.auth0 java-jwt ${auth0-jwt.version} + io.jsonwebtoken jjwt-api @@ -145,6 +153,13 @@ + + com.squareup.okhttp3 + okhttp + 4.11.0 + + + cn.org.codecrafters devkit-core diff --git a/simple-jwt-spring-boot-starter/README.md b/simple-jwt-spring-boot-starter/README.md index 0f84fc6..7dd1bb2 100644 --- a/simple-jwt-spring-boot-starter/README.md +++ b/simple-jwt-spring-boot-starter/README.md @@ -14,6 +14,7 @@ Module `simple-jwt-spring-boot-starter` is a lightweight and easy-to-use Spring > If you implemented one on your own, please contact us to add your artifact to this list. - [`cn.org.codecrafters:simple-jwt-authzero`](../simple-jwt-authzero/README.md) +- [`cn.org.codecrafters:simple-jwt-jjwt`](../simple-jwt-jjwt/README.md) ## Installation diff --git a/webcal/README.md b/webcal/README.md new file mode 100644 index 0000000..ec896ed --- /dev/null +++ b/webcal/README.md @@ -0,0 +1,95 @@ +# Module `webcal` + +## Introduction + +The module `webcal` is a Java library that facilitates the generation and resolution of iCalendar content for web-based calendar applications. It provides a flexible and easy-to-use API for creating web calendars with customizable settings and events. + +### Key features + +- Create and manage web calendars with events, including event details such as summary, description, location, and more. +- Define event classifications and categories for better organization and filtering of calendar data. +- Set event start and end times, durations, and time zones to handle various scheduling scenarios. +- Configure event priorities and completion percentages for visual representation in the calendar. +- Generate iCalendar format output suitable for web calendar applications. + +With the `webcal` module, developers can easily integrate calendar functionality into web applications, enabling users to view, add, and manage events in a structured and standardized format. It is designed to simplify calendar-related tasks and enhance the overall user experience when dealing with calendar data on the web. + +Please note that the `webcal` module adheres to the iCalendar standard specified in RFC 5545, ensuring compatibility with other calendar applications that support this format. + +## Prerequisites + +- This whole `JDevKit` is developed by **JDK 17**, which means you have to use JDK 17 for better experience. + +## Installation + +## Installation + +### If you are using `Maven` + +It is quite simple to install this module by `Maven`. The only thing you need to do is find your `pom.xml` file in the project, then find the `` node in the `` node, and add the following codes to `` node: + +```xml + + ${implementation-builder-group-id} + simple-jwt-${any-implementation} + ${simple-jwt-${any-implementation}.version} + + + cn.org.codecrafters + simple-jwt-spring-boot-starter + ${simple-jwt-spring-boot-starter.version} + +``` + +And run `mvn dependency:get` in your project root folder(i.e., if your `pom.xml` is located at `/path/to/your/project/pom.xml`, then your current work folder should be `/path/to/your/project`), then `Maven` will automatically download the `jar` archive from `Maven Central Repository`. This could be **MUCH EASIER** if you are using IDE(i.e., IntelliJ IDEA), the only thing you need to do is click the refresh button of `Maven`. + +If you are restricted using the Internet, and have to make `Maven` offline, you could follow the following steps. + +1. Download the `jar` file from any place you can get and transfer the `jar` files to your work computer. +2. Move the `jar` files to your local `Maven` Repository as the path of `/path/to/maven_local_repo/cn/org/codecrafters/simple-jwt-spring-boot-starter/` and `/path/to/maven_local_repo/${implementation-builder-group-seperated-by-system-seperator}/${implementation_artifact_id}`. + +### If you are using `Gradle` + +Add this module to your project with `Gradle` is much easier than doing so with `Maven`. + +Find `build.gradle` in the needed project, and add the following code to the `dependencies` closure in the build script: + +```groovy +implementation '${implementation-builder-group-id}:simple-jwt-${any-implementation}:${simple-jwt-${any-implementation}.version}' +implementation 'cn.org.codecrafters:simple-jwt-spring-boot-starter:${simple-jwt-spring-boot-starter.version}' +``` + +### If you are not using `Maven` or `Gradle` + +1. Download the `jar` file from the Internet. +2. Create a folder in your project and name it as a name you like(i.e., for me, I prefer `vendor`). +3. Put the `jar` file to the folder you just created in Step 2. +4. Add this folder to your project `classpath`. + +## Create a web calendar + +```java +var calendar = new WebCalendar() + // set the properties for web calendar here. + ; +``` + +## Add a calendar node to this calendar + +```java +calendar.addNode(new WebCalendarNode() + // set properties for this node here. + ); +``` + +## Resolve this calendar. + +```java +var calendarString = calendar.resolve(); +``` + +## Contact + +If you have any suggestions, ideas, don't hesitate contacting us via [GitHub Issues](https://github.com/CodeCraftersCN/jdevkit/issues/new) or [Discord Community](https://discord.gg/NQK9tjcBB8). + +If you face any bugs while using our library and you are able to fix any bugs in our library, we would be happy to accept pull requests from you on [GitHub](https://github.com/CodeCraftersCN/jdevkit/compare). \ No newline at end of file