From 14f050f8f30cd43c3d9764106846525d02a915b8 Mon Sep 17 00:00:00 2001 From: Jack Bond-Preston Date: Sun, 16 Jun 2024 18:25:00 +0100 Subject: [PATCH] vault update: 2024-06-16 18:25:00 Affected files: Index.md config.yml output/mod/arguments.yml output/mod/capabilities.json output/mod/config.yml output/mod/graphers.json output/mod/guid.txt output/mod/html/dynamic_footer_inclusions.html output/mod/html/dynamic_inclusions.html output/mod/html/graph.template.html output/mod/html/graph_full_page.template.html output/mod/html/note.template.html output/mod/modfile_dependencies.json output/mod/paths.json output/mod/user_config.yml --- Index.md | 1 + config.yml | 517 ++++++++++++++++++ output/mod/arguments.yml | 4 + output/mod/capabilities.json | 6 + output/mod/config.yml | 328 +++++++++++ output/mod/graphers.json | 14 + output/mod/guid.txt | 1 + .../mod/html/dynamic_footer_inclusions.html | 1 + output/mod/html/dynamic_inclusions.html | 1 + output/mod/html/graph.template.html | 26 + output/mod/html/graph_full_page.template.html | 114 ++++ output/mod/html/note.template.html | 171 ++++++ output/mod/modfile_dependencies.json | 174 ++++++ output/mod/paths.json | 16 + output/mod/user_config.yml | 325 +++++++++++ 15 files changed, 1699 insertions(+) create mode 100644 Index.md create mode 100644 config.yml create mode 100644 output/mod/arguments.yml create mode 100644 output/mod/capabilities.json create mode 100644 output/mod/config.yml create mode 100644 output/mod/graphers.json create mode 100644 output/mod/guid.txt create mode 100644 output/mod/html/dynamic_footer_inclusions.html create mode 100644 output/mod/html/dynamic_inclusions.html create mode 100644 output/mod/html/graph.template.html create mode 100644 output/mod/html/graph_full_page.template.html create mode 100644 output/mod/html/note.template.html create mode 100644 output/mod/modfile_dependencies.json create mode 100644 output/mod/paths.json create mode 100644 output/mod/user_config.yml diff --git a/Index.md b/Index.md new file mode 100644 index 0000000..fd736fa --- /dev/null +++ b/Index.md @@ -0,0 +1 @@ +Jack's Chinese Notes \ No newline at end of file diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..38091f5 --- /dev/null +++ b/config.yml @@ -0,0 +1,517 @@ +########################################################################## +# PATHS # +########################################################################## +# The note that will be used as the index.html +# should be in obsidian_folder_path_str +# Can be absent when toggles/compile_md == False +# Use full path or relative path, but don't use ~/ +obsidian_entrypoint_path_str: './' + +# Input and output path of markdown files +# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml) +# Use full path or relative path, but don't use ~/ +md_folder_path_str: 'output/md' + +# Markdown entrypoint path +# This has to be md_folder_path_str + '/index.md' when toggles/compile_md == True +# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml) +# Use full path or relative path, but don't use ~/ +md_entrypoint_path_str: 'output/md/index.md' + +# Output path of HTML files +# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml) +# Use full path or relative path, but don't use ~/ +html_output_folder_path_str: 'output/html' + +module_data_folder: 'output/mod' + +########################################################################## +# GLOBAL # +########################################################################## +# verbosity_ranks = { +# "quiet": 0, +# "error": 10, +# "warning": 15, +# "deprecation": 20, +# "info": 30, +# "debug": 100, +# } +verbosity: info + +########################################################################## +# MODULES # +########################################################################## +module_list: + preparation: + # - name: set_subfolder + # description: Overwrites html_url_prefix and related settings if --subfolder is provided in the commandline + + - name: process_config + description: Merges the user config with default config and runs checks. + + - name: load_paths + description: Determine all paths of interest based on input. + + - name: process_config_auto + description: Fills in auto values that can be read from the vault config. + + - name: html_templater + description: Prepare and export templates used to create html output. + persistent: True + + - name: load_graphers + persistent: True + + - name: get_file_list + description: + - Basic file listing based on include_folder/exclude_glob combination + - Further filtering can be done in further modules + + - name: parse_metadata + description: + - Gets the metadata of each markdown file, and stores it under metadata/.json + + - name: filter_on_metadata + description: + - Filter out markdown files that do not comply to certain metadata requirements + + - name: copy_vault_to_tempdirectory + description: + - Copy vault to temporary directory, so that we can edit the obsidian notes themselves safely. + - Must be persistent! + persistent: True + + - name: prepare_output_folders + description: + - Ensures the output folders are created + - Optionally removes previous output if it exists in the target directories + + # - name: hydrate_file_list + # description: + # - Read and parse the selected files, then create a dict with info such as rel_path, full_path, html_rel_path, etc + + convert_note_to_markdown: [] + convert_markdown_to_html: [] + + finalize: + - name: resource_logger + description: + - Creates the log of which module resources were accessed by which module + - Requires persistent meta_module of the same name to work! + persistent: True + method: finalize + +meta_modules_post: + - name: resource_logger + persistent: True + +# Will create an extra file under module_data_folder/versions/ with timestamp and module name +# for each module file written with the self.modfile(...).write() method. +# Used for debugging purposes. +keep_module_file_versions: False + +# Use the name of the module as a key in the dict below +# For accurate configuration settings, consult the spec of the module in question. +# Defaults of the modules are shown in the commented blocks +module_config: + get_file_list: + include_glob: + value: '*' + exclude_glob: + value: + - ".obsidian/**/*" + - ".trash/**/*" + - ".DS_Store/**/*" + - ".git/**/*" + + # prepare_output_folders: + # clean_existing: + # description: Files that exist in the output folders are deleted. + # value: True + # fail_on_existing: + # description: + # - Exit with error if output folders are not empty. + # - Does nothing if clean_existing = True! + # value: False + + # filter_on_metadata: + # include_on: + # description: What metadata to include notes on. Empty list means True by default. + # value: [[]] + # exclude_on: + # description: What metadata to exclude on. Empty list means False by default + # value: [[]] + +########################################################################## +# OPERATIONS # +########################################################################## +# When not an empty list, this setting will restrict the subfolders +# of the vault that will be included. This allows you to ensure that +# only those folders are included in the output. Links pointing to notes +# outside of the included folders will be treated as non-existent. +# Note that the obsidian_entrypoint_path_str needs to be in one of these folders. +# Paths should be relative to the vault root. +included_folders: [] + +# Exclude glob +# The paths are relative to obsidian_folder_path_str +# - Start with slash to target specific folder: /subfolder +# - Target any folder with name "subfolder": subfolder +# Glob patterns supported for copy_vault_to_tempdir_method: shutil, shutil_walk, and for rsync for as far as rsync supports it natively +# When turning off copy_vault_to_tempdir, glob patterns are fully supported. +# Rules are case sensitive if your filesystem is. +exclude_glob: + - "/.obsidian" + - "/.trash" + - "/.DS_Store" + - "/.git" + + +# Deprecated for exclude_glob +exclude_subfolders: '' + +# Number of links a note can be removed from the entrypoint note +# -1 for no max depth +# 0 means only the entrypoint note is processed +# 1 means only direct children are processed (and the entrypoint of course) +# and so forth. NOTE: DOES NOT APPLY TO INCLUSIONS! +max_note_depth: -1 + +# =============================== COPY VAULT SETTINGS ============================ +# Safety feature: make a copy of the provided vault, and operate on that, so that bugs are less likely to affect the vault data. +# Should be fine to turn off if copying the vault takes too long / disk space is too limited. +# The tempdir is automatically removed on exit of the program. +copy_vault_to_tempdir: True + +# Determines the function to use to copy your vault over to the tempdir. +# `default` will try to use rsync if it is installed, and otherwise use `shutil` +# `rsync` will do the same, but give a warning when it falls back to shutil +# `shutil` will just use shutil to copy. Use this when rsync is installed but is giving problems. +# `shutil_walk` will walk the directory tree manually, and call the copy function for each branch. This has been seen to work better on Macs in some cases. +copy_vault_to_tempdir_method: default + +# Enable to print the files being copied +copy_vault_to_tempdir_follow_copy: false +# =============================== /COPY VAULT SETTINGS ============================ + + +# ObsidianHtml needs to be able to discern between included notes and included files, because included files +# need to be treated differently. This is a configurable setting because we might've missed certain suffixes +# of files that are includable. +included_file_suffixes: ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'svg', 'mp4', 'webm', 'ogv', 'mov', 'mkv', 'mp3', 'wav', 'm4a', 'ogg', '3gp', 'flac', 'pdf'] +video_format_suffixes: ['mp4', 'webm', 'ogv', 'mov', 'mkv'] +audio_format_suffixes: ['mp3', 'webm', 'wav', 'm4a', 'ogg', '3gp', 'flac'] + +# files that should be included via an tag: +embeddable_file_suffixes: ['pdf'] + +# How to populate non-Markdown files in the output directory. +# Note that hard links do not work cross-filesystem, and some environments may need administrative rights to create links. +# Hard links are also more prone to data loss due to the sharing of inodes. `symlink` is a good safe bet, if your environment works with it. +# If you store your vault in a Git repository, you will need to modify `core.symlinks` in your gitconfig or else only the links will be committed; see `man git-config`. +# `default` is `copy` for backwards compatibility to avoid breaking configurations. +# `copy` simply copies the files from the input folder to the output. +# `symlink` creates a symbolic link, or soft link, that points to the input file. +# `hardlink` creates a hard link +copy_output_file_method: default + +# If links should be fully resolved before linking. +# This is useful on filesystems that do not allow symlinks of symlinks, or where these nested links can affect permissions, like on some BSDs. +resolve_output_file_links: true + +# Used to strip the http url hostpart of a link to get a relative link +# e.g. for value "https://git.com/user/repo/-/wikis/mywiki/" then: +# "https://git.com/user/repo/-/wikis/mywiki/folder/markdown.md" --> /folder/markdown.md +md_source_host_urls: [] + +########################################################################## +# HTML OUTPUT # +########################################################################## + +# Will be inputted into the Html template as page title +# Not used anywhere else atm. +site_name: 'Obsidian-Html/Notes' + +# Use when deploying to https://mydomain.com/html_prefix/ instead of https://mydomain.com/ +# use '/html_prefix' (prepend slash, no slash at the end) +html_url_prefix: '' + +# Provide the fullpath to a template file to use instead of standard template. +# Note that this file must contain at least "{content}" somewhere in the page. +html_template_path_str: '' + +# Provide an array of custom inclusions (css, javascript, etc) that you would like to be included in the resultant html +html_custom_inclusions: [] +html_custom_footer_inclusions: [] + +navbar_links: [] + +file_exports: [] +# file_exports: +# - encoding: binary +# src: Resources/Includes/favicon.ico +# dst: favicon.ico +# - src: Resources/Includes/christmas_snowflakes.js +# dst: obs.html/static/christmas_snowflakes.js + +########################################################################## +# OPTIONAL BEHAVIOR / FEATURES # +########################################################################## +toggles: + stdout_current_file: False + + # Opt-in/-out of Obsidian->Md conversion, set to False when using proper markdown as input + compile_md: True + + # Opt-in/-out of Md->Html conversion, set to False when only wanting to get proper markdown from Obsidian + compile_html: True + + # For compatibility with vaults/notes that have the 'Strict Line Breaks' option enabled + # This is off by default in Obsidian; setting it to True will not insert
tags into multi-line paragraphs + # Can be true, false, or "auto". The latter will read the vault's app.json for the value. + strict_line_breaks: auto + + # gitlab is case insensitive, this setting should be true when converting a wiki from that source + # might also be useful if you have markdown links in your vault + # note that this does not impact the output, Hello.md will be written to Hello.html + force_filename_to_lowercase: True + + # Slugify all HTML links. Note this will affect most internal uses of filename as well, like when matching + # against exclusion lists. + slugify_html_links: False + + # If this is false only the entrypoint and all its links (recursively) are processed + # if true all the notes will be processed + process_all: False + + # Can be overwritten ad-hoc by using "obsidianhtml -i config.yml -v" (the -v option) + verbose_printout: False # deprecated for verbose + + debug_filetree_keys: False + + # This option should be False for Obsidian->Md, but can be True when compile_md == False + # Setting it to True will cause an error when two files with the same file name are found anywhere in the input folder + allow_duplicate_filenames_in_root: True + + # Sometimes linked images that should be local (based on the path) cannot be found. + # Toggle this to False to disable warnings if that happens. + warn_on_skipped_image: True + warn_on_skipped_file: True + + # This will skip emptying output folders, if you want to implement this yourself + no_clean: False + + # Whether the markdown interpreter assumes relative path when no / at the beginning of a link + relative_path_md: True + + # Whether the html paths will be relative. + # Note: This is only useful if you want to open the html locally on your machine without using a webserver + # and is generally not advised. This will also disable all features that need a webserver to function + # such as the graph view. + relative_path_html: False + + # Whether external http anchor links should have a target of "_blank" + external_blank: False + + # If alt text is specified, place it in a figure caption under the image. + img_alt_text_use_figure: True + + # Will preserve inline tags. This will give polluted markdown output + preserve_inline_tags: True + + # Will wrap inclusions with
{content}
+ wrap_inclusions: False + + features: + styling: + layout: documentation # documentation, tabs, minimal + header_template: full # currently only supported for documentation layout + max_note_width: 120rem # not supported for layout: tabs + add_toc: '' # add "[TOC]" (Table of Contents) when missing + toc_pane: '' # removes table of contents from the note and puts it in the right pane (not supported for layout:tabs) + flip_panes: '' # switch right and left pane around. (does nothing unless in documentation layout.) + add_dir_list: True # show directory contents in one of the panes (only documentation layout) + accent_color: '65, 76, 253' + loading_bg_color: '22, 22, 22' + + theme_picker: + enabled: True + styling: + show_icon: True + + smiles: + enabled: False + theme: dark # dark, light, oldschool, oldschool-dark, solarized, solarized-dark, matrix, github, carbon, cyberpunk, gruvbox, gruvbox-dark + width: "100%" # XXX%, XXXpx, XXX + height: "300px" # XXX%, XXXpx, XXX + + code_highlight: + enabled: True + mermaid_diagrams: + enabled: True + strip_special_chars: False + callouts: + enabled: True + math_latex: + enabled: True + backlinks: # Show backlinks at the bottom of each note + enabled: True + embedded_note_titles: + enabled: True + hide_on_h1: True # don't add embedded title if the note starts with an h1 + + search: + enabled: True + add_files: True + try_preload: False # on page refresh, if search_data is stored in localStorage, it will init search, instead of waiting for the search panel to be opened. + styling: + show_icon: True + + embedded_search: + enabled: False + + tags_page: + enabled: True + styling: + show_icon: True + show_in_note_footer: True + + dataview: + enabled: False + folder: 'obs.html/export' # relative to the vault being processed. this folder should always be in the vault + + folder_notes: + enabled: False + placement: 'outside folder' # 'inside folder' , 'outside folder' + naming: 'folder name' # 'folder name', 'index', 'aurkibidea', 'etc' + + eraser: + enabled: True + + breadcrumbs: + enabled: False + + # Include code to build the graph view per page + graph: + enabled: True # Include code to build the graph view per page (default: True) + templates: + - id: 2d + name: 2d + path: builtin<2d> + - id: 3d + name: 3d + path: builtin<3d> + styling: + show_icon: True + coalesce_force: '-30' + show_inclusions_in_graph: True + + rss: + enabled: False + host_root: 'https://localhost:8000/' + styling: + show_icon: True + channel: + title: 'Notes' + website_link: '' + description: '' + language_code: 'en-us' + managing_editor: 'n/a' + web_master: 'n/a' + items: + selector: + match_keys: [] + exclude_keys: [] + include_subfolders: [] + exclude_subfolders: ['.git','obs.html'] + exclude_files: ['not_created.html', 'index.html'] + description: + selectors: + - ['yaml','rss:description'] + - ['first-paragraphs', 2, '

'] + - ['first-header', 1] + title: + selectors: + - ['yaml','rss:title'] + - ['first-header', 1] + - ['path', ['parent',1], '/', ['stem']] + publish_date: + selectors: + - ['yaml','rss:publish_date'] + - ['yaml_strip','tags',['date/']] + iso_formatted: True + format_string: '' #'%Y-%m-%d' + default_value: '' + + create_index_from_dir_structure: + enabled: True + verbose: False + rel_output_path: 'obs.html/dir_index.html' + styling: + show_icon: True + exclude_subfolders: + - ".git" + - "__src" + - "md" + - "obs.html" + exclude_files: + - ".gitignore" + - "favicon.ico" + - "not_created.html" + homepage_label: "index" + + # Create a markdown file with links to notes that have one of the given tags. + create_index_from_tags: + enabled: False + verbose: False + rel_output_path: 'obs.html/tag_index.md' + homepage_label: "index" + use_as_homepage: False + add_links_in_graph_tree: True + tags: [] + match_on_inline_tags: False + styling: + include_folder_in_link: False + sort: + method: 'none' # ! created_time not available on Linux! + key_path: '' # empty for top level, use ':' to go down multiple levels + value_prefix: '' # in case of multiple values under key_path, match on this prefix, and then remove prefix + reverse: false # false/true reverses output + none_on_bottom: true # will put notes at the bottom that do not have the sort key, otherwise at the top + exclude_paths: # don't included these paths in the dir list + - ".gitignore" + + table_of_contents: + add_toc_when_missing: False # add "[TOC]" (Table of Contents) when missing + only_show_for_multiple_headers: True # if there is only one header, don't show the TOC + + side_pane: # only valid for documentation layout + left_pane: + enabled: True + close_if_empty: False + width: 20rem + contents: dir_tree # relevant features should be enabled and configured see docs + content_args: + rel_path: 'index.html' # used for html_page + div_selector: '.content' # used for html_page + strip_sub_divs: # used for html_page + - '.toc' + strip_tags: [] # used for tag_tree + + right_pane: + enabled: True + close_if_empty: True + width: 16rem + contents: toc # relevant features should be enabled and configured see docs + content_args: # used for html_page + rel_path: 'index.html' + div_selector: '.content' + strip_sub_divs: + - '.toc' + + footnote_md_extension: + enabled: True + + post_processing: [] + # post_processing: + # - module: md_markdown_callouts \ No newline at end of file diff --git a/output/mod/arguments.yml b/output/mod/arguments.yml new file mode 100644 index 0000000..ae0f85c --- /dev/null +++ b/output/mod/arguments.yml @@ -0,0 +1,4 @@ +command: +- convert +config_path: config.yml +literals: {} diff --git a/output/mod/capabilities.json b/output/mod/capabilities.json new file mode 100644 index 0000000..be7d8a4 --- /dev/null +++ b/output/mod/capabilities.json @@ -0,0 +1,6 @@ +{ + "directory_tree": true, + "search_data": true, + "graph_data": true, + "embedded_note_titles": true +} \ No newline at end of file diff --git a/output/mod/config.yml b/output/mod/config.yml new file mode 100644 index 0000000..941277a --- /dev/null +++ b/output/mod/config.yml @@ -0,0 +1,328 @@ +_css_file: main_documentation.css +audio_format_suffixes: +- mp3 +- webm +- wav +- m4a +- ogg +- 3gp +- flac +copy_output_file_method: default +copy_vault_to_tempdir: true +copy_vault_to_tempdir_follow_copy: false +copy_vault_to_tempdir_method: default +embeddable_file_suffixes: +- pdf +exclude_glob: +- /.obsidian +- /.trash +- /.DS_Store +- /.git +exclude_subfolders: +file_exports: [] +html_custom_footer_inclusions: [] +html_custom_inclusions: [] +html_output_folder_path_str: output/html +html_template_path_str: '' +html_url_prefix: '' +included_file_suffixes: +- jpg +- jpeg +- gif +- png +- bmp +- svg +- mp4 +- webm +- ogv +- mov +- mkv +- mp3 +- wav +- m4a +- ogg +- 3gp +- flac +- pdf +included_folders: [] +keep_module_file_versions: false +max_note_depth: -1 +md_entrypoint_path_str: output/md/index.md +md_folder_path_str: output/md +md_source_host_urls: [] +meta_modules_post: +- name: resource_logger + persistent: true +module_config: + get_file_list: + exclude_glob: + value: + - .obsidian/**/* + - .trash/**/* + - .DS_Store/**/* + - .git/**/* + include_glob: + value: '*' +module_data_folder: output/mod +module_list: + convert_markdown_to_html: [] + convert_note_to_markdown: [] + finalize: + - description: + - Creates the log of which module resources were accessed by which module + - Requires persistent meta_module of the same name to work! + method: finalize + name: resource_logger + persistent: true + preparation: + - description: Merges the user config with default config and runs checks. + name: process_config + - description: Determine all paths of interest based on input. + name: load_paths + - description: Fills in auto values that can be read from the vault config. + name: process_config_auto + - description: Prepare and export templates used to create html output. + name: html_templater + persistent: true + - name: load_graphers + persistent: true + - description: + - Basic file listing based on include_folder/exclude_glob combination + - Further filtering can be done in further modules + name: get_file_list + - description: + - Gets the metadata of each markdown file, and stores it under metadata/.json + name: parse_metadata + - description: + - Filter out markdown files that do not comply to certain metadata requirements + name: filter_on_metadata + - description: + - Copy vault to temporary directory, so that we can edit the obsidian notes themselves + safely. + - Must be persistent! + name: copy_vault_to_tempdirectory + persistent: true + - description: + - Ensures the output folders are created + - Optionally removes previous output if it exists in the target directories + name: prepare_output_folders +navbar_links: [] +obsidian_entrypoint_path_str: ./ +obsidian_folder_path_str: +resolve_output_file_links: true +site_name: Obsidian-Html/Notes +toggles: + allow_duplicate_filenames_in_root: true + compile_html: true + compile_md: true + debug_filetree_keys: false + external_blank: false + features: + backlinks: + enabled: true + breadcrumbs: + enabled: false + callouts: + enabled: true + code_highlight: + enabled: true + create_index_from_dir_structure: + enabled: true + exclude_files: + - .gitignore + - favicon.ico + - not_created.html + exclude_subfolders: + - .git + - __src + - md + - obs.html + homepage_label: index + rel_output_path: obs.html/dir_index.html + styling: + show_icon: true + verbose: false + create_index_from_tags: + add_links_in_graph_tree: true + enabled: false + exclude_paths: + - .gitignore + homepage_label: index + match_on_inline_tags: false + rel_output_path: obs.html/tag_index.md + sort: + key_path: '' + method: none + none_on_bottom: true + reverse: false + value_prefix: '' + styling: + include_folder_in_link: false + tags: [] + use_as_homepage: false + verbose: false + dataview: + enabled: false + folder: obs.html/export + embedded_note_titles: + enabled: true + hide_on_h1: true + embedded_search: + enabled: false + eraser: + enabled: true + folder_notes: + enabled: false + naming: folder name + placement: outside folder + footnote_md_extension: + enabled: true + graph: + coalesce_force: '-30' + enabled: true + show_inclusions_in_graph: true + styling: + show_icon: true + templates: + - id: 2d + name: 2d + path: builtin<2d> + - id: 3d + name: 3d + path: builtin<3d> + math_latex: + enabled: true + mermaid_diagrams: + enabled: true + strip_special_chars: false + post_processing: [] + rss: + channel: + description: + language_code: en-us + managing_editor: n/a + title: Notes + web_master: n/a + website_link: + enabled: false + host_root: https://localhost:8000/ + items: + description: + selectors: + - - yaml + - rss:description + - - first-paragraphs + - 2 + -

+ - - first-header + - 1 + publish_date: + default_value: '' + format_string: '' + iso_formatted: true + selectors: + - - yaml + - rss:publish_date + - - yaml_strip + - tags + - - date/ + selector: + exclude_files: + - not_created.html + - index.html + exclude_keys: [] + exclude_subfolders: + - .git + - obs.html + include_subfolders: [] + match_keys: [] + title: + selectors: + - - yaml + - rss:title + - - first-header + - 1 + - - path + - - parent + - 1 + - / + - - stem + styling: + show_icon: true + search: + add_files: true + enabled: true + styling: + show_icon: true + try_preload: false + side_pane: + left_pane: + close_if_empty: false + content_args: + div_selector: .content + rel_path: index.html + strip_sub_divs: + - .toc + strip_tags: [] + contents: dir_tree + enabled: true + width: 20rem + right_pane: + close_if_empty: true + content_args: + div_selector: .content + rel_path: index.html + strip_sub_divs: + - .toc + contents: toc + enabled: true + width: 16rem + smiles: + enabled: false + height: 300px + theme: dark + width: 100% + styling: + accent_color: 65, 76, 253 + add_dir_list: true + add_toc: + flip_panes: + header_template: full + layout: documentation + loading_bg_color: 22, 22, 22 + max_note_width: 120rem + toc_pane: + table_of_contents: + add_toc_when_missing: false + only_show_for_multiple_headers: true + tags_page: + enabled: true + styling: + show_icon: true + show_in_note_footer: true + theme_picker: + enabled: true + styling: + show_icon: true + force_filename_to_lowercase: true + img_alt_text_use_figure: true + no_clean: false + no_tabs: true + preserve_inline_tags: true + process_all: false + relative_path_html: false + relative_path_md: true + slugify_html_links: false + stdout_current_file: false + strict_line_breaks: false + verbose_printout: false + warn_on_skipped_file: true + warn_on_skipped_image: true + wrap_inclusions: false +verbosity: info +video_format_suffixes: +- mp4 +- webm +- ogv +- mov +- mkv diff --git a/output/mod/graphers.json b/output/mod/graphers.json new file mode 100644 index 0000000..922c6a7 --- /dev/null +++ b/output/mod/graphers.json @@ -0,0 +1,14 @@ +[ + { + "id": "2d", + "name": "2d", + "path": "builtin<2d>", + "contents": "// This function is called by obshtml when it wants to open the graph\nfunction run(args) {\n if (window.ObsHtmlGraph.graph_dependencies_loaded['2d'] == false){\n // load three dependencies in succession and then run initGraph(args)\n load_script_on_demand(\n '//unpkg.com/force-graph', load_script_on_demand, [\"//unpkg.com/d3-force\", load_script_on_demand, [\"https://d3js.org/d3.v4.min.js\", initGraph, [args]]]\n )\n // tell obshtml that the dependencies have been loaded\n window.ObsHtmlGraph.graph_dependencies_loaded['2d'] = true;\n\n }\n else {\n // just run directly\n initGraph(args)\n }\n}\n\nfunction initGraph(args) {\n // open div right before loading the graph to avoid opening an empty div\n args.graph_container.style.display = \"block\";\n\n // Load data then start graph\n fetch(args.data).then(res => res.json()).then(data => {\n\n // overwrites\n let g = window.ObsHtmlGraph.graphs[args.uid];\n g.actions['select_node'] = function(args, graph){\n return graph_select_node(args, graph)\n }\n\n g.graph = ForceGraph()\n (args.graph_container)\n .graphData(data)\n .width(args.width)\n .maxZoom(10)\n .height(args.height)\n .backgroundColor(g.colors.bg)\n .nodeLabel('name')\n .d3Force(\"charge\", d3.forceManyBody().strength(args.coalesce_force))\n .nodeColor((node) => {return g.colors.node_inactive})\n .nodeCanvasObjectMode(() => 'after')\n .nodeCanvasObject((node, ctx, globalScale) => {\n // draw text only for nodes connected to the current node\n let isConnected = false;\n node.links.forEach(link => {\n if (link == g.current_node_id){\n isConnected = true;\n }\n })\n // draw text\n if (isConnected){\n const label = node.name;\n const fontSize = 11 / globalScale;\n ctx.font = `${fontSize}px Sans-Serif`;\n const textWidth = ctx.measureText(label).width; \n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = g.colors.text;\n ctx.fillText(label, node.x, node.y+8);\n }\n \n // color only main node & semiconnected\n if (node.id != g.current_node_id){\n if (isConnected){\n ctx.beginPath();\n ctx.arc(node.x, node.y, 4, 0, 2 * Math.PI);\n ctx.fillStyle = g.colors.node_semiactive;\n ctx.fill();\n }\n return\n }\n\n // color node\n ctx.beginPath();\n ctx.arc(node.x, node.y, 4+1, 0, 2 * Math.PI);\n ctx.fillStyle = g.colors.node_active_border;\n ctx.fill();\n ctx.beginPath();\n ctx.arc(node.x, node.y, 4, 0, 2 * Math.PI);\n ctx.fillStyle = g.colors.node_active;\n ctx.fill();\n\n })\n .linkColor(link => {\n if (link.source.id == g.current_node_id){\n return g.colors.link_active\n }\n if (link.target.id == g.current_node_id){\n return g.colors.link_active\n }\n return g.colors.link_inactive\n })\n .linkDirectionalParticles(\"value\")\n .linkDirectionalParticleSpeed(0.010)\n .linkDirectionalParticleWidth(link => {\n if (link.source.id == g.current_node_id || link.target.id == g.current_node_id){\n return 4.0\n }\n return 0\n })\n // [425] Add included references as links in graph view\n .linkLineDash(link => {\n if (link.type == 'inclusion'){\n return [1,1]\n }\n return false;\n })\n .onNodeClick(node => {\n args.node = node;\n g.actions['left_click'](args)\n })\n .onNodeRightClick(node => {\n args.node = node;\n g.current_node_id = node.id\n g.actions['right_click'](args)\n })\n \n setTimeout( () => g.graph.zoomToFit(1000, rem(3), function(n){return initGraphDone(n, args)}), 1000 );\n });\n}\n\nfunction initGraphDone(n, args){\n // show help text\n let button = document.getElementById('B'+args['uid'])\n if (button.innerHTML == 'Hide Graph'){\n document.getElementById('D'+args['uid']).classList.add('fadein');\n }\n else {\n document.getElementById('D'+args['uid']).classList.remove('fadein');\n } \n\n // zoom toward current node\n zoom_select(n, args)\n}\n\n// HELPER FUNCTIONS\n/////////////////////////////////////////////////////////////////////////////////////\n\nfunction graph_select_node(args){\n let g = window.ObsHtmlGraph.graphs[args.uid];\n g.current_node_id = args.node.id;\n\n g.graph.zoomToFit(1000, rem(3), function(n){return zoom_select(n, args)})\n return false;\n}\n\nfunction zoom_select(n, args){\n let g = window.ObsHtmlGraph.graphs[args.uid];\n if (g == undefined){ // graph closed before settimeout got around to zooming\n return false\n }\n\n if (n.id == g.current_node_id){\n return true\n }\n for (let i=0;i", + "contents": "function run(args) {\n function start(){\n args.graph_container.style.display = \"block\"; // open div right before loading the graph to avoid opening an empty div\n initGraph_3d(args)\n window.ObsHtmlGraph.graph_dependencies_loaded['3d'] = true;\n }\n\n if (window.ObsHtmlGraph.graph_dependencies_loaded['3d'] == false){\n load_script_on_demand(\n CONFIGURED_HTML_URL_PREFIX + '/obs.html/static/3d-force-graph.js', \n start,\n []\n )\n }\n else {\n start();\n }\n}\n\nfunction initGraph_3d(args) {\n let g = window.ObsHtmlGraph.graphs[args.uid];\n g.graph = ForceGraph3D()\n (args.graph_container)\n .jsonUrl(args.data)\n .width(args.width)\n .height(args.height)\n .nodeLabel('name')\n .linkDirectionalParticles(\"value\")\n .linkDirectionalParticleSpeed(0.010)\n .linkDirectionalParticleWidth(2.0)\n .nodeColor(node => {\n if (node.id == g.current_node_id){\n return '#ff0000'\n }\n let isConnected = false;\n node.links.forEach(link => {\n if (link == g.current_node_id){\n isConnected = true;\n }\n })\n if (isConnected){\n return '#f7be49';\n }\n return '#ffffff'\n })\n .linkColor(link => {\n if (link.source == g.current_node_id || link.target == g.current_node_id){\n return '#ff0000'\n }\n return '#dadada'\n })\n .linkOpacity(0.3)\n .onNodeClick(node => {\n args.node = node;\n g.actions['left_click'](args)\n })\n .onNodeRightClick(node => {\n args.node = node;\n g.actions['right_click'](args, g.graph)\n });\n}\n\n\nexport { \n run\n};" + } +] \ No newline at end of file diff --git a/output/mod/guid.txt b/output/mod/guid.txt new file mode 100644 index 0000000..3d91caf --- /dev/null +++ b/output/mod/guid.txt @@ -0,0 +1 @@ +3cd6efe0-8d37-4c4b-8e21-d5e5906014c0 \ No newline at end of file diff --git a/output/mod/html/dynamic_footer_inclusions.html b/output/mod/html/dynamic_footer_inclusions.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/output/mod/html/dynamic_footer_inclusions.html @@ -0,0 +1 @@ + diff --git a/output/mod/html/dynamic_inclusions.html b/output/mod/html/dynamic_inclusions.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/output/mod/html/dynamic_inclusions.html @@ -0,0 +1 @@ + diff --git a/output/mod/html/graph.template.html b/output/mod/html/graph.template.html new file mode 100644 index 0000000..992d2f2 --- /dev/null +++ b/output/mod/html/graph.template.html @@ -0,0 +1,26 @@ +
+
+ +
+ Left-click: follow link, Right-click: select node, Scroll: zoom +
+ +
+ + +
+
+ + + diff --git a/output/mod/html/graph_full_page.template.html b/output/mod/html/graph_full_page.template.html new file mode 100644 index 0000000..f842a31 --- /dev/null +++ b/output/mod/html/graph_full_page.template.html @@ -0,0 +1,114 @@ + + + + + + + + + + + + + {title} + + + {dynamic_includes} + + + + + + + + + {search_html} + +
+ + +
+
+ + +
+
+
+ Left-click: follow link, Right-click: select node, Scroll: zoom +
+
+ + + +
+ + + +{footer_js_inclusions} +{dynamic_footer_includes} + + + + diff --git a/output/mod/html/note.template.html b/output/mod/html/note.template.html new file mode 100644 index 0000000..fc9b176 --- /dev/null +++ b/output/mod/html/note.template.html @@ -0,0 +1,171 @@ + + + + + + + + + + + + + {title} + + + {dynamic_includes} + + + + + + + + + {search_html} + +
+ {header} +
+ {left_pane} +
+ {content} + +
+
+
+ {right_pane} +
+
+ + + + {footer_js_inclusions} + {dynamic_footer_includes} + + + + + diff --git a/output/mod/modfile_dependencies.json b/output/mod/modfile_dependencies.json new file mode 100644 index 0000000..80fe31f --- /dev/null +++ b/output/mod/modfile_dependencies.json @@ -0,0 +1,174 @@ +{ + "log.resources": { + "provided_by": [ + "resource_logger (ResourceLoggerMetaModule)" + ], + "required_by": [], + "altered_by": [] + }, + "config.yml": { + "provided_by": [ + "setup_module (SetupModule)" + ], + "required_by": [ + "resource_logger (ResourceLoggerMetaModule)", + "process_config (ProcessConfigModule)", + "load_paths (LoadPathsModule)", + "process_config_auto (ProcessConfigAutoModule)", + "html_templater (HtmlTemplaterModule)", + "load_graphers (LoadGrapherModule)", + "get_file_list (GetFileListModule)", + "copy_vault_to_tempdirectory (VaultCopyModule)", + "prepare_output_folders (PrepareOutputFoldersModule)" + ], + "altered_by": [ + "process_config (ProcessConfigModule)", + "process_config_auto (ProcessConfigAutoModule)" + ] + }, + "capabilities.json": { + "provided_by": [ + "process_config (ProcessConfigModule)" + ], + "required_by": [], + "altered_by": [] + }, + "arguments.yml": { + "provided_by": [ + "setup_module (SetupModule)" + ], + "required_by": [ + "process_config (ProcessConfigModule)" + ], + "altered_by": [] + }, + "paths.json": { + "provided_by": [ + "load_paths (LoadPathsModule)" + ], + "required_by": [ + "process_config_auto (ProcessConfigAutoModule)", + "get_file_list (GetFileListModule)", + "parse_metadata (ParseMetadataModule)", + "filter_on_metadata (FilterOnMetadataModule)", + "copy_vault_to_tempdirectory (VaultCopyModule)", + "prepare_output_folders (PrepareOutputFoldersModule)" + ], + "altered_by": [ + "copy_vault_to_tempdirectory (VaultCopyModule)" + ] + }, + "html/note.template.html": { + "provided_by": [ + "html_templater (HtmlTemplaterModule)" + ], + "required_by": [], + "altered_by": [] + }, + "html/dynamic_inclusions.html": { + "provided_by": [ + "html_templater (HtmlTemplaterModule)" + ], + "required_by": [], + "altered_by": [] + }, + "html/dynamic_footer_inclusions.html": { + "provided_by": [ + "html_templater (HtmlTemplaterModule)" + ], + "required_by": [], + "altered_by": [] + }, + "html/graph.template.html": { + "provided_by": [ + "load_graphers (LoadGrapherModule)" + ], + "required_by": [], + "altered_by": [] + }, + "html/graph_full_page.template.html": { + "provided_by": [ + "load_graphers (LoadGrapherModule)" + ], + "required_by": [], + "altered_by": [] + }, + "graphers.json": { + "provided_by": [ + "load_graphers (LoadGrapherModule)" + ], + "required_by": [], + "altered_by": [] + }, + "index/files.json": { + "provided_by": [ + "get_file_list (GetFileListModule)" + ], + "required_by": [ + "filter_on_metadata (FilterOnMetadataModule)", + "copy_vault_to_tempdirectory (VaultCopyModule)" + ], + "altered_by": [ + "filter_on_metadata (FilterOnMetadataModule)", + "copy_vault_to_tempdirectory (VaultCopyModule)" + ] + }, + "index/excluded_files.json": { + "provided_by": [ + "get_file_list (GetFileListModule)" + ], + "required_by": [], + "altered_by": [] + }, + "index/markdown_files.json": { + "provided_by": [ + "get_file_list (GetFileListModule)" + ], + "required_by": [ + "parse_metadata (ParseMetadataModule)", + "filter_on_metadata (FilterOnMetadataModule)" + ], + "altered_by": [ + "filter_on_metadata (FilterOnMetadataModule)" + ] + }, + "index/metadata.json": { + "provided_by": [ + "parse_metadata (ParseMetadataModule)" + ], + "required_by": [ + "filter_on_metadata (FilterOnMetadataModule)" + ], + "altered_by": [] + }, + "excluded_files_by_metadata.json": { + "provided_by": [ + "filter_on_metadata (FilterOnMetadataModule)" + ], + "required_by": [], + "altered_by": [] + }, + "guid.txt": { + "provided_by": [ + "setup_module (SetupModule)" + ], + "required_by": [ + "prepare_output_folders (PrepareOutputFoldersModule)" + ], + "altered_by": [] + }, + "user_config.yml": { + "provided_by": [ + "setup_module (SetupModule)" + ], + "required_by": [], + "altered_by": [] + }, + "modfile_dependencies.json": { + "provided_by": [ + "setup_module (SetupModule)" + ], + "required_by": [], + "altered_by": [] + } +} \ No newline at end of file diff --git a/output/mod/paths.json b/output/mod/paths.json new file mode 100644 index 0000000..e51c228 --- /dev/null +++ b/output/mod/paths.json @@ -0,0 +1,16 @@ +{ + "obsidian_folder": "C:/Users/jackb/Documents/obsidian/jack", + "md_folder": "C:/Users/jackb/Documents/obsidian/jack/output/md", + "obsidian_entrypoint": "C:/Users/jackb/Documents/obsidian/jack", + "md_entrypoint": "C:/Users/jackb/Documents/obsidian/jack/output/md/index.md", + "html_output_folder": "C:/Users/jackb/Documents/obsidian/jack/output/html", + "appdir": "C:/Users/jackb/AppData/Local/obsidianhtml/obsidianhtml", + "original_obsidian_folder": "C:/Users/jackb/Documents/obsidian/jack", + "original_obsidian_entrypoint": "C:/Users/jackb/Documents/obsidian/jack", + "dataview_export_folder": "C:/Users/jackb/Documents/obsidian/jack/obs.html/export", + "rel_obsidian_entrypoint": ".", + "rel_md_entrypoint_path": "index.md", + "input_folder": "C:/Users/jackb/Documents/obsidian/jack", + "entrypoint": "C:/Users/jackb/Documents/obsidian/jack", + "original_input_folder": "C:/Users/jackb/Documents/obsidian/jack" +} \ No newline at end of file diff --git a/output/mod/user_config.yml b/output/mod/user_config.yml new file mode 100644 index 0000000..d770499 --- /dev/null +++ b/output/mod/user_config.yml @@ -0,0 +1,325 @@ +audio_format_suffixes: +- mp3 +- webm +- wav +- m4a +- ogg +- 3gp +- flac +copy_output_file_method: default +copy_vault_to_tempdir: true +copy_vault_to_tempdir_follow_copy: false +copy_vault_to_tempdir_method: default +embeddable_file_suffixes: +- pdf +exclude_glob: +- /.obsidian +- /.trash +- /.DS_Store +- /.git +exclude_subfolders: +file_exports: [] +html_custom_footer_inclusions: [] +html_custom_inclusions: [] +html_output_folder_path_str: output/html +html_template_path_str: '' +html_url_prefix: '' +included_file_suffixes: +- jpg +- jpeg +- gif +- png +- bmp +- svg +- mp4 +- webm +- ogv +- mov +- mkv +- mp3 +- wav +- m4a +- ogg +- 3gp +- flac +- pdf +included_folders: [] +keep_module_file_versions: false +max_note_depth: -1 +md_entrypoint_path_str: output/md/index.md +md_folder_path_str: output/md +md_source_host_urls: [] +meta_modules_post: +- name: resource_logger + persistent: true +module_config: + get_file_list: + exclude_glob: + value: + - .obsidian/**/* + - .trash/**/* + - .DS_Store/**/* + - .git/**/* + include_glob: + value: '*' +module_data_folder: output/mod +module_list: + convert_markdown_to_html: [] + convert_note_to_markdown: [] + finalize: + - description: + - Creates the log of which module resources were accessed by which module + - Requires persistent meta_module of the same name to work! + method: finalize + name: resource_logger + persistent: true + preparation: + - description: Merges the user config with default config and runs checks. + name: process_config + - description: Determine all paths of interest based on input. + name: load_paths + - description: Fills in auto values that can be read from the vault config. + name: process_config_auto + - description: Prepare and export templates used to create html output. + name: html_templater + persistent: true + - name: load_graphers + persistent: true + - description: + - Basic file listing based on include_folder/exclude_glob combination + - Further filtering can be done in further modules + name: get_file_list + - description: + - Gets the metadata of each markdown file, and stores it under metadata/.json + name: parse_metadata + - description: + - Filter out markdown files that do not comply to certain metadata requirements + name: filter_on_metadata + - description: + - Copy vault to temporary directory, so that we can edit the obsidian notes themselves + safely. + - Must be persistent! + name: copy_vault_to_tempdirectory + persistent: true + - description: + - Ensures the output folders are created + - Optionally removes previous output if it exists in the target directories + name: prepare_output_folders +navbar_links: [] +obsidian_entrypoint_path_str: ./ +resolve_output_file_links: true +site_name: Obsidian-Html/Notes +toggles: + allow_duplicate_filenames_in_root: true + compile_html: true + compile_md: true + debug_filetree_keys: false + external_blank: false + features: + backlinks: + enabled: true + breadcrumbs: + enabled: false + callouts: + enabled: true + code_highlight: + enabled: true + create_index_from_dir_structure: + enabled: true + exclude_files: + - .gitignore + - favicon.ico + - not_created.html + exclude_subfolders: + - .git + - __src + - md + - obs.html + homepage_label: index + rel_output_path: obs.html/dir_index.html + styling: + show_icon: true + verbose: false + create_index_from_tags: + add_links_in_graph_tree: true + enabled: false + exclude_paths: + - .gitignore + homepage_label: index + match_on_inline_tags: false + rel_output_path: obs.html/tag_index.md + sort: + key_path: '' + method: none + none_on_bottom: true + reverse: false + value_prefix: '' + styling: + include_folder_in_link: false + tags: [] + use_as_homepage: false + verbose: false + dataview: + enabled: false + folder: obs.html/export + embedded_note_titles: + enabled: true + hide_on_h1: true + embedded_search: + enabled: false + eraser: + enabled: true + folder_notes: + enabled: false + naming: folder name + placement: outside folder + footnote_md_extension: + enabled: true + graph: + coalesce_force: '-30' + enabled: true + show_inclusions_in_graph: true + styling: + show_icon: true + templates: + - id: 2d + name: 2d + path: builtin<2d> + - id: 3d + name: 3d + path: builtin<3d> + math_latex: + enabled: true + mermaid_diagrams: + enabled: true + strip_special_chars: false + post_processing: [] + rss: + channel: + description: + language_code: en-us + managing_editor: n/a + title: Notes + web_master: n/a + website_link: + enabled: false + host_root: https://localhost:8000/ + items: + description: + selectors: + - - yaml + - rss:description + - - first-paragraphs + - 2 + -

+ - - first-header + - 1 + publish_date: + default_value: '' + format_string: '' + iso_formatted: true + selectors: + - - yaml + - rss:publish_date + - - yaml_strip + - tags + - - date/ + selector: + exclude_files: + - not_created.html + - index.html + exclude_keys: [] + exclude_subfolders: + - .git + - obs.html + include_subfolders: [] + match_keys: [] + title: + selectors: + - - yaml + - rss:title + - - first-header + - 1 + - - path + - - parent + - 1 + - / + - - stem + styling: + show_icon: true + search: + add_files: true + enabled: true + styling: + show_icon: true + try_preload: false + side_pane: + left_pane: + close_if_empty: false + content_args: + div_selector: .content + rel_path: index.html + strip_sub_divs: + - .toc + strip_tags: [] + contents: dir_tree + enabled: true + width: 20rem + right_pane: + close_if_empty: true + content_args: + div_selector: .content + rel_path: index.html + strip_sub_divs: + - .toc + contents: toc + enabled: true + width: 16rem + smiles: + enabled: false + height: 300px + theme: dark + width: 100% + styling: + accent_color: 65, 76, 253 + add_dir_list: true + add_toc: + flip_panes: + header_template: full + layout: documentation + loading_bg_color: 22, 22, 22 + max_note_width: 120rem + toc_pane: + table_of_contents: + add_toc_when_missing: false + only_show_for_multiple_headers: true + tags_page: + enabled: true + styling: + show_icon: true + show_in_note_footer: true + theme_picker: + enabled: true + styling: + show_icon: true + force_filename_to_lowercase: true + img_alt_text_use_figure: true + no_clean: false + preserve_inline_tags: true + process_all: false + relative_path_html: false + relative_path_md: true + slugify_html_links: false + stdout_current_file: false + strict_line_breaks: auto + verbose_printout: false + warn_on_skipped_file: true + warn_on_skipped_image: true + wrap_inclusions: false +verbosity: info +video_format_suffixes: +- mp4 +- webm +- ogv +- mov +- mkv