Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander K committed Jan 13, 2024
1 parent 1828534 commit 3ad579e
Show file tree
Hide file tree
Showing 21 changed files with 392 additions and 73 deletions.
126 changes: 126 additions & 0 deletions 6BS.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
require_relative 'bs/all'
BS.will_generate if __FILE__ == $0

draw_squares = -> {
at = [
Pos[0, 0],
Pos[0, 6],
Pos[0, 12],
Pos[6, 0],
Pos[6, 6],
Pos[6, 12],
]
$bs.color 8 do
at.each { |pos|
sq = Square.sized(pos.x, pos.y, 6)
$bs.poly *sq.points.map { |x| g.at *x }
}
end
}
draw_dots_in_square = -> pos {
5.times { |x|
5.times { |y|
$bs.dot Pos[pos.x + x + 1, pos.y + y + 1]
}
}
}
draw_squares_dotted = -> {
draw_squares.call
all_squares = [
Point[6, 0],
Point[0, 6],
Point[6, 12],
Point[0, 0],
Point[6, 6],
Point[0, 12],
]
all_squares.each { |pos|
draw_dots_in_square.call pos
}
}
draw_squares_chess = -> {
draw_squares.call

lines = 5.times.map { |i|
[Pos[0, i+1], Pos[6, i+1]]
} + 5.times.map { |i|
[Pos[i+1, 0], Pos[i+1, 6]]
}
squares = [
Point[6, 0],
Point[0, 6],
Point[6, 12],
]
$bs.color 8 do
squares.each { |pos|
lines.each { |points|
$bs.poly *points.map { |x| x + pos }.map { |x| g.at *x }
}
}
end
other_squares = [
Point[0, 0],
Point[6, 6],
Point[0, 12],
]
other_squares.each { |pos|
draw_dots_in_square.call pos
}
}

path = File.join __dir__, 'output'
BS.setup name: '6BS', path: path, description: <<END
Six Big Squares.
Quite versatile in potential.
Right items have checklist flavour.
---
UI patterns:
- RM user should have toolbar closed
- file-scoped notes are above the grid
- items can be found outside the grid at sides
- item-scoped corner notes are in the upper-right corner of the grid
- pagination is not UI-interactive, only page turning is meant
END
BS.grid 18

BS.page :root do
draw_dots
end

is_left = -> page { page[:item_pos].x == -1 }
BS::Items.generate left: 18, right: 3 do
if is_left[page]
page.tag = :left_item
draw_squares_dotted.call
else
BS::Pagination.generate page do
page.tag = :right_item
draw_squares_chess.call
end
end
end

a = $bs.g.tr
corners = []
corners << a
corners << a.down(6)
corners << a.down(12)
corners << a.left(6)
corners << a.down(6).left(6)
corners << a.down(12).left(6)

left_items = BS.pages.xs(:item).select &is_left
left_items.each { |page|
corners.each { |corner|
BS::CornerNotes.generate page, corner: corner do
draw_dots
end
}
}

BS::TopNotes.generate do
draw_stars
end

BS::Items.integrate
BS::TopNotes.integrate
4 changes: 3 additions & 1 deletion ABS.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@

is_left = -> page { page[:item_pos].x == -1 }

BS::Items.generate left: 18, right: 18 do
BS::Items.generate left: 18, right: 3 do
if is_left[page]
page.tag = :left_item
BS::Pagination.generate page do
instance_eval &draw_grid
end
else
page.tag = :right_item
instance_eval &draw_grid
end
end
Expand Down
3 changes: 2 additions & 1 deletion BS2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

BS.pages.xs(:item).each { |parent|
BS::Items[:item2].generate parent: parent, right: 18 do
page.tag = :subitem
instance_eval &draw_grid
end
}
Expand All @@ -36,7 +37,7 @@
end

BS::Items.integrate
BS::Items[:item2].integrate BS.pages.drop(1).to_sa, stick: [
BS::Items[:item2].integrate BS.pages.reject { |x| x[:type] == :root || x[:type] == :top_note }.to_sa, stick: [
:item_pos
]
BS::TopNotes.integrate
11 changes: 8 additions & 3 deletions BSE.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require_relative 'bs/all'
BS.will_generate if __FILE__ == $0

year = 2024
month = 1

# - do I stick corner-notes on week change?
# - double-run day pagination?
# - contour is noisy so no point now in it (file with algorithm I'll keep)

year = 2024
month = 1

path = File.join __dir__, 'output'
BS.setup name: 'BSE', path: path, description: <<END
Blank Slate Exec PDF.
Expand Down Expand Up @@ -37,18 +38,22 @@
month = BS::Month.new.setup year: year, month: month, parent: BS.page(:root)

BS::Items.generate left: month.week_squares.count do
page.tag = :week
BS::Items[:subitem].generate parent: page, right: 18, include_parent: true do
page.tag = :week_aspect if page.tag == :subitem
instance_eval &draw_grid
end
end

month.generate do
BS::Pagination.generate page do
page.tag = :day_note
instance_eval &draw_grid
end
end

BS::CornerNotes.generate BS.pages.xs(:item) do
page.tag = :week_note
instance_eval &draw_grid
end

Expand Down
78 changes: 48 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,70 @@
# Project
# What

Abstract exploration within the constraints of the PDF format on RM device.
Utterly abstract PDFs for use on RM device.

- it started as simplistic setup that allows generation of any interactive pdfs to be filled by the user
- then enough patterns crystallized so it became more incremental and modular technically
# Why

# Usage
The idea is to explore possibilities for abstract but useful PDFs without introducing arbitrary constraints or decisions.
So in fact no use is possible without first deciding on how the PDF is going to be used.

UX is not optimized for a random first-time user so UX is as exploratory as the project itself.
# Where

RM toolbar is assumed to be closed and navigation controls mostly take space around the grid.
[Downloads](https://github.com/sowcow/blank_slate_pdf/releases)

Other details about specific pdf files can be read in their metadata or in corresponding files such as `ABS.rb`
# ABS: Abstract BS

[Downloads](https://github.com/sowcow/blank_slate_pdf/releases)
The obvious use is to have any list items at the left of the page.
Each item having 12 consecutive pages inside.

# Technical Usage
RM toolbar is closed to not cover the links.
Right items are experimental.
Top links are for notes not scoped by any item.

- download and extract needed fonts as expected by `bs/fonts.rb`.
- have ruby installed and run `bundle` in the root
- either run `ruby all.rb` or specific files like `ruby ABS.rb` to generate pdfs
![Structure overview](output/ABS_STARS.png?raw=true)

# BSE: BS Exec

A PDF per month. 12 pages per day notes.
12 pages per week notes.
18 week views per week to cover different aspects.

![Structure overview](output/BSE.png?raw=true)

# NBS: Nova BS

# BSv4
Every item is a place for a graph where every node has own 12 pages.

Current composition:
![Structure overview](output/NBS.png?raw=true)

- ABS - abstract
- BSE - time, monthly
- NBS - spatial, graphs
- BS2 - abstract two levels deep, diagram legend use is an option
# BS2: two levels deep BS

Items have subitems.

![Structure overview](output/BS2.png?raw=true)

# 6BS: Six Big Squares

Latest and experimental.

![Structure overview](output/6BS.png?raw=true)

# Usage Assumptions

- not using layers or tags or toolbar at all
- still manual copying of pages content is easy (daily dashboard thing is not needed)
- still some rare navigation could be done with grid view (file-scoped notes space I assume)
- generally I don't use layers or tags or toolbar
- still manual copying of pages content is easy (so pre-made daily dashboard thing is not needed)
- still some rare navigation could be done with RM grid view (file-scoped notes space I assume)

# Future
# Technical Usage

- checklists are there already?
- titles, abstract titles, geometry
- download and extract needed fonts as expected by `bs/fonts.rb`.
- have ruby installed and run `bundle` in the root
- either run `ruby all.rb` or specific files like `ruby ABS.rb` to generate pdfs

# Other
# Other Notes

- org-mode early inspiration
- short names potenital .g .g16? .d?
- more abstractions around numbers..areas
- dots and lines collisions
- non-BS refactoring
- it started as simplistic setup that allows generation of any interactive pdfs to be filled by the user
- then enough patterns crystallized so it became more incremental and modular technically
- fundamental abstractions may or may not get a look into

## [DAFUQPL](https://github.com/dafuqpl/dafuqpl) License
47 changes: 27 additions & 20 deletions all.rb
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
$name = 'ABS_SAND'
$draw_grid = -> _ { draw_dots }
load './ABS.rb'
BS.generate
[true, false].each { |x|
$just_overview = x

$name = 'ABS_WAVES'
$draw_grid = -> _ { draw_lines }
load './ABS.rb'
BS.generate
$name = 'ABS_SAND'
$draw_grid = -> _ { draw_dots }
load './ABS.rb'
BS.generate

$name = 'ABS_STARS'
$draw_grid = -> _ { draw_stars }
load './ABS.rb'
BS.generate
$name = 'ABS_WAVES'
$draw_grid = -> _ { draw_lines }
load './ABS.rb'
BS.generate

$name = nil
$draw_grid = nil
$name = 'ABS_STARS'
$draw_grid = -> _ { draw_stars }
load './ABS.rb'
BS.generate

load './NBS.rb'
BS.generate
$name = nil
$draw_grid = nil

load './BS2.rb'
BS.generate
load './NBS.rb'
BS.generate

load './BSE.rb'
BS.generate
load './BS2.rb'
BS.generate

load './BSE.rb'
BS.generate

load './6BS.rb'
BS.generate
}

0 comments on commit 3ad579e

Please sign in to comment.