xwmx / nb

CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
https://xwmx.github.io/nb
GNU Affero General Public License v3.0
6.64k stars 188 forks source link

Extended support for AsciiDoc #259

Open michix opened 1 year ago

michix commented 1 year ago

As of issue #132 there is support for AsciiDoc. Is it possible to improve this support a bit regarding the following points?

. When creating a new note, the default file extension is .md. Is it possible to use .adoc here? . When creating a new note with nb add --title filename.adoc a template for a Markdown-Document is used, i.e. the heading is done with # instead of =.

Probably I missed something in the great documentation. If so, I'm very sorry!

xwmx commented 1 year ago

@michix Yes, you can set the default extension to .adoc with the following command:

nb set default_extension "adoc"

New notes will then be created with the .adoc extension. AsciiDoc titles are also recognized in ls / list.

The missing add --title formatting for AsciiDoc was an oversight. It's now included in the latest versions in the repository and will be in the next release version.

Let me know if there are any other issues you are aware of with this.

michix commented 1 year ago

Many thanks! There is one more thing: in markdown the title is formatted using # Title while it is in asciidoc = Title.

Right now, this is not considered.

xwmx commented 1 year ago

As of the latest version 7.5.4, = AsciiDoc Titles should be fully supported, including with nb add when .adoc or .asciidoc is specified as the extension in nb add --filename or nb set default_extension. Let me know if there is anywhere I missed.