Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/judell/hlib
JS support for Hypothesis-based projects
https://github.com/judell/hlib
Last synced: 3 months ago
JSON representation
JS support for Hypothesis-based projects
- Host: GitHub
- URL: https://github.com/judell/hlib
- Owner: judell
- License: apache-2.0
- Created: 2018-04-06T19:15:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T14:52:15.000Z (over 3 years ago)
- Last Synced: 2024-04-21T07:35:55.851Z (7 months ago)
- Language: TypeScript
- Size: 420 KB
- Stars: 21
- Watchers: 5
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hlib
JS support for Hypothesis-based projects
Used by:
https://github.com/judell/facet
https://github.com/judell/zotero
https://github.com/judell/HypothesisFootnotes
https://github.com/judell/ContributorFocus
https://github.com/judell/StudentReview
https://github.com/judell/FactCheck
https://github.com/judell/ClaimReview
https://github.com/judell/ClimateFeedbackExport
https://github.com/judell/CrossLink
https://github.com/judell/SingleAnnotationWithReplies
https://github.com/judell/ClinGen
https://github.com/judell/CopyAnnotationshttps://github.com/judell/HelloWorldAnnotated
https://github.com/judell/AnnotationPoweredSurvey
https://github.com/judell/TagRename
## Setup
In the folder cloned from github:
```
npm install --save-dev webpack@latest
npm install --save-dev webpack-cli@latest
npm install --save-dev source-map-loader@latest
```## Documentation
http://jonudell.info/hlib/doc/modules/_hlib_.html
## Running tests
1. python server.py
2. Get your API token from https://hypothes.is/account/developer, open localhost:8000, open a browser console and run this:
```
localStorage.setItem('h_token', 'HYPOTHESIS_API_TOKEN');
localStorage.setItem('h_user', 'HYPOTHESIS_USERNAME');
localStorage.setItem('h_subjectUserTokens', JSON.stringify({ HYPOTHESIS_USERNAME: "HYPOTHESIS_API_TOKEN" }));
```Then:
3. http://localhost:8000/test.html
4. Use `facet` (https://jonudell.info/h/facet) to exercise the library.
```
git clone https://github.com/judell/facet.git
cd facet
npm install typescript --save-dev
./make.sh dev # ignore warning about showdown
python server.pyAt this point, the setup is something like:
In ~/home/USER/hlib, the library is available at http://localhost:8000
In ~/home/USER/facet, the `facet` app is running on http://localhost:8001, using the library at http://localhost:8000
Open https://localhost:8001 and put `facet` through its paces.
# Versions
The current version hosted at jonudell.info is https://jonudell.info/hlib/hlib3.bundle.js, and https://github.com/judell/facet is pinned to that version.