Skip to content

Allow specifying additional notebooks in CLI #35

@srid

Description

@srid

Add a way to specify additional notebook paths (they are ultimately "merged" in order).

  • Rethink Ema's -C argument (chdir behave makes no sense with multiple arguments)
  • Implement this issue

Proposed CLI:

# Does nothing; just prints --help
emanote

# Fails, because requires a path argument
emanote run

# Runs emanote live server on the given folder (the only layer)
emanote run .

# Runs emanote gen command, with the given layers in argument order
emanote gen ./.deploy/github ./

# Run emanote live server on current directory, using common themes and public notes (3 layers)
cd ~/MyPrivateNotes
emanote run ~/myemanotethemes ~/MyPublicNotes ./

Originally posted by @srid in #20 (comment)


Implementation:

Consider extending fsLayers based on the paths passed in CLI,

fsLayers <- liftIO locLayers
Mount.unionMountOnLVar
fsLayers

This may involve replacing LocUser with a LocUserProvided FilePath

-- | Location of the notebook, even if it contains a subset of files.
--
-- The order here matters. Top = higher precedence.
data Loc
= -- | This always refers to current working directory
LocUser
| -- | The location of the emanote's default files directory containing
-- templates, data, etc.
LocEmanoteDefault FilePath

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions