一款JavaFX实现的日记本

641 阅读2分钟

项目GitHub链接:(wxxlamp/WxxDiary: 日记本 (github.com))

idea Community 2021.2.4

JDK 1.8 Amazon

Introduction

Wxx-Diary(以下简称WD)是一款采用Java实现的,开源的一款本地日记工具。WD针对的用户群体是像作者一样的,长期写日记的,仅能自己读写的,目前只能在电脑端使用的群体。

不同于现有的在线博客记录(如简书,CSDN,Wrodpress,GitPages等),离线文本编辑工具(如Typora,Word等),WD是一款安全的,条理清晰的,一款专门针对与写私密日记的软件。

QA

Q1. 写日记为什么不能用文本编辑器?

  1. 如果所有的日记全写到一个文档中,读取速度慢,且还需要自行写入每次写日记的时间,可视性差
  2. 如果每天的日记写到一个文档中,按照周或者月的维度来建立文件夹,这样用户关心各个文档的关系,写日记的成本会大大增加。同时,如果用户每次写日记只写几句话,但是却要关心这么多操作,也是一项不明智的选择 不能插入图片(或者是插入图片方式繁琐)

Q2. 写日记为什么不能用在线博客记录?

  1. 信息安全得不到保证
  2. 博客中除了日记还会有其他内容,这对日记内容搜索,格式,都显得太过麻烦
  3. 其实对于我来说,我觉得在线博客太重了,写日记本来就是一个特别容易半途而废的事情,再加上使用在线博客这么重的方式,用户会放弃的更快

Q3. 写日记为什么要用WD?

WD的大方向是文本编辑器,但是它只针对于写日记 WD的目标是让用户只关心写日记和看日记,其他的完全不用关心

Function

  •  具有编辑器的功能:可以编辑,保存,打开等一系列功能
  •  只能写当天日记;可以直观地查看在本台PC中写了多少篇日记,每次日记的书写时间
  •  具有加密解密等功能,打开程序需要输入密码
  •  可以在每篇日记中插入图片,同时,不影响加载效率
  •  导出功能:假如用户要迁移数据,则可以通过导出功能将所有文件(夹)导出到其他disk中,然后在其他PC中使用WD的导入功能依然可以运行

image.png

image.png

image.png

image.png

image.png

image.png image.png pol.xml:

 
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>cn.wxxlamp</groupId>
    <artifactId>WxxDiary</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.jfoenix</groupId>
            <artifactId>jfoenix</artifactId>
            <version>8.0.10</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.18</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.72</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>23.0</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>11</version>
        </dependency>

    </dependencies>
    <properties>
        <java.version>8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
    </properties>

</project>

image.png