Skip to content

MNV/python-course-bibliography-generator

Repository files navigation

Bibliography Generator

Console application for creating a bibliography list.

The application allows you to automate the process of generating a bibliography list according to the specified citation standard.

Supported citation styles:

  • ГОСТ Р 7.0.5-2008

Installation

Clone the repository to your computer:

git clone https://github.com/mnv/python-course-bibliography-generator.git

Requirements:

Install the appropriate software:

  1. Docker Desktop.
  2. Git.
  3. PyCharm (optional).

Usage

  1. Copy the given template file into the input Excel file that will allow you to fill it without changing the original template:

    cp media/template.xlsx media/input.xlsx
  2. To configure the application copy .env.sample into .env file:

    cp .env.sample .env

    This file contains environment variables that will share their values across the application. The sample file (.env.sample) contains a set of variables with default values. So it can be configured depending on the environment.

  3. Build the container using Docker Compose:

    docker compose build

    This command should be run from the root directory where Dockerfile is located. You also need to build the docker container again in case if you have updated requirements.txt.

  4. To see the documentation for the console command run:

    docker compose run app python main.py --help
  5. Now it is possible to run the command inside the Docker container as usual, passing needed arguments to the console application:

    docker compose run app python main.py --citation gost --path_input /media/input.xlsx --path_output /media/output.docx

    Also, it is possible to omit the arguments to use their defaults:

    docker compose run app python main.py

Automation commands

The project contains a special Makefile that provides shortcuts for a set of commands:

  1. Build the Docker container:

    make build
  2. Generate Sphinx documentation run:

    make docs-html
  3. Autoformat source code:

    make format
  4. Static analysis (linters):

    make lint
  5. Autotests:

    make test

    The test coverage report will be located at src/htmlcov/index.html. So you can estimate the quality of automated test coverage.

  6. Run autoformat, linters and tests in one command:

    make all

Run these commands from the source directory where Makefile is located.

Documentation

The project integrated with the Sphinx documentation engine. It allows the creation of documentation from source code. So the source code should contain docstrings in reStructuredText format.

To create HTML documentation run this command from the source directory where Makefile is located:

make docs-html

After generation documentation can be opened from a file docs/build/html/index.html.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Console application for creating a bibliography list.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published