Compare commits
10 commits
0caec46b01
...
4589721d58
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4589721d58 | ||
![]() |
f4d9d7e4a6 | ||
![]() |
057568f42c | ||
![]() |
0232b09c81 | ||
![]() |
abdd7e6ef2 | ||
![]() |
d2fefdc84a | ||
![]() |
18d1dff009 | ||
![]() |
1fb56744df | ||
![]() |
98267f5841 | ||
![]() |
854f314b53 |
18 changed files with 193 additions and 71 deletions
README.md
assets/pics
brainmade-88x31-dark.pngcountable_union_of_countable_sets_is_countable.jpgsome_evenings_on_this_planet_are_worth_dying_for.jpg
build_exocortex.shcontent
blogs.orgcountable_union_of_countable_sets_is_countable.orggallery.orgindex.orglinks.orgnews.orgsome_evenings_on_this_planet_are_worth_dying_for.orgsource_code.org
copy-pics.shcopy_latex_images.shcreate-site.elcreate.shox-hugo-exocortex.el
48
README.md
48
README.md
|
@ -1,47 +1,13 @@
|
|||
# cosmicpirates.space
|
||||
# cosmicflow.space
|
||||
This is the source code of the cosmicflow website
|
||||
|
||||
## Quickstart
|
||||
Currently in the cosmicflow.space source can ge accessed on our private [Gitea](https://about.gitea.com/) server.
|
||||
|
||||
### Step 1 : SSH into the cosmicpirates server with forward tunnel of port 3000 to your local port 3000
|
||||
ssh into the server and forward the port on which Gitea is running(in our case port 3000) into our local port 3000
|
||||
## How it works
|
||||
There is a main script called [](./create.sh) just cd into the cloned repository, and run it, this runs all other scripts and generates the static stite in the [](./public) directory.
|
||||
|
||||
```console
|
||||
ssh -L 3000:localhost:3000 fluid@cosmicflow.space
|
||||
```
|
||||
### Step 2: Open Gitea on your Browser
|
||||
Open http://localhost:3000/ in your browser
|
||||
Create an account if nessasary(Not required if you just want to view but required if you want to push to a repo).
|
||||
You should be able to see this project repository at http://localhost:3000/dibyashanu/cosmicpirates.space
|
||||
|
||||
### Step 3: Clone the repo
|
||||
Make a local copy of this repo
|
||||
```console
|
||||
git clone http://localhost:3000/dibyashanu/cosmicpirates.space.git
|
||||
Ofcourse do not expect it to work as is. There are many things which have to be configured according to your needs, the purpose of this is to serve as template for you to build your sites, not to be used as is.
|
||||
``` console
|
||||
cd cosmicflow
|
||||
./create.sh
|
||||
```
|
||||
|
||||
Go to the repo directory
|
||||
```console
|
||||
cd cosmicpirates.space.
|
||||
```
|
||||
|
||||
Set a username and email - this will be used to track the changes you make to this repository
|
||||
```console
|
||||
git config user.name "Your Name Here"
|
||||
git config user.email "your@email.com"
|
||||
```
|
||||
|
||||
Set the origin to the required location
|
||||
|
||||
```console
|
||||
git remote add origin http://localhost:3000/dibyashanu/cosmicpirates.space.git
|
||||
```
|
||||
### Step 4: Make changes to the local version of the repository
|
||||
Most of the time try only to make changes to the [main.org](./main.org) and generate all other content by either running scripts in this file or runing org-babel-tangle(C-c C-v t in doom emacs).
|
||||
For more details see [main.org](./main.org)
|
||||
|
||||
### Step 5: Push Your changes to this repository
|
||||
```console
|
||||
$ git push -u origin main
|
||||
```
|
||||
|
|
BIN
assets/pics/brainmade-88x31-dark.png
Normal file
BIN
assets/pics/brainmade-88x31-dark.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 673 B |
Before ![]() (image error) Size: 30 KiB After ![]() (image error) Size: 30 KiB ![]() ![]() |
BIN
assets/pics/some_evenings_on_this_planet_are_worth_dying_for.jpg
Normal file
BIN
assets/pics/some_evenings_on_this_planet_are_worth_dying_for.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 2.5 MiB |
18
build_exocortex.sh
Executable file
18
build_exocortex.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#This script creates the exocortex
|
||||
|
||||
# start clean
|
||||
rm -rf ./public/exocortex-hugo-md/public/*
|
||||
rm -rf ./public/exocortex-hugo-md/content/
|
||||
|
||||
# create hugo md files using ox-hugo
|
||||
emacs -Q --batch -l ox-hugo-exocortex.el
|
||||
|
||||
# build create html files from hugo markdown files using quartz
|
||||
cd ./public/exocortex-hugo-md/
|
||||
npx quartz build
|
||||
cd ../../
|
||||
|
||||
# copy the generated folder to the main public site
|
||||
rsync -avi --delete ./public/exocortex-hugo-md/public/ ./public/cosmicflow-html/exocortex/
|
||||
|
||||
echo "exocortex created"
|
|
@ -18,5 +18,6 @@
|
|||
|--------------------------------------------------+------------------+------------------|
|
||||
| Title | Last Modified | Created |
|
||||
|--------------------------------------------------+------------------+------------------|
|
||||
| [[/some_evenings_on_this_planet_are_worth_dying_for][Some Evenings on this Planet are worth Dying for]] | [2025-01-27 Mon] | [2025-01-27 Mon] |
|
||||
| [[/countable_union_of_countable_sets_is_countable][A Countable Union of Countable Sets is Countable]] | [2024-12-06 Fri] | [2024-12-05 Thu] |
|
||||
| [[/test_blog][Test Blog]] | [2024-08-17 Sat] | [2024-08-17 Sat] |
|
||||
|
|
|
@ -59,7 +59,7 @@ In the modulo $k$ argument we have a constant gap between each consecutive eleme
|
|||
|
||||
The most simple way to increase the gap size in this way is to keep increasing it by one after each gap.
|
||||
|
||||
[[pics/Countable_union_of_Countable_sets.jpg][image]]
|
||||
[[pics/countable_union_of_countable_sets_is_countable.jpg][image 1]]
|
||||
|
||||
Look at the $0^{th}$ sequence we just get the [[https://en.wikipedia.org/wiki/Triangular_number][Triangular numbers]] and zero.
|
||||
|
||||
|
@ -168,7 +168,7 @@ Then
|
|||
|
||||
Since $S: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ is both injective and surjective, it is a bijection, we are done.
|
||||
|
||||
* An Interesting Applications
|
||||
* An Interesting Application
|
||||
*The set of finite subsets of $\mathbb{N}$ is countable.*
|
||||
Let $A_i$ be set of all subsets of $\mathbb{N}$ containing $i$ elements, that is with cardinality $i$.
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#+Title: Gallery
|
||||
|
||||
| [[/pics/sc_logo.png][Site Logo]] |
|
||||
|
||||
| [[/pics/some_evenings_on_this_planet_are_worth_dying_for.jpg][Evening 26 January 2025]] | [[/pics/sc_logo.png][Site Logo]] |
|
||||
|
|
|
@ -10,6 +10,7 @@ I'm currently a student, I love Physics, Mathematics, Astronomy and Computers.
|
|||
|--------------------------------------------------+------------------+------------------|
|
||||
| Title | Last Modified | Created |
|
||||
|--------------------------------------------------+------------------+------------------|
|
||||
| [[/some_evenings_on_this_planet_are_worth_dying_for][Some Evenings on this Planet are worth Dying for]] | [2025-01-27 Mon] | [2025-01-27 Mon] |
|
||||
| [[/countable_union_of_countable_sets_is_countable][A Countable Union of Countable Sets is Countable]] | [2024-12-06 Fri] | [2024-12-05 Thu] |
|
||||
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
#+TOC: headlines 1
|
||||
|
||||
* karthinks.com
|
||||
** Clearnet
|
||||
https://karthinks.com/
|
||||
* cosmicpirates.space
|
||||
** Clearnet
|
||||
https://cosmicpirates.space/
|
||||
|
|
|
@ -8,6 +8,19 @@
|
|||
: +--------------------------------------+
|
||||
#+end_center
|
||||
|
||||
* [[https://cosmicflow.space:3030/DibyashanuPati/cosmicflow][Source Code]] of this site is now available - [2025-03-02 Sun]
|
||||
I hope it will be useful to someone at some point.
|
||||
|
||||
* Planted the seeds to my [[../exocortex/][Thought Garden]] - [2025-02-11 Tue]
|
||||
I discovered [[https://quartz.jzhao.xyz/][Quartz]]
|
||||
|
||||
* [[https://about.gitea.com/][Gitea]] Service now up - [2025-01-23 Thu]
|
||||
Now hopefully I will be motivated enough to share the sauce
|
||||
tor - http://pohnq5z43ok3tefj6v3qx2zgn7zinpf4s55kztqxifa2poc3oirpe2id.onion/
|
||||
i2p b32 - http://hlkdr4g6ucqygxkcj36db5boao7bcfvhpoh6wbgqrvg7tcfwwcra.b32.i2p/
|
||||
i2p reg.i2p - http://git.cosmicflow.i2p
|
||||
clearweb - https://cosmicflow.space:3030
|
||||
|
||||
* Made site public on tor and i2p - [2024-08-18 Sun]
|
||||
Site is now accessible on tor at http://iqxuzzpkshz4vgnm3v5wx3u3tuhad2neylzbguz72iratsoz7ndqcuyd.onion/
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#+title: Some Evenings on this Planet are worth Dying for
|
||||
#+created: [2025-01-27 Mon]
|
||||
#+last_modified: <2025-01-27 Mon>
|
||||
#+author: Dibyashanu Pati
|
||||
#+OPTIONS: tex:dvipng
|
||||
|
||||
[[pics/some_evenings_on_this_planet_are_worth_dying_for.jpg][Evening 26 January 2025]]
|
||||
|
||||
*Some Evenings on this Planet are worth Dying for* - no matter how bleak things are otherwise, something shifts inside my brain when I see Venus peeking through the golden skies like this..
|
|
@ -1 +0,0 @@
|
|||
Coming Soon
|
19
copy-pics.sh
Executable file
19
copy-pics.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
# Set the source and destination directories
|
||||
src_dir="./public/cosmicflow-html"
|
||||
src_pics_dir="./assets/pics/"
|
||||
|
||||
# Loop through each subdirectory
|
||||
for dir in "$src_dir"/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
dir_name=$(basename "$dir")
|
||||
dst_pics_dir="${src_dir}/${dir_name}/pics"
|
||||
|
||||
# Create the destination subdirectory if it doesn't exist
|
||||
if [ ! -d "$dst_pics_dir" ]; then
|
||||
mkdir -p "$dst_pics_dir"
|
||||
fi
|
||||
|
||||
# Use rsync to copy files starting with the subdirectory name as prefix
|
||||
rsync -av --include="$dir_name*" --exclude="*" "${src_pics_dir}/" "${dst_pics_dir}/"
|
||||
fi
|
||||
done
|
28
copy_latex_images.sh
Executable file
28
copy_latex_images.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
## The purpose of this script is to copy all latex images to the appropriate subdirectories
|
||||
|
||||
|
||||
rsync -avi ./content/ltximg ./public/cosmicflow-html/
|
||||
|
||||
# Set the source and destination directories
|
||||
src_dir="./public/cosmicflow-html"
|
||||
src_ltximg_dir="./public/cosmicflow-html/ltximg"
|
||||
|
||||
# Loop through each subdirectory
|
||||
for dir in "$src_dir"/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
dir_name=$(basename "$dir")
|
||||
dst_ltximg_dir="${src_dir}/${dir_name}/ltximg"
|
||||
echo "$dir_name"
|
||||
# Create the destination subdirectory if it doesn't exist
|
||||
if [ ! -d "$dst_ltximg_dir" ]; then
|
||||
mkdir -p "$dst_ltximg_dir"
|
||||
fi
|
||||
|
||||
# Use rsync to copy files starting with the subdirectory name as prefix
|
||||
rsync -av --include="$dir_name*" --exclude="*" "${src_ltximg_dir}/" "${dst_ltximg_dir}/"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf ./public/cosmicflow-html/ltximg/ltximg
|
||||
|
||||
echo "Successfully copied latex images."
|
|
@ -28,8 +28,6 @@
|
|||
(package-install 'htmlize)
|
||||
(package-install 'ox-gemini)
|
||||
|
||||
|
||||
|
||||
;; Load the publishing system
|
||||
(require 'ox-publish)
|
||||
(use-package ox-gemini)
|
||||
|
@ -76,7 +74,9 @@
|
|||
(div (@ (class "container"))
|
||||
(nav (@ (class "nav"))
|
||||
(a (@ (class "nav-link") (href "/")) "Home") " "
|
||||
(a (@ (class "nav-link") (href "/exocortex/")) "Thought Garden") " "
|
||||
(a (@ (class "nav-link") (href "/blogs/")) "Blog") " "
|
||||
(a (@ (class "nav-link") (href "https://cosmicflow.space:3030/")) "Git") " "
|
||||
(a (@ (class "nav-link") (href "/about/")) "About") " "
|
||||
(a (@ (class "nav-link") (href "/contact/")) "PGP") " "
|
||||
(a (@ (class "nav-link") (href "/links/")) "Links") " "
|
||||
|
@ -93,15 +93,19 @@
|
|||
" · "
|
||||
(a (@ (href "/credits/")) "Credits")
|
||||
" · "
|
||||
(a (@ (href "/source_code/")) "Source Code")
|
||||
(a (@ (href "https://cosmicflow.space:3030/DibyashanuPati/cosmicflow")) "Source Code")
|
||||
;; " · "
|
||||
;; (a (@ (rel "me") (href "https://fosstodon.org/@daviwil")) "Fediverse"))
|
||||
(p "© 2024 Dibyashanu Pati - Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by/3.0/"
|
||||
(p "© 2024-2025 Dibyashanu Pati - Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by/3.0/"
|
||||
(img (@ (class "column align-left")
|
||||
(src "/pics/CCLogoColorPop1.gif")
|
||||
(style "width: 40px")
|
||||
(alt "Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by/3.0/")))
|
||||
)
|
||||
(alt "Creative Commons")))
|
||||
(img (@ (class "column align-left")
|
||||
(src "/pics/brainmade-88x31-dark.png")
|
||||
(style "width: 60px")
|
||||
(alt "brainmade.org")))
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
|
27
create.sh
27
create.sh
|
@ -1,28 +1,17 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# start with a clean slate
|
||||
rm -rf ./public/cosmicflow-html/
|
||||
# generate the html and gemini versions of the site using org-publish
|
||||
emacs -Q --batch -l create-site.el
|
||||
|
||||
rsync -avi ./content/ltximg ./public/cosmicflow-html/
|
||||
|
||||
# Set the source and destination directories
|
||||
src_dir="./public/cosmicflow-html"
|
||||
src_ltximg_dir="./public/cosmicflow-html/ltximg"
|
||||
# run script to copy the generated latex images to the appropiate subdirectories
|
||||
./copy_latex_images.sh
|
||||
|
||||
# Loop through each subdirectory
|
||||
for dir in "$src_dir"/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
dir_name=$(basename "$dir")
|
||||
dst_ltximg_dir="${src_dir}/${dir_name}/ltximg"
|
||||
# Generate the exocortex
|
||||
./build_exocortex.sh
|
||||
|
||||
# Create the destination subdirectory if it doesn't exist
|
||||
if [ ! -d "$dst_ltximg_dir" ]; then
|
||||
mkdir -p "$dst_ltximg_dir"
|
||||
fi
|
||||
# Copy relavent pics to blog subdirectories
|
||||
./copy-pics.sh
|
||||
|
||||
# Use rsync to copy files starting with the subdirectory name as prefix
|
||||
rsync -av --include="$dir_name*" --exclude="*" "${src_ltximg_dir}/" "${dst_ltximg_dir}/"
|
||||
fi
|
||||
done
|
||||
|
||||
# rm -rf ./content/ltximg/
|
||||
|
|
73
ox-hugo-exocortex.el
Normal file
73
ox-hugo-exocortex.el
Normal file
|
@ -0,0 +1,73 @@
|
|||
;; ox-hugo for exocortex notes
|
||||
|
||||
;; Set the package installation directory so that packages aren't stored in the
|
||||
;; ~/.emacs.d/elpa path.
|
||||
(require 'package)
|
||||
(setq package-user-dir (expand-file-name "./.packages"))
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("melpa-stable" . "https://stable.melpa.org/packages/")
|
||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
;; Initialize the package system
|
||||
(package-initialize)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
|
||||
;; Install use-package
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-install 'use-package))
|
||||
(require 'use-package)
|
||||
|
||||
|
||||
(use-package ox-hugo
|
||||
:ensure t ;Auto-install the package from Melpa
|
||||
:pin melpa ;`package-archives' should already have ("melpa" . "https://melpa.org/packages/")
|
||||
:after ox
|
||||
:config
|
||||
(setq org-hugo-base-dir "~/projects/cosmicflow.space/public/exocortex-hugo-md" )
|
||||
(setq org-hugo-default-section-directory "./")
|
||||
)
|
||||
(setq org-roam-directory "~/projects/thought_garden/")
|
||||
|
||||
;; modified this function from https://github.com/kaushalmodi/ox-hugo/discussions/585#discussioncomment-2335203
|
||||
(defun ox-hugo/export-all (&optional org-files-root-dir dont-recurse)
|
||||
"Export all Org files (including nested) under ORG-FILES-ROOT-DIR.
|
||||
|
||||
All valid post subtrees in all Org files are exported using
|
||||
`org-hugo-export-wim-to-md'.
|
||||
|
||||
If optional arg ORG-FILES-ROOT-DIR is nil, all Org files in
|
||||
current buffer's directory are exported.
|
||||
|
||||
If optional arg DONT-RECURSE is nil, all Org files in
|
||||
ORG-FILES-ROOT-DIR in all subdirectories are exported. Else, only
|
||||
the Org files directly present in the current directory are
|
||||
exported. If this function is called interactively with
|
||||
\\[universal-argument] prefix, DONT-RECURSE is set to non-nil.
|
||||
|
||||
Example usage in Emacs Lisp: (ox-hugo/export-all \"~/org\")."
|
||||
(interactive)
|
||||
(let* ((org-files-root-dir (or org-files-root-dir default-directory))
|
||||
(dont-recurse (or dont-recurse (and current-prefix-arg t)))
|
||||
(search-path (file-name-as-directory (expand-file-name org-files-root-dir)))
|
||||
(org-files (if dont-recurse
|
||||
(directory-files search-path :full "\.org$")
|
||||
(directory-files-recursively search-path "\.org$")))
|
||||
(num-files (length org-files))
|
||||
(cnt 1))
|
||||
(if (= 0 num-files)
|
||||
(message (format "No Org files found in %s" search-path))
|
||||
(progn
|
||||
(message (format (if dont-recurse
|
||||
"[ox-hugo/export-all] Exporting %d files from %S .."
|
||||
"[ox-hugo/export-all] Exporting %d files recursively from %S ..")
|
||||
num-files search-path))
|
||||
(dolist (org-file org-files)
|
||||
(with-current-buffer (find-file-noselect org-file)
|
||||
(message (format "[ox-hugo/export-all file %d/%d] Exporting %s" cnt num-files org-file))
|
||||
(org-hugo-export-wim-to-md :all-subtrees)
|
||||
(setq cnt (1+ cnt))))
|
||||
(message "Done!")))))
|
||||
(ox-hugo/export-all org-roam-directory)
|
||||
|
||||
(message "exocortex markdown created")
|
Loading…
Add table
Reference in a new issue