Skip to content

Commit 06c8eb0

Browse files
committed
update readme
1 parent 14724c4 commit 06c8eb0

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

README.rst

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,30 @@ Advent of Code data
1919
.. _codecov: https://codecov.io/gh/wimglenn/advent-of-code-data
2020

2121

22-
Get your puzzle data with a single import statement:
22+
Speedhackers, get your puzzle data with a single import statement:
2323

2424
.. code-block:: python
2525
2626
from aocd import data
2727
28-
Might be useful for lazy Pythonistas and speedhackers.
29-
30-
If you'd just like to print or keep your own input files, there's a shell entry point for that:
31-
32-
.. code-block:: bash
33-
34-
aocd > input.txt # saves today's data
35-
aocd 13 2018 > day13.txt # save some other day's data
36-
37-
If all that sounds too magical, there is a simple getter function to just return your raw data.
28+
If that sounds too magical, use a simple function call to return your data in a string:
3829

3930
.. code-block:: python
4031
4132
>>> from aocd import get_data
4233
>>> get_data(day=24, year=2015)
4334
'1\n2\n3\n7\n11\n13\n17\n19\n23\n31...
4435
36+
If you'd just like to print or keep your own raw input files, there's a script for that:
37+
38+
.. code-block:: bash
39+
40+
aocd > input.txt # saves today's data
41+
aocd 13 2018 > day13.txt # save some other day's data
42+
4543
Note that ``aocd`` will cache puzzle inputs and answers (including incorrect guesses) clientside, to save unnecessary requests to the server.
4644

47-
*New in version 2.0.0:* Get the sample data (and corresponding answers). For example, from `2022 day 5 <https://adventofcode.com/2022/day/5>`_ there was:
45+
*New in version 2.0.0:* Get the example data (and corresponding answers). From `2022 day 5 <https://adventofcode.com/2022/day/5>`_ there was:
4846

4947
.. code-block:: bash
5048
@@ -66,7 +64,7 @@ Note that ``aocd`` will cache puzzle inputs and answers (including incorrect gue
6664
answer_b: MCD
6765
--------------------------------------------------------------------------------
6866
69-
How does it work? Check `aocd-example-parser <https://github.com/wimglenn/aocd-example-parser>`_ for the gory details.
67+
How does scraping the examples work? Check `aocd-example-parser <https://github.com/wimglenn/aocd-example-parser>`_ for the gory details.
7068

7169

7270
Quickstart
@@ -113,6 +111,7 @@ If this utility script was able to locate your token, you can save it to file wi
113111
114112
$ aocd-token > ~/.config/aocd/token
115113
114+
116115
Automated submission
117116
--------------------
118117

@@ -140,17 +139,18 @@ the right answer, then the puzzle will be refreshed in your web browser
140139
get rate-limited by Eric, so don't call submit until you're fairly confident
141140
you have a correct answer!
142141

143-
*New in version 2.0.0*: Prevents submission of answers when it is certain the value
144-
is incorrect. For example, if the server told you that your answer "1234" was too
145-
high, then aocd will remember this info and prevent you from subsequently submitting
146-
an even higher value such as "1300".
142+
*New in version 2.0.0*: Prevent submission of an answer when it is certain the value
143+
is incorrect. For example, if the server previously told you that your answer "1234"
144+
was too high, then aocd will remember this info and prevent you from subsequently
145+
submitting an even higher value such as "1300".
147146

148147

149-
OOP-style interfaces
150-
--------------------
148+
Models
149+
------
151150

152151
*New in version 0.8.0.*
153152

153+
There are classes ``User`` and ``Puzzle`` found in the submodule ``aocd.models``.
154154
Input data is via regular attribute access. Example usage:
155155

156156
.. code-block:: python
@@ -180,7 +180,6 @@ Your own solutions can be executed by writing and using an `entry-point <https:/
180180
>>> puzzle.solve_for("wim")
181181
('XLZAKBGZ', '10656')
182182
183-
184183
If you've never written a plugin before, see https://entrypoints.readthedocs.io/ for more info about plugin systems based on Python entry-points.
185184
186185
@@ -231,7 +230,7 @@ instead and have a nice day!
231230
Cache invalidation?
232231
-------------------
233232

234-
``aocd`` saves puzzle inputs, answers, names, and your bad guesses to avoid hitting
233+
``aocd`` saves puzzle inputs, answers, prose, and your bad guesses to avoid hitting
235234
the AoC servers any more often than strictly necessary (this also speeds things up).
236235
All data is persisted in plain text files under ``~/.config/aocd``. To remove any
237236
caches, you may simply delete whatever files you want under that directory tree.

0 commit comments

Comments
 (0)