Pass "path" option value as positional in examples.
This commit is contained in:
@ -2,7 +2,7 @@ import bonobo
|
|||||||
from bonobo.commands.run import get_default_services
|
from bonobo.commands.run import get_default_services
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.CsvReader(path='datasets/coffeeshops.txt'),
|
bonobo.CsvReader('datasets/coffeeshops.txt'),
|
||||||
print,
|
print,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ def get_fields(row):
|
|||||||
|
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.JsonReader(path='datasets/theaters.json'),
|
bonobo.JsonReader('datasets/theaters.json'),
|
||||||
get_fields,
|
get_fields,
|
||||||
bonobo.PrettyPrint(title_keys=('eq_nom_equipement', )),
|
bonobo.PrettyPrint(title_keys=('eq_nom_equipement', )),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -8,7 +8,7 @@ def skip_comments(line):
|
|||||||
|
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.FileReader(path='datasets/passwd.txt'),
|
bonobo.FileReader('datasets/passwd.txt'),
|
||||||
skip_comments,
|
skip_comments,
|
||||||
lambda s: s.split(':'),
|
lambda s: s.split(':'),
|
||||||
lambda l: l[0],
|
lambda l: l[0],
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import bonobo
|
import bonobo
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.FileReader(path='coffeeshops.txt'),
|
bonobo.FileReader('coffeeshops.txt'),
|
||||||
print,
|
print,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -6,9 +6,9 @@ def split_one(line):
|
|||||||
|
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.FileReader(path='coffeeshops.txt'),
|
bonobo.FileReader('coffeeshops.txt'),
|
||||||
split_one,
|
split_one,
|
||||||
bonobo.JsonWriter(path='coffeeshops.json'),
|
bonobo.JsonWriter('coffeeshops.json'),
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@ -16,9 +16,9 @@ class MyJsonWriter(bonobo.JsonWriter):
|
|||||||
|
|
||||||
|
|
||||||
graph = bonobo.Graph(
|
graph = bonobo.Graph(
|
||||||
bonobo.FileReader(path='coffeeshops.txt'),
|
bonobo.FileReader('coffeeshops.txt'),
|
||||||
split_one_to_map,
|
split_one_to_map,
|
||||||
MyJsonWriter(path='coffeeshops.json'),
|
MyJsonWriter('coffeeshops.json'),
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user