This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename notebook to notetree
refactor: rename notebook to notetree
- Loading branch information
Showing
42 changed files
with
315 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import evonote, json | ||
from evonote.gui.notetree import get_json_for_treemap | ||
from evonote.transform.module_to_notetree import get_notetree_for_module | ||
notetree = get_notetree_for_module(evonote) | ||
tree = get_json_for_treemap(notetree.root) | ||
f = open('output/project_tree.json', 'w');json.dump(tree, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from evonote.notebook.notebook import Notebook | ||
from evonote.notetree import Tree | ||
|
||
|
||
class AgentState: | ||
def __init__(self): | ||
self.root_notebook = Notebook( | ||
"root notebook that indexes all available notebooks") | ||
self.root_notetree = Tree( | ||
"root notetree that indexes all available notetrees") | ||
self.objective_stack = [] | ||
self.logs = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .tree import Tree | ||
from .note import Note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import List | ||
|
||
from evonote.notetree import Note | ||
from evonote.notetree import Tree | ||
|
||
|
||
class Bookshelf(Tree): | ||
def __init__(self, root_content): | ||
super().__init__(root_content) | ||
|
||
def add_notetree_by_path(self, path: List[str], notetree: Tree): | ||
note = get_note_for_notetree(notetree, self) | ||
self.add_note_by_path(path, note) | ||
return note | ||
|
||
|
||
def get_note_for_notetree(notetree: Tree, default_notetree: Tree) -> Note: | ||
note = Note(default_notetree) | ||
note.resource.add_notetree(notetree, notetree.topic) | ||
note.be("A notetree with root_content: " + notetree.topic) | ||
return note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.