docs(webcal): Optimised docs

This commit is contained in:
Zihlu Wang
2023-08-07 11:56:09 +08:00
parent fdd9d435a2
commit 645064e774
4 changed files with 113 additions and 14 deletions
+2 -14
View File
@@ -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 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. JWTs regardless of the underlying implementation.
### `simple-jwt-auth0` <span style="font-size: 14px;">_[Learn more](./simple-jwt-facade/README.md)_</span> ### `simple-jwt-authzero` <span style="font-size: 14px;">_[Learn more](./simple-jwt-facade/README.md)_</span>
A Simple JWT implementation using the com.auth0:java-jwt library. A Simple JWT implementation using the com.auth0:java-jwt library.
### `simple-jwt-spring-boot-starter` <span style="font-size: 14px;">_[Learn more](./simple-jwt-spring-boot-starter/README.md)_</span> ### `simple-jwt-spring-boot-starter` <span style="font-size: 14px;">_[Learn more](./simple-jwt-spring-boot-starter/README.md)_</span>
A Spring Boot auto-configuration wrapper for the simple-jwt module, making it easier to integrate JWT functionality into A Spring Boot auto-configuration wrapper for the simple-jwt module, making it easier to integrate JWT functionality into
Spring Boot applications. Spring Boot applications.
### `sms-sender-facade` <span style="font-size: 14px;">_[Learn more](./sms-sender-facade/README.md)_</span>
A facade for sending SMS messages in Java. This module abstracts the interfaces of various SMS service providers.
### `sms-sender-aliyun` <span style="font-size: 14px;">_[Learn more](./sms-sender-aliyun/README.md)_</span>
An implementation of SMS Sender using the Alibaba Cloud (Aliyun) service.
### `sms-sender-tencent` <span style="font-size: 14px;">_[Learn more](./sms-sender-tencent/README.md)_</span>
An implementation of SMS Sender using the Tencent Cloud service.
### `sms-sender-spring-boot-starter` <span style="font-size: 14px;">_[Learn more](./sms-sender-spring-boot-starter/README.md)_</span>
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 ## Installation and Usage
If you are using `maven`, please paste the following codes to `pom.xml` in your project. 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 ## Contribution
Contributions are welcome! If you encounter any issues or want to contribute to the project, please feel free to 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 ## License
This project is licensed under the [Apache License 2.0](LICENSE). This project is licensed under the [Apache License 2.0](LICENSE).
+15
View File
@@ -82,6 +82,7 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- JUnit 5 -->
<dependency> <dependency>
<groupId>org.junit</groupId> <groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId> <artifactId>junit-bom</artifactId>
@@ -90,35 +91,42 @@
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<!-- Simple Log Facade for java -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version> <version>${slf4j-api.version}</version>
</dependency> </dependency>
<!-- Logback -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback.version}</version> <version>${logback.version}</version>
</dependency> </dependency>
<!-- Lombok -->
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>${lombok.version}</version> <version>${lombok.version}</version>
</dependency> </dependency>
<!-- Jackson -->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version> <version>${jackson.version}</version>
</dependency> </dependency>
<!-- java-jwt -->
<dependency> <dependency>
<groupId>com.auth0</groupId> <groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId> <artifactId>java-jwt</artifactId>
<version>${auth0-jwt.version}</version> <version>${auth0-jwt.version}</version>
</dependency> </dependency>
<!-- jjwt -->
<dependency> <dependency>
<groupId>io.jsonwebtoken</groupId> <groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId> <artifactId>jjwt-api</artifactId>
@@ -145,6 +153,13 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
</dependency>
<!-- In-project modules -->
<dependency> <dependency>
<groupId>cn.org.codecrafters</groupId> <groupId>cn.org.codecrafters</groupId>
<artifactId>devkit-core</artifactId> <artifactId>devkit-core</artifactId>
+1
View File
@@ -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. > 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-authzero`](../simple-jwt-authzero/README.md)
- [`cn.org.codecrafters:simple-jwt-jjwt`](../simple-jwt-jjwt/README.md)
## Installation ## Installation
+95
View File
@@ -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 `<dependencies>` node in the `<project>` node, and add the following codes to `<dependencies>` node:
```xml
<dependency>
<groupId>${implementation-builder-group-id}</groupId>
<artifactId>simple-jwt-${any-implementation}</artifactId>
<version>${simple-jwt-${any-implementation}.version}</version>
</dependency>
<dependency>
<groupId>cn.org.codecrafters</groupId>
<artifactId>simple-jwt-spring-boot-starter</artifactId>
<version>${simple-jwt-spring-boot-starter.version}</version>
</dependency>
```
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).