Add :setcookie, grabbing cookie from file #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I'm that guy you were talking to yesterday, I did some other changes to my cookie from file code, so if the system can't get the AoC cookie automatically with
os.Getenv("AOC_TOKEN")
when running:setday
, it grabs from a filecookie.txt
instead.When using
:setday
and the cookie file doesn't exist, it creates an empty file to prevent reading errors (there may be a better way to do this though)To use
:setcookie
the user needs to get the AoC cookie using the guide wimglenn/advent-of-code-wim#1 and type:setcookie <cookievalue>
, the being everything betweensession=
and the first;
on that string::setcookie 53616c2457214f5fd61f09acd05afad5e48ace27ae4917cfd0863c706cd508be236b52e3d2f4e2f90a252cb
(not a real cookie, just an example)