Skip to content

Commit 2566587

Browse files
author
Elias Sundqvist
committed
Release Version 0.2.1
1 parent 2cd89c1 commit 2566587

File tree

10 files changed

+38
-7042
lines changed

10 files changed

+38
-7042
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ jobs:
44
build:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
7+
- name: Checkout repository and submodules
8+
uses: actions/checkout@v2
9+
with:
10+
submodules: recursive
811
- name: Install modules
912
run: yarn
1013
- name: Run ESLint

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- name: Checkout repository and submodules
18+
uses: actions/checkout@v2
19+
with:
20+
submodules: recursive
1821
- name: Use Node.js
1922
uses: actions/setup-node@v1
2023
with:
2124
node-version: "16.x" # You might need to adjust this value to your own version
2225
- name: Build
2326
id: build
2427
run: |
25-
npm install
26-
npm run build --if-present
28+
yarn
29+
yarn build
2730
mkdir ${{ env.PLUGIN_NAME }}
2831
cp main.js manifest.json ${{ env.PLUGIN_NAME }}
2932
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}

Modified Resources.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The following resources have been modified in the (`resources`) folder, and will need to be reapplied when updating hypothesis version.
22

33
* `hypothes.is\app.html` and `hypothes.is\app.html`
4-
> remove "dsn" from the sentry object. This prevents crash logs from being sent to the hypothes.is theme. (See issue #97)
4+
> remove "dsn" from the sentry object. This prevents crash logs from being sent to the hypothes.is team. (See issue #97)
55
66
* `cdn.hypothes.is\demos\epub\epub.js\js\reader.js`
77
> Expose `start()` function as `window.epubReader(readerSettings)`. It allows to pass settings to reader from `annotatorView`
@@ -141,19 +141,4 @@ The following resources have been modified in the (`resources`) folder, and will
141141
// return; //(comment out this check)
142142
}
143143
...
144-
```
145-
* `cdn.hypothes.is\hypothesis\1.853.0\build\scripts\annotator.bundle.js`
146-
> This is needed for reliable navigation and focusing of highlights.
147-
```js
148-
/*expose the guest object for annotation navigation.*//*START EDIT HERE*/window.guests=[...(window.guests??[]),this]/*END EDIT HERE*/
149-
```
150-
> This fixes an issue with highlights not working:
151-
Replace `if(l||(l=new Set,this._sentChannels.set(i,l)),l.has(a))return;` from annotator.bundle.js
152-
with `if(l||(l=new Set,this._sentChannels.set(i,l)),l.has(a)){};`
153-
154-
155-
* `cdn.hypothes.is\hypothesis\1.960.0\build\scripts\sidebar.bundle.js`
156-
> This is needed for custom markdown rendering (replace in the part that corresponds to `renderMathAndMarkdown`)
157-
```js
158-
/*REPLACE THE MARKDOWN RENDERING FUNCTION*/return window.renderObsidianMarkdown(e);
159-
```
144+
```

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ You can make a [pull request](https://github.com/elias-sundqvist/obsidian-annota
6969

7070
## Changelog
7171

72+
### 0.2.1 (2022-03-06) **[BRAT](https://github.com/TfTHacker/obsidian42-brat) release** *Basic web and video annotation*
73+
* `annotation-target-type` can now take on the values `web` and `video`.
74+
* With `web` the annotation target can (in theory) be any website. Some work better than others. Link navigation does not work.
75+
* With `video`, only youtube links are supported. In order to use this feature, a link to a zip file with the annotator.tv resources must be provided in the plugin settings. It cannot be bundled with the plugin since that would most likely violate copyright.
76+
* You can ask someone for a link, or generate it yourself by making an account at annotate.tv, signing in, going to https://annotate.tv/videos/620d5a42b9ab630009bf3e31#, and downloading the website using the [Save All Resources](https://chrome.google.com/webstore/detail/save-all-resources/abpdnfjocnmdomablahdcfnoggeeiedb?hl=en) chrome extension, uploading it to google drive, and [generating a direct link](https://sites.google.com/site/gdocs2direct/).
77+
* Other improvements:
78+
* Some behind-the-scenes changes have been made so that the hypothes.is version can be more easily upgraded in the future.
79+
7280
### 0.2.0 (2022-01-26) **[BRAT](https://github.com/TfTHacker/obsidian42-brat) release** *Improved markdown rendering, epub reader*
7381
* Markdown in the hypothesis sidebar should now fully support the regular obsidian syntax. (including links, embeds, custom codeblocks etc.)
7482
* Several Epub improvements, Thanks to @aladmit for these!

README_DEV.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
> Note:
3+
>
4+
> If you are on windows, you must make the following small changes
5+
> 1. Go to .\submodules\hypothesis-client-annotator-fork\node_modules\@hypothesis\frontend-build\lib\rollup.js
6+
> 2. Add `import { pathToFileURL } from 'url'` to the top of the file.
7+
> 3. Replace `import(resolve(path))` with `import(pathToFileURL(resolve(path)))`

manifest-beta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "obsidian-annotator",
33
"name": "Annotator",
4-
"version": "0.2.0",
5-
"minAppVersion": "0.13.19",
4+
"version": "0.2.1",
5+
"minAppVersion": "0.13.29",
66
"description": "This is a sample plugin for Obsidian. It allows you to open and annotate PDF and EPUB files.",
77
"author": "Obsidian",
88
"authorUrl": "https://obsidian.md/about",

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "obsidian-annotator",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {
77
"prettier-format": "prettier --config .prettierrc.js src/**/*.tsx --write",
88
"lint": "eslint src --ext .ts,.tsx",
99
"dev": "rollup --config rollup.config.js -w",
1010
"test": "jest",
11-
"build": "rollup --config rollup.config.js --environment BUILD:production"
11+
"quick-build": "rollup --config rollup.config.js --environment BUILD:production",
12+
"build": "yarn build-hypothesis && yarn quick-build",
13+
"build-hypothesis": "rimraf resources/cdn.hypothes.is/hypothesis/build && cd submodules/hypothesis-client-annotator-fork && yarn && yarn build && move-cli build ../../resources/cdn.hypothes.is/hypothesis/build && cd ../.."
1214
},
1315
"keywords": [],
1416
"author": "",
@@ -26,7 +28,6 @@
2628
"@codemirror/rangeset": "^0.19.0",
2729
"@codemirror/search": "^0.19.0",
2830
"@codemirror/state": "^0.19.0",
29-
"@codemirror/stream-parser": "https://github.com/lishid/stream-parser",
3031
"@codemirror/view": "^0.19.0",
3132
"@rollup/plugin-commonjs": "^18.0.0",
3233
"@rollup/plugin-json": "^4.1.0",
@@ -39,15 +40,18 @@
3940
"@typescript-eslint/eslint-plugin": "^4.29.3",
4041
"@typescript-eslint/parser": "^4.29.3",
4142
"babel-jest": "^27.1.1",
43+
"cross-env": "^7.0.3",
4244
"eslint": "^7.32.0",
4345
"eslint-config-prettier": "^8.3.0",
4446
"eslint-plugin-prettier": "^3.4.1",
4547
"eslint-plugin-react": "^7.24.0",
4648
"jest": "^27.1.1",
4749
"magic-string": "^0.25.7",
4850
"minify": "^7.0.2",
51+
"move-cli": "^2.0.0",
4952
"obsidian": "^0.13.11",
5053
"prettier": "^2.3.2",
54+
"rimraf": "^3.0.2",
5155
"rollup": "^2.32.1",
5256
"rollup-plugin-analyzer": "^4.0.0",
5357
"rollup-plugin-base64": "^1.0.1",

rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import typescript from '@rollup/plugin-typescript';
22
import {nodeResolve} from '@rollup/plugin-node-resolve';
3+
import json from '@rollup/plugin-json';
34
import commonjs from '@rollup/plugin-commonjs';
45
import copy from 'rollup-plugin-copy'
56
import fs from 'fs';
@@ -58,6 +59,7 @@ export default {
5859
"@lezer/lr"],
5960
plugins: [
6061
typescript(),
62+
json(),
6163
nodeResolve({browser: true}),
6264
replace({
6365
'process.env.NODE_ENV': JSON.stringify('production')

0 commit comments

Comments
 (0)