Adjusted path in examples.
This commit is contained in:
parent
ba5d0d87b1
commit
1581a2fa79
@ -4,11 +4,13 @@ from asciiWriter.patterns import image
|
|||||||
from asciiWriter.utils import make_lines, visit, print_lines
|
from asciiWriter.utils import make_lines, visit, print_lines
|
||||||
from asciiWriter.marks import random, single
|
from asciiWriter.marks import random, single
|
||||||
|
|
||||||
|
from os.path import join, dirname
|
||||||
|
|
||||||
width = 75
|
width = 75
|
||||||
height = 75
|
height = 75
|
||||||
|
|
||||||
# Where to find the image
|
# Where to find the image
|
||||||
image_path = 'images/blobs-small.png'
|
image_path = join(dirname(__file__), 'data', 'blobs-small.png')
|
||||||
# Construct the pattern
|
# Construct the pattern
|
||||||
image_pattern = image(image_path)
|
image_pattern = image(image_path)
|
||||||
# Set the marker, in this case it makes a random selection from
|
# Set the marker, in this case it makes a random selection from
|
||||||
|
@ -10,11 +10,13 @@ from asciiWriter.patterns import image
|
|||||||
from asciiWriter.utils import make_lines, visit, print_lines, rotate
|
from asciiWriter.utils import make_lines, visit, print_lines, rotate
|
||||||
from asciiWriter.marks import sentence, single
|
from asciiWriter.marks import sentence, single
|
||||||
|
|
||||||
|
from os.path import join, dirname
|
||||||
|
|
||||||
width = 75
|
width = 75
|
||||||
height = 75
|
height = 75
|
||||||
|
|
||||||
# Where to find the image
|
# Where to find the image
|
||||||
image_path = 'images/blobs-small.png'
|
image_path = join(dirname(__file__), 'data', 'blobs-small.png')
|
||||||
# Construct the pattern
|
# Construct the pattern
|
||||||
image_pattern = image(image_path)
|
image_pattern = image(image_path)
|
||||||
# Set the marker, in this case a sentence
|
# Set the marker, in this case a sentence
|
||||||
|
@ -9,12 +9,13 @@ from asciiWriter.patterns import image
|
|||||||
from asciiWriter.utils import make_lines, visit, print_lines
|
from asciiWriter.utils import make_lines, visit, print_lines
|
||||||
from asciiWriter.marks import sentence, space
|
from asciiWriter.marks import sentence, space
|
||||||
|
|
||||||
|
from os.path import join, dirname
|
||||||
|
|
||||||
width = 75
|
width = 75
|
||||||
height = 75
|
height = 75
|
||||||
|
|
||||||
# Where to find the image
|
# Where to find the image
|
||||||
image_path = 'images/blobs-small.png'
|
image_path = join(dirname(__file__), 'data', 'shapes.png')
|
||||||
image_path = 'images/shapes.png'
|
|
||||||
# Construct the pattern
|
# Construct the pattern
|
||||||
image_pattern = image(image_path)
|
image_pattern = image(image_path)
|
||||||
# Set the marker, in this case a sentence
|
# Set the marker, in this case a sentence
|
||||||
|
@ -4,12 +4,14 @@ from asciiWriter.text import make_column, make_multi_column
|
|||||||
from asciiWriter.utils import merge, print_lines, make_lines, translate
|
from asciiWriter.utils import merge, print_lines, make_lines, translate
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
from os.path import join, dirname
|
||||||
|
|
||||||
# Define width and height of the output
|
# Define width and height of the output
|
||||||
width = 125
|
width = 125
|
||||||
height = 27
|
height = 27
|
||||||
|
|
||||||
# Import a text
|
# Import a text
|
||||||
text = open('texts/about.txt').read()
|
text = open(join(dirname(__file__), 'data', 'language.txt')).read()
|
||||||
|
|
||||||
# Make an empty layers list
|
# Make an empty layers list
|
||||||
layers = []
|
layers = []
|
||||||
|
@ -5,12 +5,14 @@ from asciiWriter.utils import merge, print_lines, make_lines, translate
|
|||||||
from hyphen import Hyphenator
|
from hyphen import Hyphenator
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
from os.path import join, dirname
|
||||||
|
|
||||||
# Define width and height of the output
|
# Define width and height of the output
|
||||||
width = 100
|
width = 100
|
||||||
height = 500
|
height = 500
|
||||||
|
|
||||||
# Import a text
|
# Import a text
|
||||||
text = open('texts/language.txt').read()
|
text = open(join(dirname(__file__), 'data', 'language.txt')).read()
|
||||||
|
|
||||||
# Import a hyphenator
|
# Import a hyphenator
|
||||||
h_en = Hyphenator('en_US')
|
h_en = Hyphenator('en_US')
|
||||||
|
Loading…
Reference in New Issue
Block a user