#notes #markdown #edit #hierarchical #applications #organize #note

app my-notes

一个简单的笔记应用,用于以 Markdown 格式创建分层笔记

7 个稳定版本

1.3.0 2024年4月18日
1.2.2 2024年4月12日
1.1.2 2024年3月31日
1.1.0 2024年3月27日
1.0.0 2024年3月27日

135Cargo 插件 中排名

Download history 12/week @ 2024-05-20

401 每月下载量

MIT 许可证

23KB
488

我的笔记应用

概述

My Notes 是一个简单的命令行笔记应用,旨在帮助您高效地组织和管理工作笔记。它提供了创建、编辑、列出和删除笔记的基本功能。

入门指南

要使用 My Notes,请按照以下步骤操作

  1. 安装

    • 将仓库克隆到您的本地计算机上。
    • 确保您已安装 Rust 和 Cargo。
  2. 构建应用

    • 导航到项目目录。
    • 运行 cargo build --release 来编译应用程序。
  3. 运行应用

    • 构建完成后,您可以使用生成的二进制文件运行应用程序。

用法

my-notes[子命令] [选项]

子命令

  • new - 创建一个新的笔记。
    • 用法: my-notes new <路径>
    • 参数
      • -c --content : 字符串 - 添加内联内容
      • -b --blank: 布尔型 - 标记为空白笔记
  • ls - 列出笔记。
    • 用法: my-notes ls [路径]
  • edit - 编辑现有的笔记。
    • 用法: my-notes edit <路径>
  • rm - 删除一个笔记。
    • 用法: my-notes rm <路径>
    • 参数
      • -f --force : 布尔型 - 强制删除不确认
  • search - 通过关键字查找笔记。
    • 用法: my-notes search <keyword>
  • echo - 打印笔记的内容。
    • 用法: my-notes echo <path>
  • help - 显示帮助信息。
    • 用法: my-notes help [SUBCOMMAND]
  • version - 显示版本信息。
    • 用法: my-notes version
  • view - 以渲染的 Markdown 显示笔记。
    • 用法: my-notes view <path>

示例

  • 创建一个新的笔记
    my-notes new my-note
    
  • 列出所有笔记
    my-notes ls
    
  • 列出特定路径下的笔记
    my-notes ls my-note.subnote
    
  • 编辑一个笔记
    my-notes edit my-note
    
  • (带确认)删除一个笔记
    my-notes rm my-note
    
  • (不带确认)删除一个笔记
    my-notes rm my-note --force
    
  • 通过关键字查找笔记
    my-notes search keyword
    
  • 打印笔记的内容
    my-notes echo my-note
    
  • 以渲染的 Markdown 显示笔记
    my-notes view my-note
    
  • 显示版本信息
    my-notes version
    
  • 显示帮助信息
    my-notes help
    

注意

  • 应用程序使用默认系统编辑器。设置 EDITOR 环境变量以更改它。
  • 笔记存储在 ~/.notes 目录中。
  • 应用程序以树形结构组织笔记。

使用搜索寄存器

  • 使用 search 子命令搜索关键字后,搜索结果存储在 .register 文件中。
  • 您现在可以使用模板 reg:<index> 来引用特定索引处的搜索寄存器中的值。这将帮助避免需要键入完整的笔记路径。
my-notes search keyword

#Output
this.is.a.note_that_contains_keyword
this.is.another.note_with_key_word

my-notes edit reg:0 # edit this.is.a.note_that_contains_keyword
my-notes edit reg:1 # edit this.is.another.note_with_key_word

my-notes view reg:0 # view this.is.a.note_that_contains_keyword
my-notes view reg:1 # view this.is.another.note_with_key_word

注意:每次进行新的搜索时,搜索寄存器都会被覆盖。

重要

  • 删除笔记将从索引和您的本地计算机中永久删除它及其所有子项。此操作无法撤销。

版本

My Notes v0.1.0

支持

有关任何问题或疑问,请在 GitHub 上创建一个问题问题

许可证

本应用程序根据 MIT 许可证 发布。


注意:用实际值替换占位符(<path>)。

依赖关系

~5–14MB
~140K SLoC