프로젝트
GitHub에서 보기
stefanw/bibbot
소개
BibBot은 도서관 계정으로 이용할 수 있는 언론 데이터베이스에 대한 접근 권한을 사용해 독일 온라인 뉴스 사이트의 페이월을 제거하는 브라우저 확장 프로그램입니다.
데이터 및 분석측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalBibBot
Development
This uses rollup to build the extension files. Install and run like this:
npm install
# Run this during development
npm start
Extension overview
The extension has four different entry points:
- The content script in
src/content.tsruns on the news article page, communicates with background script - the background script in
src/background.tswhich opens new tabs, navigates them around and scrapes the content - the options page in
src/options.tsis the options page for the extension - the popup in
popup/is opened when the extension icon in the toolbar is clicked
These are the relevant players:
src/providers.tscontains libraries that you authenticate against and that grant accesssrc/sources.tscontains databases that you can get access to through providerssrc/sites.tscontains news sites, how to extract their meta data and which source could provide access
For details on how to construct any of these entities, have a look at src/types.ts
Additionally user data like credentials and chosen provider is stored via browser.storage.sync.
Tests
There is a test setup for sites using Playwright that can be run with:
# install dependencies
npm ci
# Run linting and type checking
npm run lint
npm run check-types
# Always run build before tests, as test uses build files!
npm run build
# Run tests
npm run test
# Run tests with actual browser window for one domain
npm run test -- --headed -g "zeit.de"
Add testing data to site objects like this:
// ...
'www.example.com': {
examples: [
{
url: 'http://example.com/article.html',
selectors: {
query: 'The string resulting from query selector'
}
}
],
// optional setup async function
testSetup: async (page) => {
// page is playwright page
// use this for initial page setup
},
// ...
Release
- Run
npm version <major|minor|patch> git push --tags origin main- GitHub release Action will build, test, create release, sign Firefox extension, submit to Chrome Web Store and update website.
관련 프로젝트 살펴보기
불러오는 중…