In src/main/kotlin
you will find all source code used by this framework. This source code is organized in folders.
archives
Framework code that is used to handle archives. You are not expected to write your own archive code.examples
Example code that demonstrates how to use OPENRNDR and this project.skeletons
Skeleton code, these could work as a starting point for your own poster generator.tools
Image and text tools provided by this framework
An archive is a collection of texts and accompanying images. This framework provides a number of ways to work with archives.
Local archive is an archive that lives on your local filesystem. An example archive is provided in the
archives/example-poetry
folder. When opening that folder you will see three sub-folders (001
, 002
and 003
).
Each sub-folder contains text and image media. You can have multiple images and multiple .txt files.
To try a local archive run the LocalArchiveSkeleton
program.
To create a new archive create a folder under archives
, for example archives/my-archive
. Copy the file src/main/kotlin/skeletons/LocalArchiveSkeleton.kt
to src/main/kotlin/work/Skeleton01.kt
.
In Skeleton01.kt
change the following code from:
val archive = localArchive("archives/example-poetry").iterator()
into:
val archive = localArchive("archives/my-archive").iterator()
A Reddit archive is a dynamic archive for which text and images are retrieved from the Reddit website.
To try a Reddit based archive run the RedditSkeleton.kt
program.
To change the Reddit one can edit the "r/pics"
part below:
val posts = runBlocking {
reddit.getCommunityNewPosts("r/pics")
}
A DuckDuckGo based archive uses DuckDuckGo's image to retrieve text and images from an image search.
To try a DuckDuckGo based archive run the src/main/kotlin/skeletons/DuckDuckGoSkeleton.kt
program.
The search query can be changed here:
val archive = duckDuckGoSequence("Goofy Pluto").iterator()
In src/main/kotlin/examples
you will find two folders; openrndr
and framework
. The openrndr
folder contains
small examples that demonstrate OPENRNDR features. The framework
folder contains examples that demonstrates examples
inside a program that is derived from LocalArchiveSkeleton.kt
. It is recommended to study the framework
examples as
they contain valuable hints for building poster generators.
- Animation001 - animating a circle whenever a new article is loaded
- Animation002 - fading in images and text whenever a new article is loaded
- Animation003 - animating post filter settings
- ImageContext001 - demonstration of image statistics
- ImageTreatment001 - demonstration of image treatments
- ImageTreatment002 - demonstration of image treatments
- Mask001 - Masking an image layer with text
- Mask002 - Masking an image layer with text, combining blurred and sharp images
- Type001 - Demonstrating type placement
- TypeTreatment001 - demonstration of type treatments