Skip to content

Feat 178 - #485

Open
thw26 wants to merge 15 commits into
mainfrom
feat-178
Open

Feat 178#485
thw26 wants to merge 15 commits into
mainfrom
feat-178

Conversation

@thw26

@thw26 thw26 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Fixed #178.

Implements a CLI subparser and modules that uses the Logos SQL databases to create Markdown notes of the user's content. The content is stored in <install_dir>/export. The output is designed around a flat file storage system made to work with Neovim and Obsidian. Three kinds of files are created:

  • Notebook files, which have a list of wiki style links [[ ]] to the output note files stored in a particular notebook.
  • Outline files, which have a list of wiki style links [[ ]] to references used in user notes.
  • Logos note files. Sample output below:
---
note_id: 199
external_id: da63c6d809b442f7aaf52b4b4366e89f
created: '2020-04-20T14:31:53Z'
modified: '2020-04-20T14:32:15Z'
notebook: Scripture & Systematics
tags:
- counseling
- honesty
- lying
anchors:
- resource_id: LLS:1.0.710
  logosres_id: esv
  url: https://ref.ly/logosres/esv
---

Interesting how the parallel reveals the heart

## Resources

- [English Standard Version](https://ref.ly/logosres/esv)

The code generates a basic link to the Logos resource. Due to the way data is stored, nothing more can be achieved for the Logos resource (i.e., location within a resource).

Some data in the above YAML header could be removed (resource_id, logosres_id).

Other tooling in this commit includes additional refactoring splitting up files, and also adding reusable SQL database functions.

Basic usage:

source venv/bin/activate
./scripts/run_app.py database notes export

Additional options have been implemented. Use --help along the way.

I intentionally did not implement a TUI command. If the GUI is intro level, and the TUI is advanced user, then the CLI is power user. It wouldn't be hard to add a TUI option or GUI button, I suppose, just for the basic export command.

The goal here is to be able to retrieve Logos notes in a one-way fashion. Some data loss will happen, but less than if I never accessed my Logos notes again due to them being outside of the current system. I want to be able to access the notes I have created in order to convert them to my existing note-taking system (flat file markdown accessed via neovim).

@thw26

thw26 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

I am unsure why this is failing.

@thw26
thw26 requested a review from ctrlaltf24 August 9, 2026 06:11

@ctrlaltf24 ctrlaltf24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started review. Only until last comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit(file name): 'actions' doesn't describe much - it's vague. Does that word add value?

Comment on lines +14 to +16
def get_logos_paths(
ephemeral_config: EphemeralConfiguration,
) -> LogosPaths:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call leaving this out of app so we can do operations before the app is initialized

Comment on lines +43 to +44
def get_logos_databases(ephemeral_config: EphemeralConfiguration) -> list[Path]:
return get_logos_paths(ephemeral_config).databases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function helping? get logos paths calls get wine user with does filesystem operations. The caller is better off calling get logos paths once then calling databases themselves

return get_logos_paths(ephemeral_config).databases


def database_operation(ephemeral_config: EphemeralConfiguration):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(misnomer)

Comment on lines +113 to +117
def database_notes_get_operation(ephemeral_config: EphemeralConfiguration):
paths = get_logos_paths(ephemeral_config)
with NotesDatabase(paths.appdata, paths.user_id) as db:
note = db.get_note(ephemeral_config.note_id)
print(note)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to be a lot of functions that just print. These will be used how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Notes Exporting Tool

2 participants