Skip to content

Commit 745e16f

Browse files
authored
Add updated migration info and writing system (#67)
* Add voices gen_changeset & update migration docs * Update README, add wow.json * Init ox-hugo for writing setup * Create CNAME * Delete CNAME * Create CNAME * Init workflow * Update workflow file * Rm erroneous working dir * Re-init submodule for theme * Add some basic routes * Make refs use https:// It's an attempt to prevent mixed use of http and https://
1 parent 55408f6 commit 745e16f

37 files changed

+2072
-58
lines changed

.github/workflows/hugo.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo Blog site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- blog
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
# Default to bash
26+
defaults:
27+
run:
28+
shell: bash
29+
30+
jobs:
31+
# Build job
32+
build:
33+
runs-on: ubuntu-latest
34+
env:
35+
HUGO_VERSION: 0.127.0
36+
steps:
37+
- name: Install Hugo CLI
38+
run: |
39+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41+
- name: Install Dart Sass
42+
run: sudo snap install dart-sass
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
fetch-depth: 0
48+
- name: Setup Pages
49+
id: pages
50+
uses: actions/configure-pages@v4
51+
- name: check stuff
52+
working-directory: ./vyasa_blog
53+
run: |
54+
echo "Hello world, it's time to test the working directory: " && pwd
55+
- name: Install Node.js dependencies
56+
working-directory: ./vyasa_blog
57+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
58+
- name: Build with Hugo
59+
env:
60+
# For maximum backward compatibility with Hugo modules
61+
HUGO_ENVIRONMENT: production
62+
HUGO_ENV: production
63+
TZ: America/Los_Angeles
64+
working-directory: ./vyasa_blog
65+
run: |
66+
hugo \
67+
--gc \
68+
--minify \
69+
--baseURL "${{ steps.pages.outputs.base_url }}/"
70+
- name: Upload artifact
71+
uses: actions/upload-pages-artifact@v3
72+
with:
73+
path: ./vyasa_blog/public
74+
75+
76+
# Deployment job
77+
deploy:
78+
environment:
79+
name: github-pages
80+
url: ${{ steps.deployment.outputs.page_url }}
81+
runs-on: ubuntu-latest
82+
needs: build
83+
steps:
84+
- name: Deploy to GitHub Pages
85+
id: deployment
86+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ npm-debug.log
4444
# Any Secret Configs
4545
/config/*.secret.exs
4646
/venv/
47+
**.DS_Store
48+
/vyasa_blog/public/ltximg/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vyasa_blog/themes/PaperMod"]
2+
path = vyasa_blog/themes/PaperMod
3+
url = https://github.com/adityatelange/hugo-PaperMod

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blog.vyasa.tv

README.org

Lines changed: 80 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,104 @@ Wherever there be anything you dost not comprehend, cease to continue writing
66
-- Vyasa, Adi Parva - Mahabharatam
77
#+END_QUOTE
88

9-
### CLI Helpsheet
109

11-
```elixir
10+
* What is the _*Vyasa Project*_?
11+
=TODO=
12+
13+
* Getting Started Locally
14+
** Basic setup instructions
15+
*** Pre-requisites
16+
1. Language Setup for Elixir. For any development environment of your choice, setup the necessary LSPs for elixir.
17+
2. Docker
18+
3. AWS cli
19+
We use minio for local setup. At least a dummy profile needs to be set up using the aws cli.
20+
21+
*** First Setup Steps
22+
We first setup the servers that get run and then do teh data migration steps.
23+
24+
We can use the [[file:docs/migration_ritesh.livemd::Migration steps][livemarkdown here]] for the data migration steps.
25+
26+
1. start docker, use the [[file:docker-compose.yml][docker-compose file]] already available. This will start the minio, pg and the like
27+
#+begin_quote sh
28+
docker compose up
29+
#+end_quote
30+
2. init aws cli, use a dummy profile
31+
writing to the =~/.aws/credentials= file will work as well:
32+
33+
#+begin_quote toml
34+
[default]
35+
aws_access_key_id = secrettunnel
36+
aws_secret_access_key = secrettunnel
37+
#+end_quote
38+
3. create the s3 bucket that shall be used
39+
#+begin_quote sh
40+
aws --endpoint-url http://localhost:9000 s3 mb s3://vyasa
41+
#+end_quote
42+
4. install the elixir deps
43+
#+begin_quote elixir
44+
mix deps.get
45+
#+end_quote
46+
5. do an initial db migration
47+
#+begin_quote elixir
48+
mix ecto.setup
49+
#+end_quote
50+
6. [Data seeding] Seed the text, written and events
51+
This requires us to use a .json dump. [[./scripts/wow.json][Here's an example]] of such a dump.
52+
53+
We also need some voices files to init the voices. The voices repo is a private repo for now, can be found [[https://github.com/ve1ld/voices][here]].
54+
55+
For an easier time, use [[file:docs/migration_ritesh.livemd][this livemarkdown]].
56+
57+
*** Starting Steps
58+
1. Start aux services by running docker compose up
59+
2. Start the vyasa server
60+
#+begin_quote bash
61+
iex --sname vyasa --cookie foofoo --dbg pry -S mix phx.server
62+
#+end_quote
63+
64+
65+
66+
* CLI Scripts Helpsheet
67+
** 1. Running the shlokam.org scraper
68+
#+begin_quote elixir
1269
# build script
1370
mix escript.build
1471
# fetch from domain/path --storage :mode
1572
./vyasa fetch shlokam.org/hanumanchalisa --storage file
16-
```
17-
* Forms of Prior Art
18-
** [[http://worrydream.com/refs/Nelson-ComputerLibDreamMachines1975.pdf#page=57][Xanadu Pattern ]]
73+
#+end_quote
1974

20-
Ted Nelson the granddaddy of hypertext media, need I say more. The introduction to [[https://cs.brown.edu/people/nmeyrowi/LiteraryMachinesChapter2.pdf#page=12][Literary Machines]] is instructive to delineating the problem boundaries for literature
75+
* Matter of Prior Work
76+
We stand on the shoulders of giants. Here are some of the project that insipired this project into being started
2177

22-
** [[https://gwern.net/design][Design of Gwern.net]]
78+
** Prior Art
79+
*** [[http://www.shivkumar.org/music/Thiruppavai-04-AazhiMazhaiKanna-Varali.htm][Shivkumar's Archives]]
2380

24-
Gwern has incorporated sidenotes instead of footnotes on wide windows, drop caps, smallcaps, collapsible sections, automatic inflation-adjusted currency, Wikipedia-style link icons & infoboxes, custom syntax highlighting, extensive local archives to fight linkrot (archive engine), and an ecosystem of “popup”/“popin” annotations & previews of links for frictionless browsing—the net effect of hierarchical structures with collapsing and instant popup access to excerpts enables iceberg-like pages where most information is hidden but the reader can easily drill down as deep as they wish.
81+
Shivkumar Kalyanaraman has compiled and archived a wealth of song recordings, paired with word-by-word meanings
2582

26-
** [[https://edwardtufte.github.io/tufte-css/][Tufte.css]]
83+
*** [[https://shaivam.org/hindu-prayer-hub/detail/521][Shaivam]]
2784

28-
Edward Tufte has developed a distinctive style in his works: simple, with well-set typography, extensive sidenotes, and elegant representations of graphs and charts
85+
Built and maintained by devotees since 1996 a wealth of textual archives
2986

30-
** [[https://ctext.org/introduction][CText]]
87+
*** [[https://www.holy-bhagavad-gita.org/chapter/5/verse/8-9][Holy Bhagavad Gita]]
3188

32-
Dr. Donald Sturgeon has compiled a great corpus of ancient (in particular pre-Qin and Han dynasty) Chinese texts in an organized and searchable format which has been composed through an parallel passage interface, word lists for semantic linking and ancient text database.
89+
A tremendous effort by Jagadguru Kripaluji Trust
3390

91+
** Forms of Prior Art as Inspiration
92+
*** [[http://worrydream.com/refs/Nelson-ComputerLibDreamMachines1975.pdf#page=57][Xanadu Pattern ]]
3493

35-
** [[https://www.iwritewordsgood.com/apl/patterns/apl101.htm][Pattern Language]]
94+
Ted Nelson the granddaddy of hypertext media, need I say more. The introduction to [[https://cs.brown.edu/people/nmeyrowi/LiteraryMachinesChapter2.pdf#page=12][Literary Machines]] is instructive to delineating the problem boundaries for literature
3695

37-
Christopher Alexander's pattern language arranges a series of steps, in a certain way that allows the process of unfolding to proceed. The rules are ordered – sequenced – to unfold each part of the environment being created, smoothly and coherently [[https://www.livingneighborhoods.org/ht-0/morphogenesis-two.htm][enlarging the whole]].
96+
*** [[https://gwern.net/design][Design of Gwern.net]]
3897

39-
* Matter of Prior Art
40-
** [[http://www.shivkumar.org/music/Thiruppavai-04-AazhiMazhaiKanna-Varali.htm][Shivkumar's Archives]]
98+
Gwern has incorporated sidenotes instead of footnotes on wide windows, drop caps, smallcaps, collapsible sections, automatic inflation-adjusted currency, Wikipedia-style link icons & infoboxes, custom syntax highlighting, extensive local archives to fight linkrot (archive engine), and an ecosystem of “popup”/“popin” annotations & previews of links for frictionless browsing—the net effect of hierarchical structures with collapsing and instant popup access to excerpts enables iceberg-like pages where most information is hidden but the reader can easily drill down as deep as they wish.
4199

42-
Shivkumar Kalyanaraman has compiled and archived a wealth of song recordings, paired with word-by-word meanings
100+
*** [[https://edwardtufte.github.io/tufte-css/][Tufte.css]]
43101

44-
** [[https://shaivam.org/hindu-prayer-hub/detail/521][Shaivam]]
102+
Edward Tufte has developed a distinctive style in his works: simple, with well-set typography, extensive sidenotes, and elegant representations of graphs and charts
45103

46-
Built and maintained by devotees since 1996 a wealth of textual archives
104+
*** [[https://ctext.org/introduction][CText]]
47105

48-
** [[https://www.holy-bhagavad-gita.org/chapter/5/verse/8-9][Holy Bhagavad Gita]]
106+
Dr. Donald Sturgeon has compiled a great corpus of ancient (in particular pre-Qin and Han dynasty) Chinese texts in an organized and searchable format which has been composed through an parallel passage interface, word lists for semantic linking and ancient text database.
49107

50-
A tremendous effort by Jagadguru Kripaluji Trust
108+
*** [[https://www.iwritewordsgood.com/apl/patterns/apl101.htm][Pattern Language]]
109+
Christopher Alexander's pattern language arranges a series of steps, in a certain way that allows the process of unfolding to proceed. The rules are ordered – sequenced – to unfold each part of the environment being created, smoothly and coherently [[https://www.livingneighborhoods.org/ht-0/morphogenesis-two.htm][enlarging the whole]].

docker-compose.yml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
version: '3.8'
22

33
services:
4-
# postgres:
5-
# container_name: postgres_container
6-
# image: postgres
7-
# environment:
8-
# POSTGRES_USER: ${POSTGRES_USER:-postgres}
9-
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
10-
# PGDATA: /data/postgres
11-
# volumes:
12-
# - postgres:/data/postgres
13-
# healthcheck:
14-
# test: ["CMD-SHELL", "pg_isready -U postgres"]
15-
# interval: 10s
16-
# timeout: 5s
17-
# retries: 5
18-
# ports:
19-
# - "5432:5432"
20-
# networks:
21-
# - postgres
22-
# restart: unless-stopped
23-
24-
# pgadmin:
25-
# container_name: pgadmin_container
26-
# image: dpage/pgadmin4
27-
# environment:
28-
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
29-
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-root}
30-
# PGADMIN_CONFIG_SERVER_MODE: 'False'
31-
# volumes:
32-
# - pgadmin:/var/lib/pgadmin
4+
postgres:
5+
container_name: postgres_container
6+
image: postgres
7+
environment:
8+
POSTGRES_USER: ${POSTGRES_USER:-postgres}
9+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
10+
PGDATA: /data/postgres
11+
volumes:
12+
- postgres:/data/postgres
13+
healthcheck:
14+
test: ["CMD-SHELL", "pg_isready -U postgres"]
15+
interval: 10s
16+
timeout: 5s
17+
retries: 5
18+
ports:
19+
- "5432:5432"
20+
networks:
21+
- postgres
22+
restart: unless-stopped
3323

34-
# ports:
35-
# - "${PGADMIN_PORT:-5050}:80"
36-
# networks:
37-
# - postgres
38-
# restart: unless-stopped
24+
pgadmin:
25+
container_name: pgadmin_container
26+
image: dpage/pgadmin4
27+
environment:
28+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
29+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-root}
30+
PGADMIN_CONFIG_SERVER_MODE: 'False'
31+
volumes:
32+
- pgadmin:/var/lib/pgadmin
33+
ports:
34+
- "${PGADMIN_PORT:-5050}:80"
35+
networks:
36+
- postgres
37+
restart: unless-stopped
3938

4039
minio1:
4140
image: minio/minio:RELEASE.2022-05-08T23-50-31Z
@@ -53,9 +52,9 @@ services:
5352
timeout: 20s
5453
retries: 3
5554

56-
# networks:
57-
# postgres:
58-
# driver: bridge
55+
networks:
56+
postgres:
57+
driver: bridge
5958

6059
volumes:
6160
postgres:

0 commit comments

Comments
 (0)