Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify command line options with configuration files #33

Open
icornelius opened this issue Sep 24, 2022 · 1 comment
Open

simplify command line options with configuration files #33

icornelius opened this issue Sep 24, 2022 · 1 comment

Comments

@icornelius
Copy link
Collaborator

Command line options for zettel, zimport, and zfind could be simplified by reading default settings from a configuration file located within a .zettelgeist directory, on the model of .git. The file .counter.dat and the database itself could be placed within the same directory. A new command would be required, to create the directory and configuration file: e.g., zettelgeist init.

Defaults for zettel:

  • counter digits (override with --digits)
  • counter path (override with --counter-path)
  • id (override with --id)
  • file path (override with --name-dir)
  • timestamp digits (no current override option)

Defaults for zimport

  • directory from which to import zettels (override with --dir)
  • database name (override with --database)
  • absolute or relative filenames (default to --fullpath)
  • treatment of an existing database (default to --create)

Defaults for zfind

  • database name (override with --database)
@gkthiruvathukal
Copy link
Member

Ideally, we want this to be able to support per-project thinking, much like what .git accomplishes. This would require various Z tools to check the current directory and parents, ultimately leading to the home directory if not found. but I think this is a cool idea.

Main use case for this, is probably --database but there are also situations where you might want common --show options in tools like zfind (i.e. always show the title by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants