aoc-to-markdown 0.2.3
Parses Advent Of Code problem statement to markdown with option to also download the input while keeping everything organised
License: MIT
Requires Python: >=3.*

##########################
Advent Of Code to Markdown
##########################

|downloads| |pypi| |python-version|

Parses `Advent Of Code <https://adventofcode.com/>`_ problem statement to markdown with option to also download the input while keeping everything organised.


***********
 Features
***********

1. Parses the problem statement to Markdown.

2. Easily organize your solutions with the input and a markdown description.

3. Boilerplate can be copied next to the input and the problem statement.

4. You can execute this script for the same day as many times as you want and feel confident that the boilerplate will not change what you have done so far.


***************
 Organisation
***************

Each day goes inside a folder with the syntax ``day-<day>`` as you can check below.

::

  |____day-01
  | |____README.md
  | |____input.txt
  |____day-02
  | |____README.md
  | |____input.txt
  ...
  |____day-15
  | |____README.md
  | |____input.txt
  |____day-16
  | |____README.md
  | |____input.txt
  ...
  |____day-24
  | |____README.md
  | |____input.txt
  |____day-25
  | |____README.md
  | |____input.txt


This was generated by executing ``aoc-to-markdown -i -s``  25 times. Additional arguments could have been provided to copy a directory/file inside the folder (useful to set up everything for you to solve). You can also specify the output directory (where the folders will be created), but, in this example, this was also not given.


***************
 Installation
***************

If you want to install directly from this repository, then install the dependencies and you are good to go:

.. code:: bash

  pip install -r requirements.txt

  python aoc_to_markdown.py -h

If you want even simpler, then download from `PyPi <https://pypi.org/project/aoc-to-markdown/>`_ and you are good to go:

.. code:: bash

  pip install aoc-to-markdown

  aoc_to_markdown -h


************
 Arguments
************

::

  Usage: aoc-to-markdown [-h] [-y <year>] [-d <day>] [-o <output_dir>] [-b <boilerplate_dir>] [-s] [-i]
   -h, --help          Optional parameter to print this message
   -y, --year          Optional parameter to indicate the year of the problem
   -d, --day           Optional parameter to indicate the day of the problem
   -o, --output        Optional parameter to indicate the path of the output (default = ".")
   -b, --boilerplate   Optional parameter to copy a directory/file to the output
   -s, --save          Optional argument to indicate that the markdown should not be printed to stdout, but to a file
   -i, --input         Optional argument to indicate that the input is to be downloaded and saved to a file
  
  SESSION_ID environment flag is required to download part 2 of the problem. This session id can be copied from the requests made on the Advent Of Code website after you login.

  Extended description:
  --year, if not given, defaults to the current year if in december; otherwise is the current year
  --day, if not given, defaults to the first day which has not been retrieved (checks for directories named "day-<day>"); if all days have been retrieved, then go drink some hot chocolate and enjoy the rest of the day
  --output is the prefix path where the folder (syntax: "day-<day>") will be created
  --boilerplate is an argument useful to copy the solution boilerplate to help you get started
  --save is only necessary if you want to save directly to a file and --output is not given
  
  Example:
  aoc-to-markdown -y 2018 -d 1 -o my-solution-directory -b my-boilerplate -i


**********
 Similar
**********

- There is `another project in JavaScript <https://github.com/kfarnung/aoc-to-markdown>`_ that also parses the problem statement to Markdown.


.. |downloads| image:: https://pepy.tech/badge/aoc-to-markdown
               :alt: Total number of downloads
               :target: https://pepy.tech/project/aoc-to-markdown
.. |pypi| image:: https://img.shields.io/pypi/v/aoc-to-markdown?color=blue
          :alt: PyPI
          :target: https://pypi.org/project/aoc-to-markdown/
.. |python-version| image:: https://img.shields.io/pypi/pyversions/aoc-to-markdown
                    :alt: PyPI - Python Version
                    :target: https://pypi.org/project/aoc-to-markdown/