Code Monkey home page Code Monkey logo

zettelkasten-tools's People

Contributors

semantic-release-bot avatar yeldirium avatar

Stargazers

 avatar

Watchers

 avatar  avatar

zettelkasten-tools's Issues

Template selection in `new` command

The new command must have an optional template option. This option selects from which template the new zettel will be generated.

To make this non-breaking with the current behavior, this option should default to the current default template.

The templates that are available should for the moment be predefined in the package. Later custom templates from user's zettelkasten should be made available.

  1. Find all available templates from the static/templates folder
  2. Add the --template option to the new command
  3. Check the given option against the list of available templates
  4. Use the selected template to generate the zettel
  5. Add tests

This can all be done without adding new templates. However, at least one more template would be good for testing purposes.

Create new zettel in custom directory

Currently new notes are always generated in the zettelkasten root. This has made sense so far.
Using neuron's dirtree feature to replace the current tagging structure for daily zettels makes it necessary to put new zettels in subdirectories.

To make this flexible, the new command should have an optional option that tells it where to put the new zettel.

  1. Add the new optional option --output-directory, short -o to the new command
  2. Create the new zettel in the given directory
  3. Add tests

Maybe templates should have a way to set their default output location? I don't see a way to integrate this into the .ejs templates yet.

Respect user-defined templates

Users should be able to define custom templates in their zettelkästen. Since we implement template finding logic in #1, this logic needs to be extended to look for custom templates in a predefined location.

I suggest ${cwd}/templates for this. I.e. in any zettelkasten you would have a templates directory which contains template zettels.

  • Extend template finding logic from #1 to look for an optional templates folder in the current working directory
    • Ignore it, if this folder does not exist
  • Look for template files in the directory and add them to the list of available templates
  • Add tests
    • That new --template ... can use the newly found templates
    • That templates lists them

List available templates with `templates` command

A new command called templates should be implemented that lists all available templates. This should be done after #1, since the logic for loading templates will be implemented there and can be re-used here.

When later on user-defined templates will be loaded, the templates command needs to respect that, so the abstraction over the template finding and loading logic should allow for that.

  1. Add new templates command
  2. Re-use template finding logic from #1 to find available templates
  3. List templates in cli output
  4. Add tests

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.