App¶
Module for main application logic for the Logseq analyzer.
Classes:
| Name | Description |
|---|---|
GUIInstanceDummy |
Dummy class to simulate a GUI instance for testing purposes. |
Functions:
| Name | Description |
|---|---|
setup_logseq_paths |
Set up Logseq analyzer configuration based on arguments. |
setup_graph_dirs |
Set up the Logseq graph directories. |
setup_config_edns |
Set up the configuration EDN files. |
ensure_target_dirs |
Ensure that the target directories exist. |
setup_journal_formats |
Set up journal formats. |
init_configs |
Initialize configurations for the Logseq analyzer. |
setup_cache |
Set up cache for the Logseq Analyzer. |
configure_analyzer_settings |
Set up the attributes for the LogseqAnalyzer. |
process_graph |
Process all files in the Logseq graph folder. |
setup_file_mover |
Set up LogseqFileMover for moving files and directories. |
report_configurations |
Yield configuration data reports. |
analyze |
Perform core analysis on the Logseq graph. |
write_reports |
Write reports to the specified output directories. |
run_app |
Run the Logseq analyzer. |
GUIInstanceDummy(progress: dict[str, int] = dict())
dataclass
¶
Dummy class to simulate a GUI instance for testing purposes.
Methods:
| Name | Description |
|---|---|
__repr__ |
Return a string representation of the dummy GUI instance. |
__str__ |
Return a string representation of the dummy GUI instance. |
update_progress |
Simulate updating progress in a GUI. |
setup_logseq_paths(args: Args) -> tuple[LogseqAnalyzerDirs, ConfigEdns]
¶
Set up Logseq analyzer configuration based on arguments.
setup_graph_dirs(args: Args) -> LogseqGraphDirs
¶
Set up the Logseq graph directories.
setup_config_edns(args: Args, graph_dirs: LogseqGraphDirs) -> ConfigEdns
¶
Set up the configuration EDN files.
ensure_target_dirs(graph_dirs: LogseqGraphDirs, target_dirs: dict[str, str]) -> None
¶
Ensure that the target directories exist.
setup_journal_formats(config_edns: ConfigEdns) -> JournalFormats
¶
Set up journal formats.
init_configs(args: Args) -> tuple[LogseqAnalyzerDirs, ConfigEdns, JournalFormats]
¶
Initialize configurations for the Logseq analyzer.
setup_cache() -> tuple[Cache, FileIndex]
¶
Set up cache for the Logseq Analyzer.
configure_analyzer_settings(args: Args, analyzer_dirs: LogseqAnalyzerDirs, config_edns: ConfigEdns, journal_formats: JournalFormats) -> None
¶
Set up the attributes for the LogseqAnalyzer.
process_graph(index: FileIndex, cache: Cache) -> None
¶
Process all files in the Logseq graph folder.
setup_file_mover(args: Args, lsa: LogseqAssets, analyzer_dirs: LogseqAnalyzerDirs) -> dict[str, Any]
¶
Set up LogseqFileMover for moving files and directories.
report_configurations(args: Args, analyzer_dirs: LogseqAnalyzerDirs, config_edns: ConfigEdns) -> Iterator[tuple[str, Any]]
¶
Yield configuration data reports.
analyze(args: Args, index: FileIndex, analyzer_dirs: LogseqAnalyzerDirs) -> Iterator[tuple[str, Any]]
¶
Perform core analysis on the Logseq graph.
write_reports(data_reports: Iterator[tuple[str, Any]]) -> None
¶
Write reports to the specified output directories.
run_app(**gui_args: Any) -> None
¶
Run the Logseq analyzer.