Skip to content

Repository files navigation

psiNotes-DocYoinker

omega Notes/psi Notes link

How to use

Prerequisites

  • Access to my Google Account (good luck).
  • Up to date Google API credentials and token (credentials.json in ./app/ or a safer place).
  • A virtual environment /w requirements installed:

python -m venv .venv

. .venv/bin/activate

pip install -r requirements.txt

Note: if something doesn't work, try moving stuff around, running commands from ./app/DocYoinker manually, or just activate the virtual environment manually and go ham & salami. Note 2: Remember to source your venv before trying to install shit from the terminal. It's a cheap and easy trip-up.

The "master plan pipeline"

Original project scope

  • Put the GDoc Document object's JSON in a .json.
  • Option to check what docs are downloaded to not waste bandwith. (and also compare revisionId to see if there were any changes.)
  • Save doc metadata somewhere.
  • Make a stash of functions to handle different parts of it.
  • First, the hard part - search for all images and their positions (so, PositionedObject's). "hard part" lol
  • Download all of the images ../yoinkstash/pos_objs/ and put their ID's into ../yoinkstash/pos_objs/rawposobjs.json
  • Then grab all the text and tables.
    • Find and put tables in a ../yoinkstash/tables/tables.json
  • The rest goes to ../yoinkstash/text/rawtext.json
    • Develop some system to identify your headers and etc (initially only for Notebook Zero).
    • Implement an separate general header segmenting system for non-Notebook-Zero notebooks.
      • Split rawtext.json into segtext.json (segmented text). 09/11/24 NOTE: maybe that's stupid.
  • Make the app into a CLI to control what it is supposed to do any given time.
  • <❗> Everything stores its position!
  • The first hellish attempt at trying to convert everything to XML or even HTML...
    • <❗> ....but maybe converting the JSON data into a very decent XML format i can engineer is a better idea?

(psi+chi) Notes era

  • Connect with Table of Contents; separate implementation!
  • Fetch and load ToC data.
  • Plug in chi Notes Bash scripts.
  • Put chi Notes page numbers statistics into ToC.
  • (❗ONLY when some initial GDoc export feat is done!!!) insert/"weave" omega Notes chapters/subchapters into chi Notes
    • And then into psi Notes!
  • Have a core template for testing (ala main.tex) and a Bash script that updates everything (mayhaps /w sed-diff-pipe tricks??) when something new is added to the doc format!

1-image project explanation

A meme

About

A cursed Python x Google API idea I had that I think about turning into a static site generator now.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages