Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

adamAfro/fc-browser-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FC browser maker 🃏

Browser extension for automated flashcards making ⚙️ - it gathers words from a text, counts them and seeks for translations. Then QR code can be scanned

⚠️ No longer developed, I splited the idea into 2: Popup GPT and QR Selection

Features and TODOs

  • 📱 making scannable QR codes with CSV term,definition flashcards
  • 🪤 making selections with cursor
  • 📑 sending (also through QR) selection itself as reference
  • 🖌️ UI design
  • 🫂 general purpose functionalities:
    • 🪤 converting selection to flashcards with translations (deepl.com)
    • 🤖 converting selection to chat GPT definitions flashcards (chat.openai.com)
  • 🦊 firefox extension
  • 🪐 chrome extension

*replaceing highlighting with find API could remove need for read-all permissions for all pages, given that selecting is done properly

Howto?

  1. install from addons page
  2. select text, click right mouse button and select Make flashcards from context menu
  3. select option from popup
    • a popup will live-scrap a 3rd party website
    • some background calls for scrapping will be done, with popup having loading screen
  4. view in popup, you can get back to it with extension button:
    • ranking of the words with their translations
    • copy button for CSV copy (for quizlet for eg.)
    • QR code slideshow for scanning (see FCQR)

⚠️ Scrapping 3rd party websites opens popups in new window and closes them immediately after scrap, see src/menu.ts and src/pages/*

Scrapping Websites

Network usage of scrapping is dependent of form data is given.

Live-Scrap

Some websites work with JS, so casual scrapping won't do much. Headless browser seems not adequate when you have normal browser and not a terabyte-need of data, so a popup it is

Also it looks cooler

Live scarp tends to be more compact and as such may require less network usage.

Background scrap

Some websites can be scrapped with normal fetch API, and that is prefered for simplicity and speed

  • drawbacks - most of website's don't support wide CORS so proxies may be needed

Dev and Deps

  • developed and tested with firefox 🦊
  • bundling requirements: deno&esbuild
    • install deno and optionally cache esbuild with deno cache https://deno.land/x/esbuild@v0.18.11/mod.js
    • bundle with deno run bundle.js accepting prompts and make xpi file with ./zip.sh
    • while developing, use: deno run -A --watch=./src bundle.js
  • datalog/datamatrix-svg under MIT

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License .