Add a way to specify additional notebook paths (they are ultimately "merged" in order).
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 |
Add a way to specify additional notebook paths (they are ultimately "merged" in order).
-Cargument (chdir behave makes no sense with multiple arguments)Proposed CLI:
Originally posted by @srid in #20 (comment)
Implementation:
Consider extending
fsLayersbased on the paths passed in CLI,emanote/src/Emanote/Source.hs
Lines 22 to 24 in 78c9a2c
This may involve replacing
LocUserwith aLocUserProvided FilePathemanote/src/Emanote/Source/Loc.hs
Lines 7 to 15 in 78c9a2c