...
 
Commits (5)
......@@ -13,7 +13,7 @@ Configuration requise
=====================
* Ordinateur Mac avec OS X 10.7 ou ultérieur.
* Ordinateur Mac avec OS X 10.10 ou ultérieur.
* Une distribution LaTeX (nous vous conseillons ***MacTeX*** disponible sur *http://www.tug.org/mactex/*,
télécharger «MacTeX.pkg» puis procéder à l’installation).
......
......@@ -4,11 +4,11 @@
:category: telecharger
:description: Liens vers la version 10.01
* |debian| `Pyromaths pour Linux - deb <https://enligne.pyromaths.org/static/downloads/pyromaths_10.01_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://enligne.pyromaths.org/static/downloads/pyromaths-10.01-2.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://enligne.pyromaths.org/static/downloads/pyromaths-10.01-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://enligne.pyromaths.org/static/downloads/pyromaths-10.01-win32.exe>`_
* |sources| `Sources de Pyromaths <https://enligne.pyromaths.org/static/downloads/pyromaths-10.01-sources.tar.bz2>`_
* |debian| `Pyromaths pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths_10.01_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-10.01-2.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://www.pyromaths.org/downloads/pyromaths-10.01-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://www.pyromaths.org/downloads/pyromaths-10.01-win32.exe>`_
* |sources| `Sources de Pyromaths <https://www.pyromaths.org/downloads/pyromaths-10.01-sources.tar.bz2>`_
.. |debian| image:: images/debian.png
:alt: Debian Linux
......
......@@ -5,11 +5,11 @@
:link:
:description: Liens vers la version 18.6.2
* |debian| `Pyromaths pour Linux - deb <https://enligne.pyromaths.org/downloads/pyromaths_18.6.2-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://enligne.pyromaths.org/downloads/pyromaths-18.6.2-1.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://enligne.pyromaths.org/downloads/pyromaths-18.6.2-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://enligne.pyromaths.org/downloads/pyromaths-18.6.2-win32.exe>`_
* |sources| `Sources de Pyromaths <https://enligne.pyromaths.org/downloads/pyromaths-18.6.2-sources.tar.bz2>`_
* |debian| `Pyromaths pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths_18.6.2-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-18.6.2-1.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://www.pyromaths.org/downloads/pyromaths-18.6.2-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://www.pyromaths.org/downloads/pyromaths-18.6.2-win32.exe>`_
* |sources| `Sources de Pyromaths <https://www.pyromaths.org/downloads/pyromaths-18.6.2-sources.tar.bz2>`_
.. |debian| image:: images/debian.png
:alt: Debian Linux
......
......@@ -4,11 +4,11 @@
:category: telecharger
:description: Liens vers la version 18.6.3
* |debian| `Pyromaths pour Linux - deb <https://enligne.pyromaths.org/downloads/pyromaths_18.6.3-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://enligne.pyromaths.org/downloads/pyromaths-18.6.3-1.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://enligne.pyromaths.org/downloads/pyromaths-18.6.3-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://enligne.pyromaths.org/downloads/pyromaths-18.6.3-win32.exe>`_
* |sources| `Sources de Pyromaths <https://enligne.pyromaths.org/downloads/pyromaths-18.6.3-sources.tar.bz2>`_
* |debian| `Pyromaths pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths_18.6.3-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-18.6.3-1.noarch.rpm>`_
* |macos| `Pyromaths pour Mac OS X <https://www.pyromaths.org/downloads/pyromaths-18.6.3-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://www.pyromaths.org/downloads/pyromaths-18.6.3-win32.exe>`_
* |sources| `Sources de Pyromaths <https://www.pyromaths.org/downloads/pyromaths-18.6.3-sources.tar.bz2>`_
.. |debian| image:: images/debian.png
:alt: Debian Linux
......
:title: Version 18.7
:slug: version-18-7
:date: 2018-07-11
:category: telecharger
:description: Liens vers la version 18.7
* |debian| Pyromaths pour Linux - deb : *pas encore disponible…*
* |redhat| Pyromaths pour Linux - rpm : *pas encore disponible…*
* |macos| Pyromaths pour Mac OS X : *pas encore disponible…*
* |windows| Pyromaths pour Windows : *pas encore disponible…*
* |python| Paquets Python :
* en ligne de commande : `source <https://files.pythonhosted.org/packages/e5/5c/8a72bae1f1939464de22c42ab66655a1ff5e4ddeaad93a4024a50b8374b1/pyromaths-18.7.tar.gz>`_, `wheel <https://files.pythonhosted.org/packages/5c/48/60d250e908c6a638e9fce5be9b63c59e10fd5ff60d800fc554ec8c5f28a6/pyromaths-18.7-py3-none-any.whl>`_.
* avec interface graphique QT : *pas encore disponible…*
.. |debian| image:: images/debian.png
:alt: Debian Linux
.. |redhat| image:: images/redhat.png
:alt: RedHat Linux
.. |macos| image:: images/macosx.png
:alt: Mac OS X
.. |windows| image:: images/winvista.png
:alt: Windows
.. |python| image:: images/source.png
:alt: Python
Nouveautés de cette version :
=============================
Cette version ne propose aucun exercice nouveau, mais propose de nombreuses améliorations dans la structure interne du code. Elles ne sont pas visibles pour l'utilisateur final, mais devraient faciliter le travail des auteurs, et le développement de nouveaux exercices.
:title: Version 18.9.1
:slug: version-18-9-1
:date: 2018-09-03 16:04
:category: telecharger
:description: Liens vers la version 18.9.1
* |debian| `Pyromaths pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths_18.9.1-1_all.deb>`_ et `Pyromaths-qt pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths-qt_18.9.3-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-18.9.1-1.noarch.rpm>`_ et `Pyromaths-qt pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-qt-18.9.3-1.noarch.rpm>`_
* |macos| Bientôt disponibe
* |windows| `Pyromaths pour Windows <https://www.pyromaths.org/downloads/Pyromaths-QT_18.9.2.exe>`_
* |sources| `Sources de Pyromaths <https://pypi.org/project/pyromaths/>`_
.. |debian| image:: images/debian.png
:alt: Debian Linux
.. |redhat| image:: images/redhat.png
:alt: RedHat Linux
.. |macos| image:: images/macosx.png
:alt: Mac OS X
.. |windows| image:: images/winvista.png
:alt: Windows
.. |sources| image:: images/source.png
:alt: Sources
Nouveautés de cette version :
=============================
Cette version ne propose aucun exercice nouveau, mais propose de nombreuses améliorations dans la structure interne du code. Elles ne sont pas visibles pour l'utilisateur final, mais devraient faciliter le travail des auteurs, et le développement de nouveaux exercices.
* Séparation de pyromaths en deux projets : pyromaths (client en ligne de commande) et client QT.
* Passage à Python3 (et nombreux changements dans l'API interne, qui n'est pas rétro-compatible).
* Tags
- Possibilité d'ajouter des tags à des exercices
- Le niveau d'un exercice n'est plus défini par une chaîne, mais par une liste de tags (un exercice peut donc avoir plusieurs niveaux).
* Binaire, et sous commandes.
- Pyromaths peut être appelé comme un module python3 : `python3 -m pyromaths`.
- `ls` :
+ Ajout des options \\-\\-tags et \\-\\-desc, pour filtrer les exercices.
- `tags` :
+ Création d'une commande `pyromaths tags` permettant d'afficher la liste de tous les tags.
- `generate` :
+ Ajout d'une option \\-\\-format, permettant de choisir le format de sortie (LaTeX, pdf, latexmkrc).
* Exercices
- InterpolationMatrices : Correction du choix des coefficients (ils étaint parfois égaux à 0, ce qui provoquait des écritures comme $f(x)=0x²+2x+0$ ; ils peuvent maintenant être décimaux (c'était normalement déjà possible, mais un bug interdisait ce cas).
:title: Version 18.9.2
:slug: version-18-9-2
:date: 2018-09-04 22:57
:category: telecharger
:description: Liens vers la version 18.9.2
* |debian| `Pyromaths pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths_18.9.2-1_all.deb>`_ et `Pyromaths-qt pour Linux - deb <https://www.pyromaths.org/downloads/pyromaths-qt_18.9.3-1_all.deb>`_
* |redhat| `Pyromaths pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-18.9.2-1.noarch.rpm>`_ et `Pyromaths-qt pour Linux - rpm <https://www.pyromaths.org/downloads/pyromaths-qt-18.9.3-1.noarch.rpm>`_
* |macos| `Pyromaths pour Mac Os X <https://www.pyromaths.org/downloads/pyromaths-18.9.3-macos.dmg>`_
* |windows| `Pyromaths pour Windows <https://www.pyromaths.org/downloads/Pyromaths-QT_18.9.2.exe>`_
* |sources| `Sources de Pyromaths <https://pypi.org/project/pyromaths/>`_
.. |debian| image:: images/debian.png
:alt: Debian Linux
.. |redhat| image:: images/redhat.png
:alt: RedHat Linux
.. |macos| image:: images/macosx.png
:alt: Mac OS X
.. |windows| image:: images/winvista.png
:alt: Windows
.. |sources| image:: images/source.png
:alt: Sources
Nouveautés de cette version :
=============================
* Bugfix : exercice « Opérations » en 6e.
# -*- coding: utf-8 -*-
'''
Sitemap
-------
The sitemap plugin generates plain-text or XML sitemaps.
'''
from __future__ import unicode_literals
import re
import collections
import os.path
from datetime import datetime
from logging import warning, info
from codecs import open
from pytz import timezone
from pelican import signals, contents
from pelican.utils import get_date
TXT_HEADER = """{0}/index.html
{0}/archives.html
{0}/tags.html
{0}/categories.html
"""
XML_HEADER = """<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
"""
XML_URL = """
<url>
<loc>{0}/{1}</loc>
<lastmod>{2}</lastmod>
<changefreq>{3}</changefreq>
<priority>{4}</priority>
</url>
"""
XML_FOOTER = """
</urlset>
"""
def format_date(date):
if date.tzinfo:
tz = date.strftime('%z')
tz = tz[:-2] + ':' + tz[-2:]
else:
tz = "-00:00"
return date.strftime("%Y-%m-%dT%H:%M:%S") + tz
class SitemapGenerator(object):
def __init__(self, context, settings, path, theme, output_path, *null):
self.output_path = output_path
self.context = context
self.now = datetime.now()
self.siteurl = settings.get('SITEURL')
self.default_timezone = settings.get('TIMEZONE', 'UTC')
self.timezone = getattr(self, 'timezone', self.default_timezone)
self.timezone = timezone(self.timezone)
self.format = 'xml'
self.changefreqs = {
'articles': 'monthly',
'indexes': 'daily',
'pages': 'monthly'
}
self.priorities = {
'articles': 0.5,
'indexes': 0.5,
'pages': 0.5
}
self.sitemapExclude = []
config = settings.get('SITEMAP', {})
if not isinstance(config, dict):
warning("sitemap plugin: the SITEMAP setting must be a dict")
else:
fmt = config.get('format')
pris = config.get('priorities')
chfreqs = config.get('changefreqs')
self.sitemapExclude = config.get('exclude', [])
if fmt not in ('xml', 'txt'):
warning("sitemap plugin: SITEMAP['format'] must be `txt' or `xml'")
warning("sitemap plugin: Setting SITEMAP['format'] on `xml'")
elif fmt == 'txt':
self.format = fmt
return
valid_keys = ('articles', 'indexes', 'pages')
valid_chfreqs = ('always', 'hourly', 'daily', 'weekly', 'monthly',
'yearly', 'never')
if isinstance(pris, dict):
# We use items for Py3k compat. .iteritems() otherwise
for k, v in pris.items():
if k in valid_keys and not isinstance(v, (int, float)):
default = self.priorities[k]
warning("sitemap plugin: priorities must be numbers")
warning("sitemap plugin: setting SITEMAP['priorities']"
"['{0}'] on {1}".format(k, default))
pris[k] = default
self.priorities.update(pris)
elif pris is not None:
warning("sitemap plugin: SITEMAP['priorities'] must be a dict")
warning("sitemap plugin: using the default values")
if isinstance(chfreqs, dict):
# .items() for py3k compat.
for k, v in chfreqs.items():
if k in valid_keys and v not in valid_chfreqs:
default = self.changefreqs[k]
warning("sitemap plugin: invalid changefreq `{0}'".format(v))
warning("sitemap plugin: setting SITEMAP['changefreqs']"
"['{0}'] on '{1}'".format(k, default))
chfreqs[k] = default
self.changefreqs.update(chfreqs)
elif chfreqs is not None:
warning("sitemap plugin: SITEMAP['changefreqs'] must be a dict")
warning("sitemap plugin: using the default values")
def write_url(self, page, fd):
if getattr(page, 'status', 'published') != 'published':
return
if getattr(page, 'private', 'False') == 'True':
return
# We can disable categories/authors/etc by using False instead of ''
if not page.save_as:
return
page_path = os.path.join(self.output_path, page.save_as)
if not os.path.exists(page_path):
return
lastdate = getattr(page, 'date', self.now)
try:
lastdate = self.get_date_modified(page, lastdate)
except ValueError:
warning("sitemap plugin: " + page.save_as + " has invalid modification date,")
warning("sitemap plugin: using date value as lastmod.")
lastmod = format_date(lastdate)
if isinstance(page, contents.Article):
pri = self.priorities['articles']
chfreq = self.changefreqs['articles']
elif isinstance(page, contents.Page):
pri = self.priorities['pages']
chfreq = self.changefreqs['pages']
else:
pri = self.priorities['indexes']
chfreq = self.changefreqs['indexes']
pageurl = '' if page.url == 'index.html' else page.url
#Exclude URLs from the sitemap:
if self.format == 'xml':
flag = False
for regstr in self.sitemapExclude:
if re.match(regstr, pageurl):
flag = True
break
if not flag:
fd.write(XML_URL.format(self.siteurl, pageurl, lastmod, chfreq, pri))
else:
fd.write(self.siteurl + '/' + pageurl + '\n')
def get_date_modified(self, page, default):
if hasattr(page, 'modified'):
if isinstance(page.modified, datetime):
return page.modified
return get_date(page.modified)
else:
return default
def set_url_wrappers_modification_date(self, wrappers):
for (wrapper, articles) in wrappers:
lastmod = datetime.min.replace(tzinfo=self.timezone)
for article in articles:
lastmod = max(lastmod, article.date.replace(tzinfo=self.timezone))
try:
modified = self.get_date_modified(article, datetime.min).replace(tzinfo=self.timezone)
lastmod = max(lastmod, modified)
except ValueError:
# Supressed: user will be notified.
pass
setattr(wrapper, 'modified', str(lastmod))
def generate_output(self, writer):
path = os.path.join(self.output_path, 'sitemap.{0}'.format(self.format))
pages = self.context['pages'] + self.context['articles'] \
+ [ c for (c, a) in self.context['categories']] \
+ [ t for (t, a) in self.context['tags']] \
+ [ a for (a, b) in self.context['authors']]
self.set_url_wrappers_modification_date(self.context['categories'])
self.set_url_wrappers_modification_date(self.context['tags'])
self.set_url_wrappers_modification_date(self.context['authors'])
for article in self.context['articles']:
pages += article.translations
info('writing {0}'.format(path))
with open(path, 'w', encoding='utf-8') as fd:
if self.format == 'xml':
fd.write(XML_HEADER)
else:
fd.write(TXT_HEADER.format(self.siteurl))
FakePage = collections.namedtuple('FakePage',
['status',
'date',
'url',
'save_as'])
for standard_page_url in ['index.html',
'archives.html',
'tags.html',
'categories.html']:
fake = FakePage(status='published',
date=self.now,
url=standard_page_url,
save_as=standard_page_url)
self.write_url(fake, fd)
# add template pages
# We use items for Py3k compat. .iteritems() otherwise
for path, template_page_url in self.context['TEMPLATE_PAGES'].items():
# don't add duplicate entry for index page
if template_page_url == 'index.html':
continue
fake = FakePage(status='published',
date=self.now,
url=template_page_url,
save_as=template_page_url)
self.write_url(fake, fd)
for page in pages:
self.write_url(page, fd)
if self.format == 'xml':
fd.write(XML_FOOTER)
def get_generators(generators):
return SitemapGenerator
def register():
signals.get_generators.connect(get_generators)
......@@ -58,4 +58,13 @@ PYGMENTS_RST_OPTIONS = {'linenos': 'table'}
THEME='theme'
THEME_STATIC_DIR = 'theme'
THEME_STATIC_PATHS = ['static']
CSS_FILE = 'style.css'
\ No newline at end of file
CSS_FILE = 'style.css'
PLUGIN_PATHS = ['pelican-plugins']
PLUGINS = ['sitemap' ]
SITEMAP = {
'format': 'xml',
'exclude': ['tags.html', 'categories.html', 'tag/', 'author'],
}
......@@ -649,7 +649,7 @@ p.desc {
* PYROMATHS EN LIGNE
**********************************/
.ui-tabs-panel {
background: url(/static/img/degrade.png) no-repeat;
background: url(../../images/degrade.png) no-repeat;
width:611px;
}
table.tabs {
......@@ -680,7 +680,7 @@ table.tabs td{
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav a{
background: url(/static/img/tabs.png) no-repeat -652px 0;
background: url(../../images/tabs.png) no-repeat -652px 0;
display:block;
height: 30px;
line-height:30px;
......@@ -721,3 +721,28 @@ form#idForm select{
color: #666;
background-color: #f8f3d2;
}
/* Start by setting display:none to make this hidden.
Then we position it in relation to the viewport window
with position:fixed. Width, height, top and left speak
for themselves. Background we set to 80% white with
our animation centered, and no-repeating */
.modal {
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba( 255, 255, 255, .8 )
url('../../images/loading.gif')
50% 50%
no-repeat;
}
body.loading {
overflow: hidden;
}
body.loading .modal {
display: block;
}