3 Commits

4 changed files with 17 additions and 28 deletions

View File

@@ -1,13 +0,0 @@
kind: pipeline
name: default
steps:
- name: Publish
image: plugins/pypi
settings:
username:
from_secret: pypi_username
password:
from_secret: pypi_password
when:
event: tag

View File

@@ -1,7 +1,5 @@
# Bopytex # Bopytex
[![Build Status](https://drone.opytex.org/api/badges/lafrite/Bopytex/status.svg)](https://drone.opytex.org/lafrite/Bopytex)
Bopytex is a command line tool for producing random math exercises with their correction. It embeds [mapytex](https://git.opytex.org/lafrite/Mapytex) and [python](python.org) into [latex](latex-project.org) through [jinja](jinja.pocoo.org). Bopytex is a command line tool for producing random math exercises with their correction. It embeds [mapytex](https://git.opytex.org/lafrite/Mapytex) and [python](python.org) into [latex](latex-project.org) through [jinja](jinja.pocoo.org).
## Installing ## Installing

View File

@@ -11,8 +11,8 @@ import logging
from pathlib import Path from pathlib import Path
import pytex import pytex
#from mapytex import Expression, Integer, Decimal, random_list from mapytex import Expression, Integer, Decimal, Polynomial, render
import mapytex import sympy
import bopytex.filters as filters import bopytex.filters as filters
formatter = logging.Formatter("%(name)s :: %(levelname)s :: %(message)s") formatter = logging.Formatter("%(name)s :: %(levelname)s :: %(message)s")
@@ -25,16 +25,20 @@ logger.addHandler(steam_handler)
def setup(): def setup():
mapytex.Expression.set_render("tex") render.set_render("tex")
logger.debug(f"Render for Expression is {mapytex.Expression.RENDER}") logger.debug(f"Render for Expression is {render.render}")
mapytex_tools = { mapytex_tools = {
"Expression": mapytex.Expression, "Expression": Expression,
"Integer": mapytex.Integer, "Integer": Integer,
"Decimal": mapytex.Decimal, "Decimal": Decimal,
"random_list": mapytex.random_list, "Polynom": Polynomial,
"random_pythagore": mapytex.random_pythagore, "sympy": sympy,
"Dataset": mapytex.Dataset, # "Fraction": mapytex.Fraction,
"WeightedDataset": mapytex.WeightedDataset, # "Equation": mapytex.Equation,
# "random_str": mapytex.random_str,
# "random_pythagore": mapytex.random_pythagore,
# "Dataset": mapytex.Dataset,
# "WeightedDataset": mapytex.WeightedDataset,
} }
pytex.update_export_dict(mapytex_tools) pytex.update_export_dict(mapytex_tools)
@@ -155,7 +159,7 @@ def crazy_feed(*args, **kwrds):
def clean(directory): def clean(directory):
pytex.clean(directory) pytex.clean(directory, ["*.aux", "*.log", "*.out", "*.xsim", "*.tkzfonct.*"])
def texcompile(filename): def texcompile(filename):

View File

@@ -5,7 +5,7 @@ from setuptools import setup
setup( setup(
name='Bopytex', name='Bopytex',
version='0.2', version='0.1.2',
description='Command line tool for compiling latex with python command embedded', description='Command line tool for compiling latex with python command embedded',
author='Benjamin Bertrand', author='Benjamin Bertrand',
author_email='programming@opytex.org', author_email='programming@opytex.org',