Mumemo is screenshot-driven note application.
MIT License
Mumemo is screenshot-driven note application. Mumemo is also No-UI(User Interaction) note application.
mumemo decide focus area according to followings:
Example of focus area workflow(DEBUG:true
):
Input | Step 2 | Step 3 | Step 4 | Output |
---|---|---|---|---|
Screenshot from https://git-scm.com/book/ja/v2
⚠️ This app is not signed. So, OS show warning about it.
Additional installation steps on macOS:
mumemo.app
⚠️ require permission on macOS. Open the app, and you need to add permission for mumemo.app
activeWindow
objectactiveWindow
includes active app info like bundle.id, url, title.This app writes Markdown note(README.md
) and screenshots into the output directory.
📝 You need to allow mumemo.app to access "Accessibility" and "Screen recording" on macOS's Privacy options This app requires the permission for get active window information.
Press CommandOrControl+Shift+X (It can be customized by mumemo.config.js
)
Capture focus area and show note window
Note your memo into the window
Save it
The app writes the input memo and captured image into output directory.
You can customize key config and others by ~/.config/mumemo/mumemo.config.js
.
shortcutKey
: shortcut key for launch
create()
: This function create config and return it
module.exports.shortcutKey = "CommandOrControl+Shift+M"
/**
* app is electron app
* path is Node's path module
* activeWindow is https://github.com/sindresorhus/active-win result
**/
module.exports.create = ({ app, path, activeWindow }) => {
return {
autoFocus: true,
autoSave: true,
autoSaveTimeoutMs: 5 * 1000,
// DEBUG,
DEBUG: false
};
}
UserConfig
inteface is following.
{
/**
* Enable debug mode
* Default: false
*/
DEBUG: boolean;
/**
* Output dir path
* if set the path, use the path instead of stored path
* Default: use stored path
*/
outputDir?: string;
/**
* Output content file name
* Default: README.md
*/
outputContentFileName: string;
/**
* Output image directory prefix
* If you want to put images to same dir with README.md, set "."
* Default: img/
*/
outputImageDirPrefix: string;
/**
* format input by this function and append the result
* Default: for markdown
*/
outputContentTemplate: (args: OutputContentTemplateArgs) => string;
/**
* Auto focus when open input window
* Default: true
*/
autoFocus: boolean;
/**
* Save content automatically without no focus the input window after autoSaveTimeoutMs
* Default: true
*/
autoSave: boolean;
/**
* config for autosave
* Default: 30 * 1000
*/
autoSaveTimeoutMs: number;
/**
* if quoteFrom is clipboard, quote text from clipboard
* if quoteFrom is selectedText, quote text from selected text
* Default: "selectedText"
*/
quoteFrom: "clipboard" | "selectedText";
/**
* Send key stroke when ready to input window
* Note: macOS only
*/
sendKeyStrokeWhenReadyInputWindow?: {
key: string;
shift?: boolean;
control?: boolean;
option?: boolean;
command?: boolean;
};
/**
* bound ratio for screenshot
* Increase actual focus area using this ratio.
* Default: 1.2
*/
screenshotBoundRatio: number;
/**
* Max search count for related content that is included into screenshot result
* The higher the number, screenshot size is large.
* Default: 5
*/
screenshotSearchRectangleMaxCount: number;
/**
* if the rectangle count is over, mumemo give up to create focus image.
* Just use screenshot image instead of focus image
* Default: 80
*/
screenshotGiveUpRectangleMaxCount: number;
/**
* if the factor value is defined, mumemo resize screenshot image with the factor.
* Retina display's the factor value is 2.
* display size * factor value is the result of screenshot image size.
* if you want to resize the screeenshot image size, set `1` to `screenshotResizeFactor`
* Default: displayFactor's value
*/
screenshotResizeFactor?: number;
}
For more details, see src/main/Config.ts
mumemo
works with No-UI(User Integration).
The combination of autoFocus: false
and autoSave: true
that allow to save without user interaction.
~/.config/mumemo/mumemo.config.js
:
module.exports.shortcutKey = "CommandOrControl+Shift+X"
module.exports.create = ({ app, path }) => {
return {
autoFocus: false,
autoSave: true,
autoSaveTimeoutMs: 3 * 1000,
};
}
You can change config by each app.
module.exports.create = ({ app, path, activeWindow }) => {
// Note: macOS's activeWindow has owner.bundleId
const isKindle = activeWindow?.owner?.bundleId?.includes("Kindle")
return {
autoFocus: true,
autoSave: true,
quoteFrom: isKindle ? "clipboard" : "selectedText"
};
}
When you use 4K display, resize screenshot size to 1/2.
module.exports.create = ({ app, path, activeWindow }) => {
return {
// If you use 4K display, resize 1/2 screenshot size
// 4K display will be 2 by default.
// so screenshotResizeFactor is `1` that equal to 1/2 size.
screenshotResizeFactor: activeWindow?.bounds?.width >= 2560 ? 1 : undefined
};
}
I've liked to write note and capture the screenshot during reading a book.
This behavior take two steps.
mumemo
reduce the steps.
mumemo output debug log using electron-log
on Linux: ~/.config/{app name}/logs/{process type}.log
on macOS: ~/Library/Logs/{app name}/{process type}.log
on Windows: %USERPROFILE%\AppData\Roaming\{app name}\logs\{process type}.log
Tail logging
$ tail -F ~/Library/Logs/mumemo/main.log
Debug
yarn install
yarn dev
Build
yarn dist
Release
npm version {patch,minor,major}
git push --tags
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT