Browse Source

Adjusted path in examples.

master
Gijs 3 years ago
parent
commit
1581a2fa79
  1. 4
      asciiWriter/examples/image_random_char.py
  2. 4
      asciiWriter/examples/image_rotate.py
  3. 5
      asciiWriter/examples/image_sentence.py
  4. 4
      asciiWriter/examples/multi_column_page.py
  5. 4
      asciiWriter/examples/single_column_page.py

4
asciiWriter/examples/image_random_char.py

@ -4,11 +4,13 @@ from asciiWriter.patterns import image
from asciiWriter.utils import make_lines, visit, print_lines
from asciiWriter.marks import random, single
from os.path import join, dirname
width = 75
height = 75
# Where to find the image
image_path = 'images/blobs-small.png'
image_path = join(dirname(__file__), 'data', 'blobs-small.png')
# Construct the pattern
image_pattern = image(image_path)
# Set the marker, in this case it makes a random selection from

4
asciiWriter/examples/image_rotate.py

@ -10,11 +10,13 @@ from asciiWriter.patterns import image
from asciiWriter.utils import make_lines, visit, print_lines, rotate
from asciiWriter.marks import sentence, single
from os.path import join, dirname
width = 75
height = 75
# Where to find the image
image_path = 'images/blobs-small.png'
image_path = join(dirname(__file__), 'data', 'blobs-small.png')
# Construct the pattern
image_pattern = image(image_path)
# Set the marker, in this case a sentence

5
asciiWriter/examples/image_sentence.py

@ -9,12 +9,13 @@ from asciiWriter.patterns import image
from asciiWriter.utils import make_lines, visit, print_lines
from asciiWriter.marks import sentence, space
from os.path import join, dirname
width = 75
height = 75
# Where to find the image
image_path = 'images/blobs-small.png'
image_path = 'images/shapes.png'
image_path = join(dirname(__file__), 'data', 'shapes.png')
# Construct the pattern
image_pattern = image(image_path)
# Set the marker, in this case a sentence

4
asciiWriter/examples/multi_column_page.py

@ -4,12 +4,14 @@ from asciiWriter.text import make_column, make_multi_column
from asciiWriter.utils import merge, print_lines, make_lines, translate
import math
from os.path import join, dirname
# Define width and height of the output
width = 125
height = 27
# Import a text
text = open('texts/about.txt').read()
text = open(join(dirname(__file__), 'data', 'language.txt')).read()
# Make an empty layers list
layers = []

4
asciiWriter/examples/single_column_page.py

@ -5,12 +5,14 @@ from asciiWriter.utils import merge, print_lines, make_lines, translate
from hyphen import Hyphenator
import math
from os.path import join, dirname
# Define width and height of the output
width = 100
height = 500
# Import a text
text = open('texts/language.txt').read()
text = open(join(dirname(__file__), 'data', 'language.txt')).read()
# Import a hyphenator
h_en = Hyphenator('en_US')

Loading…
Cancel
Save