Giter Club home page Giter Club logo

notemate.jl's Introduction

Welcome to NoteMate.jl! ๐Ÿ“

Dev Test Coverage Build Status Code Style: Blue

The perfect companion for working with your notes ๐Ÿ“š

NoteMate.jl is a programmatic transformation tool used to parse and manipulate notes whose structure follows the Open Knowledge Model (OKM). The goal of NoteMate.jl is to enable one to focus only on writing without worry of needing to add any special markup to your note while having the benefits of quickly sharing thoughts. In fact, sharing your thoughts, whether locally or on the internet, is never far away as NoteMate.jl provides tools to enable your thoughts to be published on digital gardens. Finally, due to the way NoteMate.jl parses documents, NoteMate.jl can transform notes following the OKM and express them in different outputs irrespective of the implementation.

Installation

To install NoteMate.jl currently, one needs to run the following command in their Julia REPL:

pkg> add NoteMate

Current Capabilities

Currently, these are some of the high level capabilities NoteMate.jl can perform:

  • Ingest supported filetypes following OKM layout:

    • Markdown
  • Parsing of a OKM "Note" object to different support outputs:

  • Static site deployment workflows supported for rapid digital garden creation:

  • Custom citation rendering and creation via pandoc, bibtex, and CSL

Websites Using NoteMate.jl

Here are some websites that use NoteMate.jl to manage their website

Contributors

NoteMate.jl would not be possible if not for the help and support from our contributors here:


SevorisDoe

notemate.jl's People

Contributors

thecedarprince avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sevorisdoe

notemate.jl's Issues

[FEATURE] Bidirectional Parsing of FranklinNote <-> Note <-> Original Note

I realized as of now that using NoteMate, I really only created the notes to go in one direction. Which is:

graph LR

Original-->Note
Note-->FranklinNote

But I never really considered how to make it bidirectional. I think NoteMate has support for this already since we can go from a Note to any other target. We may just need a function that ingests a Note and gives back the original representation of someone's note. Not sure exactly how to do that at the moment... May just be a matter of writing the workflow frankly and seeing what's missing.

Turn NoteMate notes into posts expected by Jekyll

Jekyll supports standard markdown the only thing to worry about would be to export it into an acceptable filename as Jekyll only registers files with the following format yyyy-mm-dd-<title> as a post. Some examples would be

  1. 2003-01-01-Post-on-Jan
  2. 2020-01-01-Post-on-Jan-but-later

If the file is named anything but this, it won't show up as a valid post when the site is built by Jekyll. As for parsing the actual content I'd say the only thing to parse would be the title block mentioned in the OKM post. Since Jekyll does have "title" as valid field when writing front matter.

[DOCS] Explicitly Defines What `NoteMate.jl` Does and Is

After a productive chat with @AlphabetsAlphabets , I realized that the upcoming documentation for NoteMate.jl could be significantly better to explain further what it is and what it does. Some points to target is:

  • Explaining it is a pure Julia implementation that utilizes the Open Knowledge Model
  • Is a package and not a command line tool

I think this made it to the README but I want to make sure this is clear before an initial version release.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Using `Pandoc.jl` for AST modifications

Awesome job with the project! I really like having my markdown files in Pandoc compatible syntax.

Shamless plug, but if you use Pandoc.jl you can:

  1. avoid having to maintain a Markdown parser
  2. get support for any file format that Pandoc supports (rst, org, etc)
  3. write Pandoc extensions or filters (or transformations) in Julia

There's also https://github.com/JuliaDocs/MarkdownAST.jl for completeness-sake. Which is what Documenter.jl uses. It would be nice to integrate MarkdownAST.jl and Pandoc.jl.

This will allow users to experiment with Franklin, Quarto and Documenter for different purposes seamlessly.

[FEATURE] Create a Test Suite

As we move closer to an initial release, there does need to be some sort of test suite for this entire package. Some areas needing coverage include:

  • Converting Note object to FranklinNote
  • Validating a note for a Note object
  • Functions all give the correct outputs

I am sure there are other pieces not coming to mind at the moment, but this is just a quick note to make sure this happens.

Improved documentation

So that we can keep a track of this:

Improving documentation for this, so that the internal methods and structural representations become clearer. That should allow easier understanding of the current capabilities and workflow that is designed into NoteMate. Future options that could be empowered by things like this are alternative static site generators, or translating semantic information in a different notes structures to the common notes format underpinning the implementation.

HTML to NoteMate note parser

Since parf of our long-term goals is two-way translatability, turning output HTML from the conversion of OKM notes by static site generators back to NoteMate notes is one of the reverse parsing needed, and one of the ultimate fallback options for reconstructing a note from HTML.

This has some secondary utility. It might serve as a generic web-scrapper, and it allows for the importing of notes on third websites following OKM formating to notes for the personal ZK.

[DOCS] Add Tutorial on Targeting Franklin.jl as an Output

@SevorisDoe and I were chatting and they loved the idea of being able to target outputs to create digital gardens -- which I in fact really didn't realize I was creating here on my personal website: https://jacobzelko.com/archive/

It would be good to have a tutorial in which it goes from the assumption a note base is in appropriate format for NoteMate to parse, and then showing how one could build up Franklin webpages that could be used to deploy to a Franklin website. Example here already: https://github.com/TheCedarPrince/thecedarprince.github.io/blob/main/scripts/note_generator.jl

[FEATURE] Coalesce Multiple Notes into One Single Document

One note should be able to be pulled from a knowledge base and then turned into a single note which recursively pulls linked notes from within the original document into a single document. This should not be too hard to make but needs a bit of checking and some dedicated development. Ideally, the functionality should have a recursive depth limit. Then, the table of contents should be created in the final document dependent on that.

Writing a general Obsidian zettlekasten parser

All ZK notes are different for the most part they have "tags" or "category" at the very top. That is going to be very helpful as it is a constant. But everything else into OKM is going to be more difficult.

OKM specifies a references and a bibliography section. This is the part where it gets difficult. I use footnotes for my references. Some have a dedicated section. I don't have a "notes" section either. I go straight into the content after writing all the metadata/frontmatter. So, how should I go about handling this?

Those are the general issues as for the Obsidian specific issues it has to do with the various linking methods like [[301 - Haskell]] there are also more such as [[filename#heading]], [[filename^block containing this text]] and there are more.

If it helps below are two of my notes one in my writing style. The second complies with OKM.

Non-OKM

tags: #dev 
links: [[dev wiki]], [[301 - Haskell]]

---

# 301 - Functions
A function is defined by specifying its name, arguments an then an expression[^1]. The basic format looks like this:

```hs
<function name> <arg1> ... <nth arg> = <expression>
```

A simple function would look like this.

```hs
foo name = "My name is " <> name
```

Everything in haskell is a function. `putStrLn` is just a function that accepts one parameter. It is a good idea to add type signatures for the application so the above function will have this signature.

```hs
foo :: String -> String
```

Because `foo` takes a `String` and returns `String`.

```hs
bar greeting name = greeting <> " " <> name
```

This function's signature is this.

```hs
bar :: String -> String -> String
```

Which is pretty mind bending because all haskell functions only accepts *one* parameter. `bar` will take *one string* as a parameter, and returns a *function*, then that function *returns* a string[^2]. ^f18191

> This function only accepts one parameter thing is explained in [[301 - Anonymous Functions#^702438]].

# Partial application
A partial application is interesting. It works sort of like a default value for functions. First, define a function as per normal.

```hs
el tag content = "<" <> tag <> ">" <> content <> "</" <> tag <> ">"
```

^8a5b8d

As for the "default value" part it looks like this.
```hs
html_ :: String -> String
html_ = el "html"

body_ :: String -> String
body_ = el "body"
```

When you call `body_` you only need to pass in *one* argument. That's because the `content` argument is already passed in. You also don't need to specify that another remaining arugment is necessary.

Changing `body_`'s definition to this
 
```hs
body_ content = el "body" content
```

hls will pick it up and warn you that it can be simplified.

```hs
Diagnostics:
1. Eta reduce
   Found:
     body_ content = el "body" content
   Why not:
     body_ = el "body"
```

[^1]: https://lhbg-book.link/03-html/01-html_content.html
[^2]: https://lhbg-book.link/03-html/02-type_signatures.html

OKM


# 301 - Functions - OKM
Date: June 6th 2023
Summary: Covers function usage and creation in Haskell
tags: #dev

---

A function is defined by specifying its name, arguments an then an expression[^1]. The basic format looks like this:

```hs
<function name> <arg1> ... <nth arg> = <expression>
```

A simple function would look like this.

```hs
foo name = "My name is " <> name
```

Everything in haskell is a function. `putStrLn` is just a function that accepts one parameter. It is a good idea to add type signatures for the application so the above function will have this signature.

```hs
foo :: String -> String
```

Because `foo` takes a `String` and returns `String`.

```hs
bar greeting name = greeting <> " " <> name
```

This function's signature is this.

```hs
bar :: String -> String -> String
```

Which is pretty mind bending because all haskell functions only accepts *one* parameter. `bar` will take *one string* as a parameter, and returns a *function*, then that function *returns* a string[^2]. ^f18191

> This function only accepts one parameter thing is explained in [[301 - Anonymous Functions#^702438]].

# Partial application
A partial application is interesting. It works sort of like a default value for functions. First, define a function as per normal.

```hs
el tag content = "<" <> tag <> ">" <> content <> "</" <> tag <> ">"
```

^8a5b8d

As for the "default value" part it looks like this.
```hs
html_ :: String -> String
html_ = el "html"

body_ :: String -> String
body_ = el "body"
```

When you call `body_` you only need to pass in *one* argument. That's because the `content` argument is already passed in. You also don't need to specify that another remaining arugment is necessary.

Changing `body_`'s definition to this
 
```hs
body_ content = el "body" content
```

hls will pick it up and warn you that it can be simplified.

```hs
Diagnostics:
1. Eta reduce
   Found:
     body_ content = el "body" content
   Why not:
     body_ = el "body"
```

[^1]: https://lhbg-book.link/03-html/01-html_content.html
[^2]: https://lhbg-book.link/03-html/02-type_signatures.html

[DOCS] Add Tutorial on Parsing Your Notes to NoteMate

In a big conversation with @SevorisDoe, we both concluded that there needs to be a tutorial that shows how to convert your local notes to Note representations used by NoteMate. I have examples here we could use as a starting point: https://github.com/TheCedarPrince/thecedarprince.github.io/blob/main/scripts/note_generator.jl

There is a bit of a science needed to convert one's own notes to a NoteMate Note as everyone will have their own note taking structure. Instead, this tutorial would show more the general principles on how to convert a person's own note for use within NoteMate.

[DOCS] Video Tutorial Explaining How An Implementation Could Work Together

I think after discussion with both @AlphabetsAlphabets and @SevorisDoe , having a video tutorial showing how everything fits together with the tools provided by NoteMate.jl to go from a note to a published piece automatically would be perfect. The video could cover the following:

  • What is the OKM?
  • What is NoteMate.jl and what does it do?
  • How do I parse a note?
  • How do I convert a parsed note to a Note object?
  • How do I convert a Note to a file output I want?
  • How can I deploy a file output to a website?
  • What does my personal website look like?

I think that would go a long ways to making things more consolidated and understandable with what this project actually is!

[FEATURE] Report Building Support

Notemate is great already as a tool for parsing and understanding notes. But I think it can be even more powerful by making or adding support for generating different sorts of artifacts like reports, newsletters, and more. Some idea for functions could be:

  • Parse over time periods to collect notes
  • Pull summaries from notes quickly
  • Automate generation of note digests
  • Note analytics
    • Word clouds
    • Notes generated over time

Just some ideas before I forget!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.