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

Better output formatting & more facts #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Better output formatting & more facts #1

wants to merge 9 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 4, 2017

  • Added all Fact Sphere facts (from PortalWiki)
  • Provided routines for formatted output including quote bubble
  • Provided routines for configurable indentation
  • Removed bashisms

Patrick M. Jordan added 2 commits February 4, 2017 14:01
* Provided routines for formatted output including quote bubble
* Provided routines for configurable indentation
* Removed bashisms
* Added new Fact Sphere quote bubble and indentation
* Removed Bash-only language since it's new compatible with any Bourne-alike
@ghost
Copy link
Author

ghost commented Feb 4, 2017

Adjusted README.md with the new output style, and also to reflect the more general Bourne compatibility.

@ghost ghost closed this Feb 5, 2017
@ghost ghost reopened this Feb 5, 2017
Patrick M. Jordan added 4 commits February 5, 2017 11:22
* Add built-in configuration
* Finesse quote-bubble graphics
* Respect the CC license with attribution and a note about reformatting
* Use the new quote leader style in README.md
@nickavv
Copy link
Owner

nickavv commented Feb 14, 2017

I get the following explosion when trying to run this on my Mac:

xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
-n .

sort: invalid option -- R
Try `sort --help' for more information.
-n  `
xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
-n . ,
-n 
xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
-n '

-n 
xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
-n |/

-n 
xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
-n '

xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
sed: 1: "s/        /-n 
-n /g": unescaped newline inside substitute pattern

@ghost
Copy link
Author

ghost commented Feb 15, 2017

Still not sure how the newline is finding its way into the sed. Can you echo "INDENT_STRING: \"$INDENT_STRING\"" and see if the variable contains it? (FreeBSD didn't complain about this, and the output was correct.)

@nickavv
Copy link
Owner

nickavv commented Feb 15, 2017

INDENT_STRING=$(build_repeating_string ' ' $FACT_SPHERE_POS)

echo Indent_String: $INDENT_STRING thats it

produces:

Indent_String: -n -n thats it

The full output of the program now looks like:

---------------------------------------------------------------------n .

 | The likelihood of you dying within the next five minutes is        |
 | eighty-seven point six one percent.                                |
-n  `
-------------------------------------n . ,
-n 
------------------------------n '

-n 
                                      -n |/

-n 
                                      -n '

sed: 1: "s/        /-n 
         ...": unescaped newline inside substitute pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant