Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #307

Merged
merged 3 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,26 @@ Visit [http://localhost:8080/](http://localhost:8080/), and paste this into the

# Simple fixes

add_field(hello,"world")
remove_field(my.deep.nested.junk)
copy_field(stats,output.$append)
add_field("hello", "world")
remove_field("my.deep.nested.junk")
copy_field("stats", "output.$append")

# Conditionals

if exists(error)
set_field(is_valid, no)
log(error)
elsif exists(warning)
set_field(is_valid, yes)
log(warning)
if exists("error")
set_field("is_valid", "no")
log("error")
elsif exists("warning")
set_field("is_valid", "yes")
log("warning")
else
set_field(is_valid, yes)
set_field("is_valid", "yes")
end

# Loops

do list(path)
add_field(foo,bar)
end

# Nested expressions

do marc_each()
if marc_has(f700)
marc_map(f700a,authors.$append)
end
do list(path: "foo", "var": "$i")
add_field("$i.bar", "baz")
end
```

Expand Down