Skip to content

Simple command line tool for maintaining handwritten notes in a tree structure using markdown.

License

Notifications You must be signed in to change notification settings

aditya-shriwastava/NotesTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotesTree

made-with-python Open Source Love svg1 MIT license

NotesTree is a command line tool for maintaining handwritten notes in a tree structure using markdown. This makes handwritten notes easy to navigate when need to reffer it. Check AI Notebook built using NotesTree for example.

Example NotesTree

Install

git clone https://github.com/aditya-shriwastava/NotesTree.git
cd NotesTree
./install.py
# ./uninstall.py to uninstall

Description

  • A node in a NotesTree is stored as directory on disk.
  • Every node will have have following:
    1. List of Appendices (*.md files) stored inside the Appendices directory.
    2. List of References stored in .reference file in markdown format.
    3. HandWritten note, stored as a sequence of pages as 1.jpg, 2.jpg, 3.jpg etc.
    4. Markdown notes, stored in Notes.md file.
    5. Child nodes, which are also a complete NotesTree in itself as sub directories.
    6. Autogenerated index.md file to view the NotesTree.
    7. Autogenerated .layout file which describes how child nodes will be displayed in index.md file.

Appendices example

'./Appendices/Simple Kotlin Hello World Example.md'
'./Appendices/Kotlin Class Constructor Example.md'

.reference file example

[Google](https://www.google.com://www.google.com/)
[Wikipedia](https://en.wikipedia.org/)

.layout file example (Autogenerated)

Order:
- "Chapter 1"
- "Chapter 2"
- "Chapter 3"
Ordered: True

index.md file (Autogenerated)

# Book
1. [Chapter 1](./Chapter%201/index.md)
2. [Chapter 2](./Chapter%202/index.md)
3. [Chapter 3](./Chapter%203/index.md)

## Appendices
* [Simple Kotlin Hello World Example](./Appendices/Simple%20Kotlin%20Hello%20World%20Example.md)
* [Kotlin Class Constructor Example](./Appendices/Kotlin%20Class%20Constructor%20Example.md)

## References
* [Google](https://www.google.com://www.google.com/)
* [Wikipedia](https://en.wikipedia.org/)

<!--Markdown Notes will be pasted here-->

# HandWritten Notes
<p align="center">
<img src="./1.jpg" alt="Page 1"/>
<img src="./2.jpg" alt="Page 2"/>
<img src="./3.jpg" alt="Page 3"/>
<img src="./4.jpg" alt="Page 4"/>
</p>

Tutorial

  1. Adding root node named Book.
$ notestree add-root Book
  • In general:
$ notestree add-root <root_name>
  1. Adding child nodes Chapter 1, Chapter 2 and Chapter 3 to Book.
$ cd Book
$ notestree add-child 'Chapter 1'
$ notestree add-child 'Chapter 2'
$ notestree add-child 'Chapter 3'
  • In general:
$ notestree add-child <child_name>
  • By default nodes will be added as ordered list, to convert from ordered to unorderde and vice versa, manually change the bool ordered in .layout file.
  • For changing the order of child nodes, manually change the order array in .layout file.
  1. Deleting child node Chapter 2 and Chapter 3.
$ notestree delete-child 'Chapter 2'
$ notestree delete-child 'Chapter 3'
  • In general:
$ notestree delete-child <child_name>
  1. Rename child node Chapter 1 to Part 1.
$ notestree rename-child 'Chapter 1' 'Part 1'
  • In general:
$ notestree rename-child <old_child_name> <new_child_name>
  1. Detach and attach child node Chapter 1 from it parent.
$ notestree detach-child 'Chapter 1'
$ notestree attach-child 'Chapter 1'
  • In general:
$ notestree detach-child <child_name>
$ notestree attach-child <child_name>
  • Detaching child node means making the child node a standalone NotesTree or it can be viewed as deleting link between child node and its parent. Attaching is just opposit of detaching.
  1. Updating NotesTree
  • For updating index.md file of the current node.
$ notestree update
  • For recursively updating index.md of current note as well as all its children nodes.
$ notestree rupdate
  1. Insert hand-written notes into a node of NotesTree.
  • It is assumed that:

    • ~/Public/ is the source directory from which images (i.e. hand-written notes) are inserted into NotesTree.
    • In ~/Public/ images are stored as 'X_1.jpg', 'X_2.jpg' etc.
  • Consider you have {'1.jpg', '2.jpg', '3.jpg', '4.jpg'} in your current node and you want to insert {'X_4.jpg', 'X_5.jpg', 'X_6.jpg'} from your source directory

    1. At index 3, 4 & 5 and shift the existing {'3.jpg', '4.jpg'} to {'6.jpg', '7.jpg'}
    $ notestree insert-notes 4 6 3
    • In general:
      $ notestree insert-notes <source-start-index> <source-end-index> <insert-position>
    1. At the end
    $ notestree insert-notes 4 6
    • In general:
      $ notestree insert-notes <source-start-index> <source-end-index>
  • Consider you want to insert 'X_7.jpg' from source directory at the end in your current node:

    $ notestree insert-notes 7
    • In general:
      $ notestree insert-notes <source-index>
  • Consider you want to insert everything from source directory at the end in your current node:

$ notestree insert-notes -1

Typical Workflow

  1. Scan hand-written notes using some document scanner app in smartphone.
  2. Save the notes as sequence of images prefixed with 'X' (i.e. 'X_1.jpg', 'X_2.jpg' etc).
  3. Share the sequence of image in ~/Public directory of your laptop over wifi (SMB, FTP etc).
  4. Incrementally build the NotesTree with these images.
  5. Update your NotesTree.
  6. View the index.md file generated in your browser (You need to have markdown plugin installed in your browser).

About

Simple command line tool for maintaining handwritten notes in a tree structure using markdown.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages