Skip to content

Commit

Permalink
Documentation polish (#19)
Browse files Browse the repository at this point in the history
* Fix readme links

* Add space to demo prompt

* v0.3.1 release

* Remove white border from reprexlite favicon image

* Improve demo looping

Co-authored-by: Jay Qi <[email protected]>
  • Loading branch information
jayqi and jayqi authored Feb 27, 2021
1 parent e802431 commit 045e0db
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 28 deletions.
6 changes: 5 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# reprexlite Changelog

## v0.3.1 (2021-02-26)

- Documentation improvements. ([#14](https://github.com/jayqi/reprexlite/pull/14), [#19](https://github.com/jayqi/reprexlite/pull/19))

## v0.3.0 (2021-02-25)

- Updated pygments styling to use the "friendly" color scheme, which looks better for dark backgrounds. ([#15](https://github.com/jayqi/reprexlite/pull/17))
- Changed pygments styling to use the "friendly" color scheme, which looks better for dark backgrounds. ([#15](https://github.com/jayqi/reprexlite/pull/15))
- Changed submodule organization for code related to reprex formatting. This is now in the `formatting` submodule. ([#17](https://github.com/jayqi/reprexlite/pull/17))

## v0.2.0 (2021-02-20)
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean-dist:
rm -rf *.egg-info

demo-render:
terminalizer render docs/demo.yml -o docs/docs/images/demo.gif
terminalizer render docs/demo.yml -o docs/docs/images/demo.gif -q 100

docs:
echo "# CLI Help Documentation\n" > docs/docs/cli.md
Expand All @@ -20,8 +20,7 @@ docs:
@echo '```' >> docs/docs/cli.md
@reprex --help >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
cp README.md docs/docs/index.md
sed 's|docs/docs/images/demo.gif|images/demo.gif|g' README.md > docs/docs/index.md
sed 's|https://raw.githubusercontent.com/jayqi/reprexlite/main/docs/docs/images/demo.gif|images/demo.gif|g' README.md > docs/docs/index.md
cp HISTORY.md docs/docs/changelog.md
cd docs && mkdocs build

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

**reprexlite** is a tool for rendering **repr**oducible **ex**amples of Python code for sharing. With a convenient CLI and lightweight dependencies, you can quickly get it up and running in any virtual environment.

<img src="docs/docs/images/demo.gif" />
<img src="https://raw.githubusercontent.com/jayqi/reprexlite/main/docs/docs/images/demo.gif" />

- Paste or type some Python code that you're interested in sharing.
- reprexlite will execute that code in an isolated namespace. Any returned values or standard output will be captured and displayed as comments below their associated code.
Expand All @@ -23,7 +23,7 @@ list(zip(*grid))
#> [(1, 1, 2, 2, 3, 3), (8, 16, 8, 16, 8, 16)]
```

Writing a good reprex takes thought and effort (see ["Reprex Do's and Don'ts"](../dos-and-donts) for tips). The goal of reprexlite is to be a tool that seamlessly handles the mechanical stuff, so you can devote your full attention to the important, creative work of writing the content.
Writing a good reprex takes thought and effort (see ["Reprex Do's and Don'ts"](https://jayqi.github.io/reprexlite/dos-and-donts) for tips). The goal of reprexlite is to be a tool that seamlessly handles the mechanical stuff, so you can devote your full attention to the important, creative work of writing the content.

Reprex-style code formatting—namely, with outputs as comments—is also great for documentation. Users can copy and run with no modification. Consider using reprexlite when writing your documentation instead of copying code with `>>>` prompts from an interactive Python shell.

Expand Down
12 changes: 6 additions & 6 deletions docs/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ config:
# like `/bin/bash -l`, `ls`, or any other commands
# the default is bash for Linux
# or powershell.exe for Windows
command: bash -l
# command: bash -l

# Specify the current working directory path
# the default is the current working directory path
Expand Down Expand Up @@ -110,8 +110,8 @@ config:

# Records, feel free to edit them
records:
- delay: 1
content: "\e[1;36m~\e[0m via \e[1;33m\U0001F40D \e[0m\e[1;33m\e[0m\e[1;33mv3.9.0\e[0m\e[1;33m (\e[0m\e[1;33mdemo\e[0m\e[1;33m)\e[0m \r\nat \e[1;2;33m20:08:24\e[0m \e[1;32m❯\e[0m "
- delay: 0
content: "\e[1;36m~\e[0m via \e[1;33m\U0001F40D \e[0m\e[1;33m\e[0m\e[1;33mv3.9.0\e[0m\e[1;33m (\e[0m\e[1;33mdemo\e[0m\e[1;33m)\e[0m \r\nat \e[1;2;33m20:08:24\e[0m \e[1;32m❯\e[0m "
- delay: 2000
content: r
- delay: 100
Expand All @@ -136,9 +136,9 @@ records:
content: "\r\e(B\e[30;47mFile Name to Write:$ds0e.txt \r\e[17d^G\e(B\e[m Get Help\e[17;21H\e(B\e[30;47m^T\e(B\e[m To Files\e[17;41H\e(B\e[30;47mM-M\e(B\e[m Mac Format\e[61G\e(B\e[30;47mM-P\e(B\e[m Prepend\r\e[18d\e(B\e[30;47m^C\e(B\e[m Cancel\e[17G \e(B\e[30;47mM-D\e(B\e[m DOS Format\e[41G\e(B\e[30;47mM-A\e(B\e[m Append\e[18;61H\e(B\e[30;47mM-B\e(B\e[m Backup File\e[16;29H"
- delay: 1500
content: "\r\e[17d\e[39;49m\e(B\e[m\e[J\e[1;71H\e(B\e[30;47m \e[16;31H\e(B\e[m\e[1K \e(B\e[30;47m[ Wrote 6 lines ]\e(B\e[m\e[K\e[18;80H\e[18;1H\e[?1049l\r\e[?1l\e>"
- delay: 51
- delay: 50
content: "```python\r\nfrom itertools import product\r\n\r\ngrid = list(product([1, 2, 3], [8, 16]))\r\ngrid\r\n#> [(1, 8), (1, 16), (2, 8), (2, 16), (3, 8), (3, 16)]\r\nlist(zip(*grid))\r\n#> [(1, 1, 2, 2, 3, 3), (8, 16, 8, 16, 8, 16)]\r\n```\r\n\r\n<sup>Created at 2021-02-25 20:08:32 PST by [reprexlite](https://github.com/jayqi/reprexlite) v0.3.0</sup>\r\n\r\n"
- delay: 50
content: "\r\n\e[1;36m~\e[0m via \e[1;33m\U0001F40D \e[0m\e[1;33m\e[0m\e[1;33mv3.9.0\e[0m\e[1;33m (\e[0m\e[1;33mdemo\e[0m\e[1;33m)\e[0m took \e[1;33m6s\e[0m \r\nat \e[1;2;33m20:08:32\e[0m \e[1;32m❯\e[0m "
content: "\r\n\e[1;36m~\e[0m via \e[1;33m\U0001F40D \e[0m\e[1;33m\e[0m\e[1;33mv3.9.0\e[0m\e[1;33m (\e[0m\e[1;33mdemo\e[0m\e[1;33m)\e[0m took \e[1;33m6s\e[0m \r\nat \e[1;2;33m20:08:32\e[0m \e[1;32m❯\e[0m "
- delay: 8000
content: "\r\n"
content: " "
Binary file modified docs/docs/images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions docs/docs/images/reprexlite_white_blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ def load_requirements(path: Path):
"Source Code": "https://github.com/jayqi/reprexlite",
},
url="https://github.com/jayqi/reprexlite",
version="0.3.0",
version="0.3.1",
)

0 comments on commit 045e0db

Please sign in to comment.