-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c81a20
commit 522e59f
Showing
22 changed files
with
3,209 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 | ||
tab_width = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
|
||
main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"env": { "node": true }, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"no-prototype-builtins": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Build Pull Request | ||
|
||
on: pull_request | ||
|
||
env: | ||
PLUGIN_NAME: obsidian-soundscapes | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "20.x" | ||
- name: Build | ||
id: build | ||
run: | | ||
npm ci | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build Obsidian Plugin | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
PLUGIN_NAME: obsidian-soundscapes | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "20.x" | ||
- name: Get Package Version | ||
id: get_package_version | ||
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | ||
- name: Build | ||
id: build | ||
run: | | ||
echo Building for version PACKAGE_VERSION | ||
npm ci | ||
npm run build | ||
zip -jr ${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip dist/* | ||
ls | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.PACKAGE_VERSION }} | ||
files: | | ||
${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip | ||
dist/main.js | ||
dist/manifest.json | ||
dist/styles.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# vscode | ||
.vscode | ||
|
||
# Intellij | ||
*.iml | ||
.idea | ||
|
||
# npm | ||
node_modules | ||
|
||
# Don't include the compiled main.js file in the repo. | ||
# They should be uploaded to GitHub releases instead. | ||
main.js | ||
|
||
# Exclude sourcemaps | ||
*.map | ||
|
||
# obsidian | ||
data.json | ||
|
||
# Exclude macOS Finder (System Explorer) View States | ||
.DS_Store | ||
|
||
# Remove local builds | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tag-version-prefix="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
# obsidian-soundscapes | ||
# Obsidian Soundscapes | ||
|
||
A plugin for Obsidian.MD that adds a music/ambiance player to the status bar to play Lofi beats, nature sounds, ambiance, relaxing music, and more. | ||
|
||
![Screenshot of Obsidian Soundscapes player](screenshot1.png) | ||
|
||
![Screenshot of Obsidian Soundscapes player](screenshot2.png) | ||
|
||
## How to Install | ||
|
||
Plugin will be added to official repository shortly. | ||
|
||
## How to Use | ||
|
||
In the settings screen you can select which Soundscape you would like to play and whether or not it should play on launch of Obsidian. As pictured above, the player and it's controls are displayed in the status bar. Volume can be set and is remembered between launches of Obsidian. | ||
|
||
![Settings screen](settings.png) | ||
|
||
## Requesting New Soundscapes | ||
|
||
Have an idea for a new Soundscape? [Open an issue](https://github.com/andrewmcgivery/obsidian-soundscapes/issues/new) and link a Youtube video and why we should add it! | ||
|
||
## External Resources | ||
|
||
This plugin makes use of the Youtube IFrame API and includes that script as a result. Youtube videos are loaded in the background. | ||
|
||
## Credits | ||
|
||
- [Lofi beats](https://www.youtube.com/watch?v=jfKfPfyJRdk) | ||
- [Spa atmosphere](https://www.youtube.com/watch?v=luxiL4SQVVE) | ||
- [The Sims complete soundtrack](https://www.youtube.com/watch?v=wKnkQdsITUE) | ||
- [Thunderstorm](https://www.youtube.com/watch?v=nDq6TstdEi8) | ||
- [Cozy fireplace](https://www.youtube.com/watch?v=rCYzRXLWcIg) | ||
- [Birds chirping](https://www.youtube.com/watch?v=mFjU4JuJgnM) | ||
- [Ocean waves](https://www.youtube.com/watch?v=bn9F19Hi1Lk) | ||
- [Relaxing jazz](https://www.youtube.com/watch?v=tNvh2w8lTes) | ||
- [Coffee shop ambience](https://www.youtube.com/watch?v=uiMXGIG_DQo) | ||
- [Animal Crossing New Horizons](https://www.youtube.com/watch?v=zru-TLye9jo) | ||
- [Calm Nintendo music](https://www.youtube.com/watch?v=sA0qrPOMy2Y) | ||
|
||
## Reporting Issues | ||
|
||
If you run into any issues with this plugin, please [open an issue](https://github.com/andrewmcgivery/obsidian-soundscapes/issues/new) and include as much detail as possible, including screenshots. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import esbuild from "esbuild"; | ||
import process from "process"; | ||
import builtins from "builtin-modules"; | ||
import { sassPlugin } from "esbuild-sass-plugin"; | ||
import copyStaticFiles from "esbuild-copy-static-files"; | ||
import path from "path"; | ||
|
||
const banner = `/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD | ||
if you want to view the source, please visit the github repository of this plugin | ||
*/ | ||
`; | ||
|
||
const prod = process.argv[2] === "production"; | ||
const outdir = prod | ||
? "./dist/" | ||
: // Assumed local path. Update this to the path of your local development vault | ||
"E:/Documents/PersonalObsidianVault/.obsidian/plugins/obsidian-soundscapes/"; | ||
|
||
const context = await esbuild.context({ | ||
banner: { | ||
js: banner, | ||
}, | ||
entryPoints: ["main.ts", "styles.scss"], | ||
bundle: true, | ||
external: [ | ||
"obsidian", | ||
"electron", | ||
"@codemirror/autocomplete", | ||
"@codemirror/collab", | ||
"@codemirror/commands", | ||
"@codemirror/language", | ||
"@codemirror/lint", | ||
"@codemirror/search", | ||
"@codemirror/state", | ||
"@codemirror/view", | ||
"@lezer/common", | ||
"@lezer/highlight", | ||
"@lezer/lr", | ||
...builtins, | ||
], | ||
format: "cjs", | ||
target: "es2018", | ||
logLevel: "info", | ||
sourcemap: prod ? false : "inline", | ||
treeShaking: true, | ||
minifySyntax: true, | ||
plugins: [ | ||
sassPlugin(), | ||
copyStaticFiles({ | ||
src: "./manifest.json", | ||
dest: path.join(outdir, "manifest.json"), | ||
}), | ||
], | ||
outdir: outdir, | ||
define: { | ||
"process.env.NODE_ENV": prod ? '"production"' : '"development"', | ||
}, | ||
}); | ||
|
||
if (prod) { | ||
await context.rebuild(); | ||
process.exit(0); | ||
} else { | ||
await context.watch(); | ||
await context.serve(); // This enables the "live reload" | ||
} |
Oops, something went wrong.