90 Commits
0.1 ... master

Author SHA1 Message Date
Gregory Soutade
27bd360abe Add output language support 2022-10-08 16:08:02 +02:00
Gregory Soutade
c5744585c7 Fix an error in markdown2.py transformation, : character doesn't need to be encoded when converting an URL 2022-10-08 16:07:41 +02:00
Gregory Soutade
2bd6f8ae21 Update site for w3c standards 2022-09-18 17:22:57 +02:00
Gregory Soutade
0d5d5ce535 Fix errors with Python3 2022-09-18 17:22:17 +02:00
Gregory Soutade
4ece9e9079 Force iframe end tag </iframe> to be wrote (optimized by xml parser) 2022-09-18 17:04:15 +02:00
Gregory Soutade
1b0c92e45a Many fixes (encoding/Python3) 2022-06-19 10:12:51 +02:00
Gregory Soutade
fa98b0b0e0 Update blog templates 2022-06-19 10:12:14 +02:00
Gregory Soutade
96e12bce83 Update blog templates 2022-06-19 10:11:35 +02:00
Gregory Soutade
b7fb9738a1 Update blog.soutade.fr 2020-04-06 10:32:09 +02:00
Gregory Soutade
1805967833 Update post/_createPost to not simply append post content, but replace dyn:post node 2020-04-06 10:31:28 +02:00
Gregory Soutade
10347ec588 Don't remove Drafts in blog view
Add a check for robots directly using search form
2020-03-20 16:56:02 +01:00
Gregory Soutade
7cb4f1d3d7 Update Markdown parser from 2.1.1 to 2.3.2 2020-03-20 16:55:45 +01:00
Gregory Soutade
4b642fa48a Fix some bugs:
* Don't use cached objects if file has been removed
	* Replace subblock node with all of this nodes instead of appending them at the end of parent (respect order)
	* Disable Post cache cause it generates some random errors
	* Don't forget to update cur page number, even if Post creation has failed
2020-03-20 16:55:23 +01:00
Gregory Soutade
f99bea97ef Update blog theme 2020-03-20 16:48:52 +01:00
Gregory Soutade
e029a1fc35 Also checks for 'email' field to be present 2016-06-13 07:37:53 +02:00
Gregory Soutade
05c92a1738 Update version and ChangeLog 2016-06-05 09:19:02 +02:00
Gregory Soutade
7b93925d00 Some robots doesn't set referer when they try to add comment 2016-06-05 09:13:46 +02:00
Gregory Soutade
7fff2dbd2d Update README and ChangeLog 2016-05-22 10:29:42 +02:00
Gregory Soutade
3caae2dee2 Add fail2ban filter 2016-05-22 10:28:58 +02:00
Gregory Soutade
8bf132976d Read posts with unicode instead binary 2016-03-19 17:03:43 +01:00
Gregory Soutade
97176ed454 Add mardown include syntax in templates 2016-01-17 15:14:25 +01:00
Gregory Soutade
e0b8f544ff Fix HTML article inclusion
Fix draft inclusion in preview
Enhance cache post content (avoid recomputing md5sum if present)
Add generation duration time
Add post only generation (for Dev)
Remove Draft when it becomes Post
Update blog Copyright
Update TinyMCE plugins for inclusion
Sort tags by name
2016-01-09 20:10:27 +01:00
Gregory Soutade
9b49bf9114 Add autofocus to login page 2015-11-08 14:53:30 +01:00
Gregory Soutade
f6816ce9ff TEMPLATE_DIRS must now be a tuple 2015-09-29 08:16:17 +02:00
Gregory Soutade
cde08b8cfa Add article inclusion (Mardown only) 2015-09-21 19:07:39 +02:00
Gregory Soutade
dd6739461b Update to Django 1.8 + various changes 2015-09-21 19:05:25 +02:00
Gregory Soutade
47f5f97618 Redirect user to comment when it's added and not to begining of page
Always update	modification date when post/draft is saved
Update version
2015-08-09 15:33:19 +02:00
Gregory Soutade
0b871656b5 Don't crash if pygments is not installed 2015-08-08 17:17:15 +02:00
Gregory Soutade
a20936c7f7 Update LJDC 2015-07-08 07:40:36 +02:00
Gregory Soutade
b440ba1464 Update LJDC and add 2014 archives 2015-01-06 17:52:04 +01:00
Gregory Soutade
d1b86ba7cd Forgot last year in archive generation 2015-01-06 17:50:59 +01:00
Gregory Soutade
62ed52d797 Fix bugs:
* Can't create categories and tags
	* Recursively create directories
2014-11-13 19:25:02 +01:00
Gregory Soutade
7aa99e0cbe Do things in a more python way 2014-09-24 20:27:27 +02:00
Gregory Soutade
5e1007e7da Display comments number on all type of index (category, tag, archive...) 2014-09-24 20:26:03 +02:00
Gregory Soutade
c0318ae208 Displays drafts in reverse order 2014-07-22 20:58:34 +02:00
Gregory Soutade
cce16e031a Add .gitignore 2014-07-22 20:56:18 +02:00
Gregory Soutade
c53f48846d Update ljdc.perl 2014-07-22 20:53:44 +02:00
Gregory Soutade
951dcc47f7 Add Markdown "code" help 2014-07-22 20:53:11 +02:00
Gregory Soutade
694b7f5f89 Update blog.soutade.fr 2014-07-22 20:51:12 +02:00
Gregory Soutade
33103cff74 Update ChangeLog 2014-06-09 11:47:38 +02:00
Gregory Soutade
0b347c2f16 Add dyn:category_name 2014-06-09 11:46:25 +02:00
Gregory Soutade
eb283280f1 Update ChangeLog 2014-06-05 19:57:11 +02:00
Gregory Soutade
361be87cb2 Add dyn:comments_count 2014-06-05 19:56:47 +02:00
Gregory Soutade
193b439517 Fix regression : replace hook accidentally removed from index generator 2014-06-05 19:22:13 +02:00
Gregory Soutade
01a070745e Update ChangeLog 2014-06-01 18:59:18 +02:00
Gregory Soutade
0741709259 Add dyn:first_page_only
Add dyn:ljdc_last
2014-06-01 18:58:13 +02:00
Gregory Soutade
a747417ad2 Forgot edit_draft template 2014-06-01 11:35:26 +02:00
Gregory Soutade
c8401c6ea1 Update ChangeLog 2014-06-01 11:30:13 +02:00
Gregory Soutade
8485fa662e Fix a bug : post set to non published were not removed during re generation 2014-06-01 11:28:47 +02:00
Gregory Soutade
ddf267e9ca Add FileOutputCache to avoid disk reading generated posts if not necessary
Always write post on edit (don't try to hash)
2014-06-01 11:28:24 +02:00
Gregory Soutade
798b5e1f92 Update version in dynastie template 2014-05-27 21:54:55 +02:00
Gregory Soutade
03f646b7fa Add Draft support 2014-05-27 18:24:14 +02:00
Gregory Soutade
c468ea92b0 Add inline image in Markdown syntax
Change default font for my blog
2014-05-19 18:20:25 +02:00
Gregory Soutade
86d2b83ed9 Update ChangeLog and ljdc.xml 2014-04-27 19:13:09 +02:00
Gregory Soutade
2dccf89408 Update Changelog 2014-03-27 18:29:42 +01:00
Gregory Soutade
d8a24e210f Add ljdc (les joies du code) generator 2014-03-27 18:29:06 +01:00
Gregory Soutade
577acbd9f5 Add underline command in markdown 2014-03-27 18:25:36 +01:00
Gregory Soutade
4bd583f92f Allows multiple block for a template 2014-03-27 18:24:58 +01:00
Gregory Soutade
814fd6c667 Add internal post search to Dynastie 2014-03-18 20:30:17 +01:00
Gregory Soutade
f7a3e3f9c9 Add a favicon 2014-03-16 19:36:39 +01:00
Gregory Soutade
726d247632 Strip comments
Insert link to comment when it's referenced with #comment_number
2014-03-16 18:55:50 +01:00
Gregory Soutade
22b8c96fe3 Update README 2014-02-02 15:09:34 +01:00
0d05f8346b Do a cleaner package.
Add an Apache sample configuration file
Update README with better installation instructions
2014-02-02 14:21:16 +01:00
Gregory Soutade
ef03d87799 Add manage.py to package 2014-02-02 08:53:08 +01:00
Gregory Soutade
dde64f9219 Fix some stupid mistakes in previous commit 2014-02-01 12:01:57 +01:00
Gregory Soutade
355212bf4b Add feed icons from http://www.freeiconsdownload.com/Free_Downloads.asp?id=62 2014-02-01 11:51:02 +01:00
Gregory Soutade
dab80993f2 Add line through support to Markdown 2014-01-31 19:28:25 +01:00
Gregory Soutade
44e4729a23 Forgot to update Atom & RSS generators for Markdown support 2014-01-05 22:19:19 +01:00
Gregory Soutade
91849bdccd Update Changelog 2014-01-04 13:55:39 +01:00
Gregory Soutade
8f374b9e1b Update copyrights 2014-01-04 13:55:30 +01:00
Gregory Soutade
ebf738bffd Set default font size to 14px for TinyMCE advanced editor 2014-01-04 13:49:12 +01:00
Gregory Soutade
88e6ebd3a4 Add Markdown support 2014-01-04 13:43:38 +01:00
Gregory Soutade
9de9cea99a Add 2014 features (copyright and links) 2014-01-04 13:42:59 +01:00
Gregory Soutade
b2663bf31b Add my GPG key 2014-01-04 13:42:28 +01:00
Gregory Soutade
013dd1a62c Fix a bug in all_posts generator (first post was not generated) 2014-01-04 13:30:01 +01:00
Gregory Soutade
26fa4b91b9 Update tinyMCE to version 3.5.10 2014-01-04 13:28:46 +01:00
Gregory Soutade
93f9ff8a57 Fix a bug introduced in previous commit (list.reverse() does not return anything)
Don't generate posts if they're not published
Update about me
2013-11-07 20:37:47 +01:00
Gregory Soutade
f66feb4dbe Display all tags in add_post and edit_post
Reverse post list in all_posts
2013-11-03 09:17:24 +01:00
Gregory Soutade
0394ada46e Update blog 2013-10-26 09:33:47 +02:00
Gregory Soutade
7fba150877 Add AllPosts generator 2013-10-26 09:32:02 +02:00
Gregory Soutade
fa4dbf48fe Fix a bug : forget to add os.environ['DYNASTIE_ROOT'] in blog add (thanks François Schmidts) 2013-10-10 18:37:52 +02:00
56c32e77f0 Set default font size to 14 for tinymce 2013-03-24 09:13:41 +01:00
0e84244db3 Returns to first page when adding a post 2013-03-02 10:11:44 +01:00
cac9e366b7 Update ChangeLog 2013-02-17 09:31:54 +01:00
0e60732f26 Simplify archive generation code 2013-02-17 08:57:37 +01:00
cce2361b75 Archive geenration was broken for tags
Change ALl rights reserved in Tous droits réservés
2013-02-17 08:38:58 +01:00
e277e1cc24 Fix a bug on email notifications : a slash was inserted before # 2013-02-09 10:55:47 +01:00
61d2d63bf4 Do the same for comment edition 2013-02-09 09:48:30 +01:00
fd65e84b62 Replace line returns by <br /> for comments 2013-02-09 09:12:01 +01:00
e795fa1af6 New version 0.2
Add coding information in all py files
Add dyn:post_url and dyn:post_full_url for replace directive (doesn't prepend http://)
Escape double quotes in metas tag
Add HTML5 markup for blog.soutade.fr
Add ChangeLog
2013-02-09 08:55:06 +01:00
397 changed files with 9401 additions and 3965 deletions

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
*~
*.pyc
*_*
*.bdd
*.gz
*.bak

74
ChangeLog Normal file
View File

@@ -0,0 +1,74 @@
v0.5 (05/06/2016)
** User **
** Dev **
** Bugs **
Some robots doesn't set referer when they try to add comment
v0.4 (22/05/2016)
** User **
Redirect user to comment when it's added and not to begining of page
Enable code coloration support with Markdown syntax
Add article inclusion
Add autofocus to login page
Sort tags by name
Add generation duration time
Add fail2ban filter
** Dev **
Support Django 1.8
Enhance cache post content (avoid recomputing md5sum if present)
Add post only generation (for Dev)
** Bugs **
Always update modification date when post/draft is saved
Draft were not remove from _draft directory when moving to Post
v0.3 (13/11/2014)
** User **
Add draft support
Add dyn:first_page_only : subtree will only appears in first page
Add dyn:ljdc_last : last "les joies du code" image
Add dyn:comments_count
Add dyn:category_name
** Dev **
Add FileOutputCache : md5 cache in database avoiding disk read operation
Do things in a more python way
** Bugs **
Posts set to non published were not removed during re generation
Can't create categories and tags
Recursively create directories
v0.2 (27/04/2014)
** User **
Add dyn:post_url and dyn:post_full_url for replace directive (doesn't prepend http://)
Update TinyMCE to version 3.5.10
Add Mardown support (with custom commands)
Add all posts generators
Set default font size to 14 for TinyMCE
Allow to reference comments with #comment_number
Add a favicon
Add post search to Dynastie
A base template can now contains multiple blocks
Add a generator for "lesjoiesducode.fr" (previously parsed by a PERL script)
** Dev **
Add coding information in all py files
Add HTML5 markup and a favicon for blog.soutade.fr
Add ChangeLog
Simplify archive generation code
Trim comments before saving
** Bugs **
Escape double quotes in metas tag
Replace line returns by <br /> for comments
Archive geenration was broken for tags
Returns to first page when adding a post

26
README
View File

@@ -1,16 +1,34 @@
Dynastie is static blog generator delivered under GPL v3 licence terms.
Current version is 0.1
Current version is 0.5
Requirements :
Django >= 1.4, libapache2-mod-wsgi if you want to use Dynastie with Apache. PyGments (Optional).
Django >= 1.8, libapache2-mod-wsgi if you want to use Dynastie with Apache. PyGments (Optional).
Installation :
Download Dynastie. Copy dynastie.bdd.init in dynastie.bdd and update wsgy.py (with $PWD/..). Then you can create a blog*, users**, categories, posts and generate your blog !
* Download Dynastie
* Update dynastie/wsgy.py (with $PWD/../) don't forget the final slash !
* Update dynastie/settings.py (SECRET_KEY...)
* Run ./manage.sh syncdb and create a superuser
* Run ./manage.sh runserver 0.0.0.0:8080
or
* Copy (and edit) apache_dynastie.conf in /etc/apache2/sites-available, and create a symbolic link from /etc/apache2/sites-enabled to /etc/apache2/sites-available
Then you can create users*, blog, categories, posts and generate your blog !
*Be careful : $(blog.name) must be an URI like "blog.soutade.fr", it will be used like this in some parts of Dynastie.
**There is an existing user : admin/admin
Misc directory :
* ljdc.perl : A script to get GIF from http://lesjoiesducode.fr and http://thecodinglove.com/
* apache-dynastie.conf : Filter for fail2ban. Install it in /etc/fail2ban/filter.d and add to /etc/fail2ban/jail.local :
[apache-dynastie]
enabled = true
port = http,https
filter = apache-dynastie
logpath = /var/log/apache*/*error.log
maxretry = 1
Then, restart fail2ban service.
More information can be found at http://indefero.soutade.fr/p/dynastie

21
apache_dynastie.conf Normal file
View File

@@ -0,0 +1,21 @@
<VirtualHost *>
ServerName dynastie.soutade.fr
DocumentRoot /home/soutade/dynastie/dynastie/
WSGIDaemonProcess django-dynastie
WSGIProcessGroup django-dynastie
WSGIScriptAlias / /var/www/dynastie/dynastie/wsgi.py
Alias /static /home/soutade/dynastie/dynastie/static
<Directory /home/soutade/dynastie/dynastie>
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
</VirtualHost>

Binary file not shown.

7
UserProfile.py → dynastie/UserProfile.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -18,6 +19,7 @@
"""
from django.contrib.auth.models import User
from dynastie.models import Language
class UserProfile(models.Model):
# This field is required.
@@ -25,3 +27,6 @@ class UserProfile(models.Model):
# Other fields here
editor = models.CharField(max_length=20, default="TinyMCE")
default_language = models.ForeignKey(Language, on_delete=models.CASCADE)

0
__init__.py → dynastie/__init__.py Normal file → Executable file
View File

14
forms.py → dynastie/forms.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -23,6 +24,7 @@ from dynastie.models import *
class BlogForm(ModelForm):
class Meta:
model = Blog
exclude = ()
class PostForm(ModelForm):
description = forms.CharField(widget=forms.Textarea(attrs={'rows':'5', 'cols':'50'}), required=False)
@@ -31,11 +33,17 @@ class PostForm(ModelForm):
class Meta:
model = Post
exclude = ('title_slug', 'creation_date', 'modification_date', 'author', 'blog', 'tags')
exclude = ('title_slug', 'creation_date', 'modification_date', 'author', 'blog', 'tags', 'content_format', 'post_type')
def __init__(self, *args, **kwargs):
super(PostForm, self).__init__(*args, **kwargs)
self.fields['category'].choices = [(cat.id, cat.name) for cat in Category.objects.all()]
self.fields['language'].choices = [(lang.id, lang.name) for lang in Language.objects.all()]
class DraftForm(PostForm):
class Meta:
model = Draft
exclude = ('title_slug', 'creation_date', 'modification_date', 'author', 'blog', 'tags', 'content_format', 'published', 'post_type')
class CategoryForm(ModelForm):
class Meta:
@@ -45,7 +53,7 @@ class CategoryForm(ModelForm):
class UserForm(ModelForm):
class Meta:
model = User
exclude = ('is_staff', 'is_active', 'last_login', 'last_joined', 'user_permissions', 'groups', 'date_joined', 'password')
exclude = ('groups', 'user_permissions', 'date_joined')
class CommentForm(ModelForm):
class Meta:

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -17,4 +18,4 @@
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
__all__ = ["generator", "index", "post", "category", "tag", "archive", "rss", "atom"]
__all__ = ["generator", "index", "post", "category", "tag", "archive", "rss", "atom", "all_posts", "ljdc"]

177
dynastie/generators/all_posts.py Executable file
View File

@@ -0,0 +1,177 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
Dynastie is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Dynastie is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
from dynastie.generators.index import Index
from django.db import models
class AllPosts(Index):
def createPosts(self, posts, dom, root, node):
posts_elem = self.createElement(dom, 'posts')
self.cur_post = 0
for p in posts:
self.cur_post_obj = p
post_elem = self.createElement(dom, 'post', '', subtree=node)
self._parse(self.hooks, posts, dom, post_elem)
posts_elem.appendChild(post_elem)
self.cur_post = self.cur_post + 1
root.replaceChild(posts_elem, node)
def createMonth(self, posts, dom, root, node):
date_format = node.getAttribute('format')
if not date_format:
date_format = '%B'
self.cur_month = posts[0].creation_date.month
root.removeChild(node)
cur_posts = []
month_elem = None
prev_month = None
for p in posts:
if p.creation_date.month == self.cur_month:
cur_posts.insert(0, p)
continue
month_elem = self.createElement(dom, 'month')
month_def = dom.createElement('month')
month_def.appendChild(dom.createTextNode(cur_posts[0].creation_date.strftime(date_format)))
month_elem.appendChild(month_def)
self.cloneSubtree(month_elem, node)
# Parse inner HTML
self._parse(self.hooks, cur_posts, dom, month_elem)
if not root.hasChildNodes():
root.appendChild(month_elem)
else:
root.insertBefore(month_elem, prev_month)
prev_month = month_elem
cur_posts = []
self.cur_month = p.creation_date.month
cur_posts.append(p)
# Last month
if cur_posts:
cur_posts.reverse()
month_elem = self.createElement(dom, 'month')
month_def = dom.createElement('month')
month_def.appendChild(dom.createTextNode(cur_posts[0].creation_date.strftime(date_format)))
month_elem.appendChild(month_def)
self.cloneSubtree(month_elem, node)
# Parse inner HTML
self._parse(self.hooks, cur_posts, dom, month_elem)
if not root.hasChildNodes():
root.appendChild(month_elem)
else:
root.insertBefore(month_elem, prev_month)
return None
def createYear(self, posts, dom, root, node):
date_format = node.getAttribute('format')
if date_format == '':
date_format = '%Y'
self.cur_year = posts[0].creation_date.year
root.removeChild(node)
cur_posts = []
year_elem = None
for p in posts:
if p.creation_date.year == self.cur_year:
cur_posts.append(p)
continue
year_elem = self.createElement(dom, 'year')
year_def = dom.createElement('year')
year_def.appendChild(dom.createTextNode(cur_posts[0].creation_date.strftime(date_format)))
year_elem.appendChild(year_def)
self.cloneSubtree(year_elem, node)
# Parse inner HTML
self._parse(self.hooks, cur_posts, dom, year_elem)
root.appendChild(year_elem)
cur_posts = []
self.cur_year = p.creation_date.year
cur_posts.append(p)
# Last year
if len(cur_posts) != 0:
year_elem = self.createElement(dom, 'year')
year_def = dom.createElement('year')
year_def.appendChild(dom.createTextNode(cur_posts[0].creation_date.strftime(date_format)))
year_elem.appendChild(year_def)
self.cloneSubtree(year_elem, node)
# Parse inner HTML
self._parse(self.hooks, cur_posts, dom, year_elem)
root.appendChild(year_elem)
return None
def createAllPosts(self, posts, dom, root, node):
posts_elem = self.createElement(dom, 'all_posts')
if len(posts) == 0:
post_elem = self.createElement(dom, '', '<b>No posts yet</b>')
posts_elem.appendChild(post_elem)
else:
for cnode in node.childNodes:
new_node = cnode.cloneNode(True)
posts_elem.appendChild(new_node)
self._parse(self.hooks, posts, dom, posts_elem)
root.replaceChild(posts_elem, node)
return posts_elem
def generate(self, blog, src, output):
from dynastie.models import Post, Blog, Category
self.filename = 'all_posts'
self.hooks['year'] = self.createYear
self.hooks['month'] = self.createMonth
self.hooks['posts'] = self.createPosts
self.hooks['all_posts'] = self.createAllPosts
dom = self.parseTemplate(blog, src, output, 'all_posts')
if dom is None: return self.report
posts = Post.objects.filter(published=True).order_by('-creation_date')
nodes = dom.getElementsByTagName("*")
nodes[0] = self.parse(src, self.hooks, posts, dom, nodes[0])
self.writeIfNotTheSame(output + "/" + self.filename + '.html', nodes[0])
if not self.somethingWrote:
self.addReport('Nothing changed')
return self.report

69
dynastie/generators/archive.py Executable file
View File

@@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
Dynastie is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Dynastie is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
from datetime import datetime
from dynastie.generators.index import Index
from django.db import models
class Archive(Index):
def createArchive(self, posts, dom, root, node):
if node.hasAttribute('year'):
self.replaceByText(dom, root, node, str(self.cur_year))
return None
def generate(self, blog, src, output):
from dynastie.models import Post, Blog
self.hooks['archive'] = self.createArchive
dom = self.parseTemplate(blog, src, output, 'archive', 'archive')
if dom is None: return self.report
posts = Post.objects.filter(published=True, front_page=True).order_by('creation_date')
if len(posts) == 0:
return self.report
first_post = posts[0]
last_post = posts[len(posts)-1]
start_year = first_post.creation_date.year
end_year = last_post.creation_date.year
now = datetime.now()
for i in range(start_year, end_year+1):
if i == now.year: continue
self.cur_year = i
posts = Post.objects.filter(published=True, creation_date__gt=datetime(i, 1, 1), creation_date__lt=datetime(i+1, 1, 1)).order_by('-creation_date')
self.resetCounters()
self.dirname = '/archive/' + str(i)
self.generatePages(dom, posts, src, output, 'archive')
if not self.somethingWrote:
self.addReport('Nothing changed')
return self.report

10
generators/atom.py → dynastie/generators/atom.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -19,10 +20,10 @@
import os
import datetime
import xml
from dynastie.generators.generator import DynastieGenerator
from dynastie.generators.rss import RSS
from xml.dom.minidom import getDOMImplementation
from django.db import models
from dynastie.generators import markdown2
class Atom(RSS):
@@ -76,9 +77,12 @@ class Atom(RSS):
return
f = open(filename, 'rb')
post_content = '<![CDATA[' + f.read() + ']]>'
post_content = '<![CDATA[' + f.read().decode('utf-8') + ']]>'
f.close()
if post.content_format == Post.CONTENT_TEXT:
post_content = markdown2.markdown(post_content)
self.appendElement(dom, item, 'summary', post_content, {'type':'html'})
self.appendElement(dom, item, 'content', post_content, {'type':'html'})
root.appendChild(item)

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -16,22 +17,11 @@
You should have received a copy of the GNU General Public License
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
import os
from xml.dom.minidom import parse, parseString
from dynastie.generators.generator import DynastieGenerator
from dynastie.generators.index import Index
from django.db import models
class Category(Index):
cur_page = 0
nb_pages = 0
cur_post = 0
posts_per_page = 0
filename = 'index'
dirname = ''
cur_category = None
def createCategory(self, posts, dom, root, node):
if node.hasAttribute('name'):
self.replaceByText(dom, root, node, self.cur_category.name)
@@ -42,6 +32,8 @@ class Category(Index):
def generate(self, blog, src, output):
from dynastie.models import Post, Blog, Category
self.cur_category = None
self.hooks['category'] = self.createCategory
dom = self.parseTemplate(blog, src, output, 'category', 'category')
@@ -53,13 +45,11 @@ class Category(Index):
self.cur_category = category
posts = Post.objects.filter(category__exact=category, published=True).order_by('-creation_date')
self.nb_pages = 0
self.cur_page = 0
self.cur_post = 0
self.resetCounters()
self.dirname = '/category/' + category.name_slug
self.generatePages(dom, posts, src, output, 'category', 'category')
self.generatePages(dom, posts, src, output, 'category')
if not self.somethingWrote:
self.addReport('Nothing changed')

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -21,6 +22,7 @@ import hashlib
import gzip
import math
import codecs
import re
from xml.dom import *
from xml.dom.minidom import parse
from xml.parsers.expat import *
@@ -31,7 +33,7 @@ class StrictUTF8Writer(codecs.StreamWriter):
value = ''
def __init__(self):
self.value = u''
self.value = ''
def write(self, object):
object = object.replace('&lt;', '<')
@@ -40,37 +42,38 @@ class StrictUTF8Writer(codecs.StreamWriter):
object = object.replace('&apos;', "'")
object = object.replace('&amp;', '&')
if not type(object) == unicode:
self.value = self.value + unicode(object, 'utf-8')
if type(object) == bytes:
self.value = self.value + object.decode('utf-8')
else:
self.value = self.value + object
return self.value
def reset(self):
self.value = u''
self.value = ''
def getvalue(self):
return self.value
return self.value.encode('utf-8')
class DynastieGenerator:
URI = "http://indefero.soutade.fr/p/dynastie"
report = ''
somethingWrote = False
def __init__(self, hash_posts=None, hash_posts_content=None):
def __init__(self, request, hash_posts={}, hash_posts_content={}):
self.report = ''
self.somethingWrote = False
self.request = request
self.hash_posts = hash_posts
self.hash_posts_content = hash_posts_content
self.user = request and request.user or None
self.iframe_re = re.compile(r'(<iframe.*)/>')
def addReport(self, string, color=''):
if string in self.report: return
if color != '':
if color:
self.report = self.report + '<span style="color:' + color + '">'
self.report = self.report + '<b>' + self.__class__.__name__ + '</b> : '
self.report = self.report + string
if color != '':
if color:
self.report = self.report + '</span>'
self.report = self.report + '<br/>\n'
@@ -89,26 +92,54 @@ class DynastieGenerator:
return int(res)
def writeIfNotTheSame(self, filename, node):
from dynastie.models import FileOutputCache
writer = StrictUTF8Writer()
node.writexml(writer)
content = writer.getvalue().encode('utf-8')
if os.path.exists(filename):
src_md5 = hashlib.md5()
f = open(filename,'rb')
src_md5.update(f.read())
f.close()
content = writer.getvalue().decode('utf-8')
# iframe tag must be like <iframe ... ></iframe>, not optimized <iframe ... />
content = self.iframe_re.sub('\\1></iframe>', content).encode('utf-8')
dst_md5 = hashlib.md5()
dst_md5.update(content)
dst_md5 = hashlib.md5()
dst_md5.update(content)
cache_objs = FileOutputCache.objects.filter(name=filename)
if cache_objs.count() == 0:
cache_obj = None
else:
cache_obj = cache_objs[0]
if src_md5.digest() == dst_md5.digest():
if cache_obj and not os.path.exists(filename):
cache_obj.delete()
cache_obj = None
if cache_obj or os.path.exists(filename):
if not cache_obj:
src_md5 = hashlib.md5()
f = open(filename,'rb')
src_md5.update(f.read())
f.close()
src_md5 = src_md5.hexdigest()
else:
src_md5 = cache_obj.hash
if src_md5 == dst_md5.hexdigest():
if cache_obj is None:
cache_obj = FileOutputCache(name=filename, hash=src_md5)
cache_obj.save()
filename = filename + '.gz'
if not os.path.exists(filename):
f = gzip.open(filename, 'wb')
f.write(content)
f.close()
return
os.unlink(filename)
if os.path.exists(filename):
os.unlink(filename)
if cache_obj is None:
cache_obj = FileOutputCache(name=filename, hash=dst_md5.hexdigest())
else:
cache_obj.hash = dst_md5.hexdigest()
self.addReport('Write (and compress) ' + filename)
f = open(filename,'wb')
@@ -121,6 +152,8 @@ class DynastieGenerator:
f.write(content)
f.close()
cache_obj.save()
self.somethingWrote = True
def createLinkElem(self, dom, path, title):
@@ -131,20 +164,26 @@ class DynastieGenerator:
return link_elem
def createElement(self, dom, name='', content=''):
div = dom.createElement('div')
if name != '':
def cloneSubtree(self, div, subtree):
for node in subtree.childNodes:
div.appendChild(node.cloneNode(True))
def createElement(self, dom, name='', content='', subtree=None, _type='div'):
div = dom.createElement(_type)
if name:
div.setAttribute('class', name)
if content != '':
if content:
div.appendChild(dom.createTextNode(content))
if subtree:
self.cloneSubtree(div, subtree)
return div
def createMeta(self, dom, name='', content=''):
div = dom.createElement('meta')
if name != '':
if name:
div.setAttribute('name', name)
if content != '':
if content:
div.setAttribute('content', content)
return div
@@ -155,7 +194,7 @@ class DynastieGenerator:
if node.prefix == 'dyn':
if node.localName in values:
content = values[node.localName]
if type(content) == unicode or type(content) == str:
if isinstance(content, str):
new_elem = self.createElement(dom, node.localName, content)
else:
new_elem = self.createElement(dom, node.localName)
@@ -174,16 +213,15 @@ class DynastieGenerator:
def _parse(self, hooks, posts, dom, root):
for node in root.childNodes:
if node.prefix == 'dyn':
if node.localName in hooks:
node = hooks[node.localName](posts, dom, root, node)
if not node is None and node.hasChildNodes():
if node.prefix == 'dyn' and node.localName in hooks:
node = hooks[node.localName](posts, dom, root, node)
if node and node.hasChildNodes():
self._parse(hooks, posts, dom, node)
def parse(self, src, hooks, posts, dom, root):
bases = dom.getElementsByTagNameNS(self.URI, 'base')
if len(bases) == 0:
if not bases:
self._parse(hooks, posts, dom, root)
return root
@@ -198,19 +236,24 @@ class DynastieGenerator:
return root
filename = base.getAttribute('file')
if not base.hasAttribute('block'):
self.addError('No \'block\' attribute defined')
return root
target_block = base.getAttribute('block')
if not os.path.exists(src + '/' + filename):
self.addError('Base ' + filename + ' doesn\'t exists')
return root
target_blocks = base.getElementsByTagNameNS(self.URI, 'block')
if not target_blocks:
self.addError('No \'block\' defined in ' + src + '/' + filename)
return root
for target_block in target_blocks:
if not target_block.hasAttribute('name'):
self.addError('Every block must have a name in ' + src + '/' + filename)
return root
dom2 = root
try:
dom2 = parse(src + '/' + filename)
except ExpatError, e:
except ExpatError as e:
self.addError('Error parsing ' + src + '/' + filename)
return root
@@ -218,19 +261,21 @@ class DynastieGenerator:
block_found = False
for block in blocks:
if not block.hasAttribute('name'):
self.addError('block has no attribute \'name\' in ' + filename)
self.addError('block has no attribute \'name\' in ' + src + '/' + filename)
return root
blockname = block.getAttribute('name')
if blockname != target_block:
continue
for target_block in target_blocks:
if blockname != target_block.getAttribute('name'):
continue
for child in root.childNodes:
block.parentNode.appendChild(child.cloneNode(True))
for child in target_block.childNodes:
block.parentNode.insertBefore(child.cloneNode(True), block)
block_found = True
break
block.parentNode.removeChild(block)
block_found = True
if not block_found:
self.addError('Block ' + target_block + ' not found in ' + src + '/' + filename)
self.addError('Any block found in ' + src + '/' + filename)
return root
root = dom2.firstChild

317
generators/index.py → dynastie/generators/index.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -17,26 +18,22 @@
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import re
import datetime
import hashlib
import xml
from xml.parsers.expat import *
import xml.parsers.expat
from xml.dom.minidom import parse, parseString
import codecs
from dynastie.generators.generator import DynastieGenerator, StrictUTF8Writer
from django.db import models
from dynastie.generators import markdown2
class Index(DynastieGenerator):
cur_page = 0
nb_pages = 0
cur_post = 0
cur_post_obj = None
posts_per_page = 0
filename = 'index'
dirname = ''
blog = None
def __init__(self, hash_posts=None, hash_posts_content=None):
DynastieGenerator.__init__(self, hash_posts, hash_posts_content)
def __init__(self, request=None, hash_posts={}, hash_posts_content={}):
DynastieGenerator.__init__(self, request, hash_posts, hash_posts_content)
self.hooks = {'posts' : self.createPosts,
'title' : self.createTitle,
@@ -44,10 +41,29 @@ class Index(DynastieGenerator):
'navigation' : self.createNavigation,
'recents' : self.createRecents,
'tags' : self.createTags,
'replace' : self.createReplace}
'replace' : self.createReplace,
'first_page_only' : self.createFirstPageOnly,
'ljdc_last' : self.createLJDCLast,
'comments_count' : self.createCommentsCount,
'category_name' : self.createCategoryName,
}
self.first_try = True
self.posts_per_page = 5
self.filename = 'index'
self.dirname = ''
self.blog = None
self.parent_posts = []
self.resetCounters()
def resetCounters(self):
self.nb_pages = 0
self.cur_page = 0
self.cur_post = 0
self.cur_post_obj = None
def createReplace(self, posts, dom, root, replace_elem):
if not replace_elem.hasAttribute('div_name'):
self.addError('No attribute div_name for a replace tag')
@@ -61,16 +77,38 @@ class Index(DynastieGenerator):
value = value.replace('dyn:blog_id', str(self.blog.id))
if self.cur_post_obj:
url = self.cur_post_obj.getPath()
full_url = self.cur_post_obj.blog.name + url
value = value.replace('dyn:post_url', url)
value = value.replace('dyn:post_full_url', full_url)
div_element.setAttribute(key, value)
root.replaceChild(div_element, replace_elem)
return div_element
def createCommentsCount(self, posts, dom, root, node):
from dynastie.models import Comment
if self.cur_post_obj is None:
count = 0
else:
count = Comment.objects.filter(post=self.cur_post_obj.id).count()
self.replaceByText(dom, root, node, str(count))
def createCategoryName(self, posts, dom, root, node):
from dynastie.models import Category
if self.cur_post_obj is None:
category = ''
else:
category = Category.objects.filter(id=self.cur_post_obj.category.id)[0].name
self.replaceByText(dom, root, node, category)
def createNavigation(self, posts, dom, root, node):
if self.nb_pages == 0 or self.nb_pages == 1:
if 0 <= self.nb_pages <= 1:
return None
if self.dirname != '':
if self.dirname:
if self.dirname.startswith('/'):
href = '<a href="' + self.dirname + '/' + self.filename
else:
@@ -107,7 +145,8 @@ class Index(DynastieGenerator):
nav = nav + href + str(self.cur_page+1) + '.html">Next &gt;</a> '
nav = nav + href + str(self.nb_pages-1) + '.html">Last &gt;&gt;</a>'
new_dom = parseString('<div class="navigation">' + nav + '</div>')
s = '<div class="navigation">' + nav + '</div>'
new_dom = parseString(s.encode('utf-8'))
new_node = new_dom.getElementsByTagName('div')[0]
res = new_node.cloneNode(True)
root.replaceChild(res, node)
@@ -118,13 +157,30 @@ class Index(DynastieGenerator):
create_link = (title_elem.getAttribute('link') == '1')
post = self.cur_post_obj
if create_link == True:
node = self.createElement(dom, 'title')
node = self.createElement(dom, 'title', _type='h2')
node.appendChild(self.createLinkElem(dom, post.getPath(), post.title))
else:
node = self.createElement(dom, 'title', post.title)
node = self.createElement(dom, 'title', post.title, _type='h2')
root.replaceChild(node, title_elem)
def createFirstPageOnly(self, posts, dom, root, node):
if self.cur_page == 0:
for n in node.childNodes:
root.insertBefore(n.cloneNode(True), node)
root.removeChild(node)
def createLJDCLast(self, posts, dom, root, node):
from dynastie.generators.ljdc import LJDC
l = LJDC()
img = l.getLast(dom, self.blog.src_path)
if not img is None:
root.replaceChild(img, node)
else:
root.removeChild(node)
def createDate(self, posts, dom, root, date_elem):
date_format = date_elem.getAttribute('format')
if date_format == '':
@@ -143,33 +199,84 @@ class Index(DynastieGenerator):
end = code.find('</dyn:code>')
if end < start:
self.addError('Invalid <dyn:code> tags in ' + filename)
self.addError('Invalid <dyn:code> tags in ' + self.filename)
break
try:
dom = parseString(code[start:end+11])
except xml.dom.DOMException as e:
self.addError('Error parsing ' + filename)
break
res = self.createCode(dom, dom.firstChild)
code = code.replace(code[start:end+11], res)
try:
try:
dom = parseString(code[start:end+11])
except UnicodeEncodeError:
dom = parseString(code[start:end+11].encode('utf-8'))
except xml.dom.DOMException as e:
self.addError('Error parsing ' + self.filename)
break
res = self.createCode(dom, dom.firstChild)
if res:
code = code.replace(code[start:end+11], res)
return code
def createPost(self, posts, dom, post_elem, root):
post = self.cur_post_obj
def _have_I_right(self, user, post_id):
from dynastie.models import Post, Blog
if post.id in self.hash_posts and not self.first_try:
node = self.hash_posts[post.id]
return node.cloneNode(0)
p = Post.objects.get(pk=post_id)
if p is None: return None
values = {}
try:
values['author'] = post.author.first_name + ' ' + post.author.last_name
except:
values['author'] = 'Unknown'
values['post_content'] = ''
blog_id = p.blog.id
if not user.is_superuser:
b = Blog.objects.filter(pk=blog_id, writers=user.id)
if not b: return None
b = b[0]
else:
b = Blog.objects.get(pk=blog_id)
if b is None: return None
return (b, p)
def _manageInternalPosts(self, post, text, user=None):
from dynastie.models import Post
if not user: user = post.author
# Markdown replace
if not post or (post and post.content_format == Post.CONTENT_TEXT):
internal_posts = re.finditer('\[\[([0-9]+)\]\]', text)
if internal_posts:
for post in internal_posts:
post_id = post.groups()
post_id = int(post_id[0])
if post_id in self.parent_posts: continue
_,post = self._have_I_right(user, post_id)
if not post: continue
new_content = self._loadPostContent(post)
if new_content:
p = '[[' + str(post_id) + ']]'
text = text.replace(p, new_content)
if internal_posts: return text
# HTML replace
if not post or (post and post.content_format == Post.CONTENT_HTML):
while True:
start = text.find('<dyn:postinclude')
if start == -1: break
end = text.find('</dyn:postinclude>')
if end < start:
self.addError('Invalid <dyn:postinclude> tags in ' + self.filename)
break
internal_posts = re.search('post_id="([0-9]+)"', text[start:])
if not internal_posts: break
for post_id in internal_posts.groups():
_,post = self._have_I_right(user, post_id)
if not post: break
new_content = self._loadPostContent(post)
if new_content:
text = text.replace(text[start:end+18], new_content)
return text
def _loadPostContent(self, post):
from dynastie.models import Post
blog = post.blog
blog.create_paths()
@@ -177,17 +284,48 @@ class Index(DynastieGenerator):
filename = blog.src_path + '/_post/' + str(post.id)
if not os.path.exists(filename):
self.addError('File does not exists ' + filename)
return None
filename2 = blog.src_path + '/_draft/' + str(post.id)
if not os.path.exists(filename2):
self.addError('File does not exists ' + filename)
return None
else:
filename = filename2
if not filename in self.hash_posts_content:
f = open(filename, 'rb')
f = codecs.open(filename, 'r', 'utf-8')
post_content = f.read()
f.close()
self.parent_posts.append(post.id)
post_content = self._manageInternalPosts(post, post_content)
if post.content_format == Post.CONTENT_TEXT:
post_content = markdown2.markdown(post_content, extras=['fenced-code-blocks'])
self.hash_posts_content[filename] = post_content
else:
post_content = self.hash_posts_content[filename]
return post_content
def createPost(self, posts, dom, post_elem, root):
from dynastie.models import Post
post = self.cur_post_obj
if post.id > 0 and post.id in self.hash_posts.keys() and not self.first_try:
node,_ = self.hash_posts[post.id]
return node.cloneNode(0)
values = {'post_content': '', 'author': 'Unknown'}
try:
values['author'] = post.author.first_name + ' ' + post.author.last_name
except:
pass
if post.language != None:
post_elem.setAttribute('lang', post.language.abbrev)
self.parent_posts = []
post_content = self._loadPostContent(post)
if not post_content: return None
post_content = self.pygmentCode(post_content)
self.simpleTransform(values, dom, post_elem, root)
@@ -200,34 +338,28 @@ class Index(DynastieGenerator):
continue
new_node = dom.createTextNode(post_content)
content_node.appendChild(new_node)
if post.id in self.hash_posts:
import hashlib
# Here, we are in first_try, check that computed
# post has the same result than the one in cache
self.first_try = False
writer = StrictUTF8Writer()
node = self.hash_posts[post.id]
node.writexml(writer)
content1 = writer.getvalue().encode('utf-8')
writer = StrictUTF8Writer()
post_elem.writexml(writer)
content2 = writer.getvalue().encode('utf-8')
# Disable this cache
# writer = StrictUTF8Writer()
# post_elem.writexml(writer)
# content = writer.getvalue().encode('utf-8')
md5_1 = hashlib.md5()
md5_1.update(content1)
# md5 = hashlib.md5()
# md5.update(content)
md5_2 = hashlib.md5()
md5_2.update(content2)
# if post.id in self.hash_posts:
# # Here, we are in first_try, check that computed
# # post has the same result than the one in cache
# self.first_try = False
# If not, clear cache
if md5_1.digest() != md5_2.digest():
self.hash_posts = {}
self.hash_posts[post.id] = post_elem.cloneNode(0)
# _,md5_2 = self.hash_posts[post.id]
# # If not, clear cache
# if md5.digest() != md5_2:
# self.hash_posts = {}
# self.hash_posts[post.id] = (post_elem.cloneNode(0), md5.digest())
# else:
# self.hash_posts[post.id] = (post_elem.cloneNode(0), md5.digest())
return post_elem
@@ -236,18 +368,17 @@ class Index(DynastieGenerator):
create_link = (node.getAttribute('link') == '1')
for i in range(0, self.posts_per_page):
post_elem = self.createElement(dom, 'post')
if len(posts) > self.cur_post:
if self.cur_post < len(posts):
self.cur_post_obj = posts[self.cur_post]
post_elem = self.createPost(posts, dom, post_elem, node)
if post_elem is None: continue
else:
post_elem = self.createElement(dom, '', '<b>No posts yet</b>')
self.cur_post_obj = None
if not post_elem is None:
if post_elem:
posts_elem.appendChild(post_elem)
# Parse inner HTML
self._parse(self.hooks, posts, dom, post_elem)
# Parse inner HTML
self._parse(self.hooks, posts, dom, post_elem)
self.cur_post = self.cur_post + 1
if self.cur_post == len(posts):
@@ -287,7 +418,7 @@ class Index(DynastieGenerator):
from dynastie.models import Post
tags_elem = self.createElement(dom, 'tags')
create_link = (node.getAttribute('link') == '1')
if type(posts) == models.query.QuerySet:
if type(posts) == models.query.QuerySet or type(posts) == list:
if len(posts) > self.cur_post:
cur_post = posts[self.cur_post]
else:
@@ -297,7 +428,7 @@ class Index(DynastieGenerator):
else:
cur_post = None
if not cur_post is None:
if cur_post:
for tag in cur_post.tags.all():
if create_link:
tag_elem = self.createElement(dom, 'tag')
@@ -326,7 +457,7 @@ class Index(DynastieGenerator):
from pygments.formatters import get_formatter_by_name
except ImportError:
self.addError('Pygments package is missing, please install it in order to use <dyn:code>')
return
return None
language = node.getAttribute('language')
@@ -363,23 +494,24 @@ class Index(DynastieGenerator):
writer = StrictUTF8Writer()
node.firstChild.writexml(writer)
code = writer.getvalue().encode('utf-8')
code = writer.getvalue().decode('utf-8')
r,w = os.pipe()
r,w=os.fdopen(r,'r',0), os.fdopen(w,'w',0)
r,w=os.fdopen(r,'rb'), os.fdopen(w,'wb')
highlight(code, lexer, formatter, w)
w.close()
code = r.read()
code = code.decode('utf-8')
r.close()
# Remove <pre> after <div class="highlight">
code = code[28:-13]
code = '<div class="highlight">' + code + '</div>'
code = '<div class="highlight">' + code + u'</div>'
return code
def parseTemplate(self, blog, src, output, name, directory=None):
def parseTemplate(self, blog, src, output, name, directory=None, parsePostsTag=True):
self.blog = blog
if not os.path.exists(src + '/_%s.html' % name):
@@ -392,26 +524,26 @@ class Index(DynastieGenerator):
self.addError('Error parsing _%s.html : ' + e)
return None
if not directory is None and not os.path.exists(output + '/' + directory):
os.mkdir(output + '/' + directory)
if directory and not os.path.exists(output + '/' + directory):
os.makedirs(output + '/' + directory)
if not parsePostsTag: return dom
post_nodes = dom.getElementsByTagNameNS(self.URI, "posts")
if not post_nodes is None:
if post_nodes:
if post_nodes[0].hasAttribute("limit"):
self.posts_per_page = int(post_nodes[0].getAttribute("limit"))
else:
self.posts_per_page = 5
else:
self.addError('No tag dyn:posts found')
self.addWarning('No tag dyn:posts found')
return dom
def generatePages(self, dom, posts, src, output, name, directory=None):
def generatePages(self, dom, posts, src, output, name):
if len(posts) > self.posts_per_page:
self.nb_pages = self.computeNbPages(len(posts), self.posts_per_page)
if not directory is None and not os.path.exists(output + self.dirname):
if not os.path.exists(output + self.dirname):
os.mkdir(output + self.dirname)
filename = self.dirname + '/' + self.filename + '.html'
@@ -421,15 +553,12 @@ class Index(DynastieGenerator):
while self.cur_page <= self.nb_pages:
#print 'Generate ' + filename
dom_ = impl.createDocument('', 'xml', None)
dom_.replaceChild(dom.firstChild.cloneNode(0), dom_.firstChild)
nodes = dom.getElementsByTagName("*")
nodes[0] = self.parse(src, self.hooks, posts, dom_, nodes[0])
self.writeIfNotTheSame(output + filename, nodes[0])
dom_.replaceChild(dom.firstChild.cloneNode(True), dom_.firstChild)
nodes = self.parse(src, self.hooks, posts, dom_, dom_.firstChild)
self.writeIfNotTheSame(output + filename, nodes)
self.cur_page = self.cur_page + 1
filename = self.dirname + '/' + self.filename + str(self.cur_page) + '.html'
filename = output + filename
while os.path.exists(filename):
self.addReport('Removing unused ' + filename)
os.unlink(filename)
@@ -439,11 +568,13 @@ class Index(DynastieGenerator):
os.unlink(filename)
self.cur_page = self.cur_page + 1
filename = self.dirname + '/' + self.filename + str(self.cur_page) + '.html'
filename = output + filename
def generate(self, blog, src, output):
from dynastie.models import Post, Blog
self.blog = blog
self.parent_posts = []
dom = self.parseTemplate(blog, src, output, 'index')
if dom is None: return self.report

100
dynastie/generators/ljdc.py Executable file
View File

@@ -0,0 +1,100 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
Dynastie is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Dynastie is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
import os
from xml.dom.minidom import parse
import xml.parsers.expat
from dynastie.generators.index import Index
from django.db import models
class LJDC(Index):
def createPost(self, posts, dom, post_elem, root):
new_elem = self.createElement(dom, 'ljdc')
address = self.cur_post_obj.getElementsByTagName('address')[0]
a = dom.createElement('a')
a.setAttribute('href', address.childNodes[0].nodeValue)
title_value = self.cur_post_obj.getElementsByTagName('title')[0]
title_value = title_value.childNodes[0].nodeValue
title = self.createElement(dom, 'title', title_value)
a.appendChild(title)
img_src = self.cur_post_obj.getElementsByTagName('img')[0]
img = dom.createElement('img')
img.setAttribute('src', img_src.childNodes[0].nodeValue)
a.appendChild(img)
new_elem.appendChild(a)
self.cur_post_obj = None
return new_elem
def _load_references(self, src):
name = '_ljdc.xml'
if not os.path.exists(src + '/%s' % name):
self.addWarning('No %s found, exiting' % name)
return None
try:
srcdom = parse(src + '/%s' % name)
except xml.dom.DOMException as e:
self.addError('Error parsing %s : ' + e)
return None
return srcdom
def generate(self, blog, src, output):
self.posts_per_page = 20
self.dirname = '/ljdc'
srcdom = self._load_references(src)
if srcdom is None: return None
posts = srcdom.getElementsByTagName("entry")
dom = self.parseTemplate(blog, src, output, 'ljdc', 'ljdc')
if dom is None: return self.report
self.generatePages(dom, posts, src, output, 'ljdc')
if not self.somethingWrote:
self.addReport('Nothing changed')
return self.report
def getLast(self, dom, src):
srcdom = self._load_references(src)
if srcdom is None: return None
images = srcdom.getElementsByTagName("img")
if len(images) == 0: return None
img = dom.createElement('img')
img.setAttribute('src', images[0].childNodes[0].nodeValue)
title = srcdom.getElementsByTagName("title")[0]
title = title.childNodes[0].nodeValue
img.setAttribute('alt', title.replace("\"", "'"))
return img

2522
dynastie/generators/markdown2.py Executable file

File diff suppressed because it is too large Load Diff

124
generators/post.py → dynastie/generators/post.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -18,6 +19,8 @@
"""
import datetime
import os
import xml
import re
from xml.dom.minidom import parse, parseString
from dynastie.generators.generator import DynastieGenerator, StrictUTF8Writer
from dynastie.generators.index import Index
@@ -26,9 +29,6 @@ from dynastie.tree import TreeNode
class Post(Index):
cur_comment = None
comment_index = {}
def createReplace(self, post, dom, root, replace_elem):
if not replace_elem.hasAttribute('div_name'):
self.addError('No attribute div_name for a replace tag')
@@ -42,14 +42,15 @@ class Post(Index):
value = value.replace('dyn:post_id', str(post.id))
if self.cur_comment is None:
value = value.replace('dyn:comment_index', '0')
else:
value = value.replace('dyn:comment_index', str(self.comment_index[self.cur_comment.id]))
if self.cur_comment is None:
value = value.replace('dyn:comment_id', '0')
else:
value = value.replace('dyn:comment_index', str(self.comment_index[self.cur_comment.id]))
value = value.replace('dyn:comment_id', str(self.cur_comment.id))
value = value.replace('dyn:blog_id', str(self.blog.id))
url = post.getPath()
full_url = post.blog.name + url
value = value.replace('dyn:post_url', url)
value = value.replace('dyn:post_full_url', full_url)
div_element.setAttribute(key, value)
@@ -81,8 +82,8 @@ class Post(Index):
comments = Comment.objects.filter(post=post).order_by('date')
cur_comment = None
comment_index = {}
self.cur_comment = None
self.comment_index = {}
index = 1
rootNode = TreeNode('', '')
@@ -120,17 +121,26 @@ class Post(Index):
new_elem = None
if name == 'keywords':
new_elem = self.createMeta(dom, name, post.keywords)
value = post.keywords.replace('"', '&ldquo;')
new_elem = self.createMeta(dom, name, value)
elif name == 'title':
new_elem = self.createMeta(dom, name, post.title)
value = post.title.replace('"', '&ldquo;')
new_elem = self.createMeta(dom, name, value)
elif name == 'description':
new_elem = self.createMeta(dom, name, post.description)
value = post.description.replace('"', '&ldquo;')
new_elem = self.createMeta(dom, name, value)
elif name == 'author':
try:
new_elem = self.createMeta(dom, name, post.author.first_name + ' ' + post.author.last_name)
except:
return None
elif name == 'lang':
meta_elem.removeChild(root)
# Add attribute lang in <html> tag
if post.language != None:
meta_elem.parentNode.setAttribute('lang', post.language.abbrev)
return None
if not new_elem is None:
root.parentNode.replaceChild(new_elem, root)
return new_elem
@@ -138,17 +148,19 @@ class Post(Index):
self.addError('name attribute \'' + name + '\' unknown for dyn:meta' )
return None
def _createPost(self, post, dom, post_elem, root):
import sys, traceback
def createPostTitle(self, post, dom, root, node):
value = post.title.replace('"', '&ldquo;')
self.replaceByText(dom, root, node, value)
return None
def _createPost(self, post, dom, root, node):
self.cur_post_obj = post
posts = [post]
self.createPost(posts, dom, post_elem, root)
post_elem = self.createElement(dom, 'post')
post_elem = self.createPost(posts, dom, post_elem, node)
# Post are appended by index. Remove template
post_nodes = dom.getElementsByTagNameNS(self.URI, 'post')
post_elem = post_nodes[0]
post_elem.parentNode.removeChild(post_elem)
root.replaceChild(post_elem, node)
title_nodes = dom.getElementsByTagName('title')
@@ -158,46 +170,48 @@ class Post(Index):
node.removeChild(node.childNodes[0])
node.appendChild(dom.createTextNode(post.title))
return node
return post_elem
def _generate(self, blog, src, output, posts):
import xml
from dynastie.search import Search
self.cur_comment = None
self.comment_index = {}
self.hooks['post'] = self._createPost
self.hooks['meta'] = self.createMetas
self.hooks['comments'] = self.createComments
self.hooks['replace'] = self.createReplace
self.hooks['post_title'] = self.createPostTitle
del self.hooks['navigation']
del self.hooks['recents']
del self.hooks['posts']
self.blog = blog
name = 'post'
if not os.path.exists(src + '/_%s.html' % name):
self.addError('No _%s.html found, exiting' % name)
return self.report
try:
dom = parse(src + '/_%s.html' % name)
except xml.dom.DOMException as e:
self.addError('Error parsing _%s.html : ' + e)
return self.report
dom = self.parseTemplate(blog, src, output, 'post', None, False)
if dom is None: return self.report
impl = xml.dom.getDOMImplementation()
s = Search()
for post in posts:
#print 'Generate ' + filename
dom_ = impl.createDocument('', 'xml', None)
dom_.replaceChild(dom.firstChild.cloneNode(0), dom_.firstChild)
nodes = dom.getElementsByTagName("*")
nodes[0] = self.parse(src, self.hooks, post, dom_, nodes[0])
filename = output + '/post/'
filename = filename + post.creation_date.strftime("%Y") + '/' + post.creation_date.strftime("%m") + '/'
if not os.path.exists(filename):
os.makedirs(filename)
filename = filename + post.title_slug + '.html'
self.writeIfNotTheSame(filename, nodes[0])
if not post.published:
if os.path.exists(filename):
os.unlink(filename)
os.unlink(filename + '.gz')
self.addReport('Remove ' + filename)
s.delete_post(blog, post.id)
continue
#print 'Generate ' + filename
dom_ = impl.createDocument('', 'xml', None)
dom_.replaceChild(dom.firstChild.cloneNode(True), dom_.firstChild)
nodes = self.parse(src, self.hooks, post, dom_, dom_.firstChild)
self.writeIfNotTheSame(filename, nodes)
if not self.somethingWrote:
self.addReport('Nothing changed')
@@ -209,6 +223,7 @@ class Post(Index):
self.blog = blog
self.parent_posts = []
posts = Post.objects.all()
return self._generate(blog, src, output, posts)
@@ -222,32 +237,41 @@ class Post(Index):
v['date'] = now.strftime("%A, %d %B %Y %H:%m")
v['post_content'] = ''
values['content'] = self.pygmentCode(values['content'])
post_content = self._manageInternalPosts(None, values['content'], self.user)
post_content = self.pygmentCode(post_content)
self.simpleTransform(v, dom, root, node)
content_nodes = root.getElementsByTagName("div")
post_transform = ('post_content')
content_node = None
for content_node in content_nodes:
the_class = content_node.getAttribute('class')
if not the_class in post_transform:
continue
if the_class == 'post_content':
new_node = dom.createTextNode(values['content'])
content_node.appendChild(new_node)
s = '<div>' + post_content + u'</div>'
new_node = parseString(s)
for n in new_node.childNodes[0].childNodes:
content_node.appendChild(n)
break
post_nodes = dom.getElementsByTagNameNS(self.URI, "post")
post_elem = post_nodes[0]
post_elem.parentNode.removeChild(post_elem)
return post_elem
return content_node
def preview(self, src, values):
def preview(self, request, src, values):
from dynastie.models import Blog
iframe_re = re.compile(r'(<iframe.*)/>')
self.user = request.user
# Override all hooks
self.hooks = {'post' : self.createPreview,
'tags' : self.createTags}
'tags' : self.createTags,
}
if not os.path.exists(src + '/_post.html'):
self.addError('No _post.html found, exiting')
@@ -270,4 +294,8 @@ class Post(Index):
writer = StrictUTF8Writer()
nodes[0].writexml(writer)
return writer.getvalue().encode('utf-8')
content = writer.getvalue().decode('utf-8')
# iframe tag must be like <iframe ... ></iframe>, not optimized <iframe ... />
content = self.iframe_re.sub('\\1></iframe>', content)
return content

14
generators/rss.py → dynastie/generators/rss.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -22,13 +23,15 @@ import xml
from dynastie.generators.generator import DynastieGenerator
from xml.dom.minidom import getDOMImplementation
from django.db import models
from dynastie.generators import markdown2
class RSS(DynastieGenerator):
def appendElement(self, dom, root, name='', content='', attributes=None):
elem = dom.createElement(name)
if not attributes is None:
for k, v in attributes.iteritems():
if attributes:
for k, v in attributes.items():
elem.setAttribute(k, v)
if content != '':
elem.appendChild(dom.createTextNode(content))
@@ -74,9 +77,12 @@ class RSS(DynastieGenerator):
return
f = open(filename, 'rb')
post_content = f.read()
post_content = f.read().decode('utf-8')
f.close()
if post.content_format == Post.CONTENT_TEXT:
post_content = markdown2.markdown(post_content)
self.appendElement(dom, item, 'description', '<![CDATA[' + post_content + ']]>')
try:

10
generators/search.py → dynastie/generators/search.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -17,7 +18,6 @@
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
import os
from datetime import datetime
from xml.dom.minidom import parse, parseString
from dynastie.generators.generator import DynastieGenerator, StrictUTF8Writer
from dynastie.generators.index import Index
@@ -46,7 +46,7 @@ class Search(Index):
return self.report
post_nodes = dom.getElementsByTagNameNS(self.URI, "posts")
if not post_nodes is None:
if post_nodes:
if post_nodes[0].hasAttribute("limit"):
self.posts_per_page = int(post_nodes[0].getAttribute("limit"))
else:
@@ -63,7 +63,7 @@ class Search(Index):
post = Post.objects.get(pk=post_id)
except:
continue
if not post is None:
if post:
posts.append(post)
nodes = dom.getElementsByTagName("*")
@@ -71,5 +71,5 @@ class Search(Index):
writer = StrictUTF8Writer()
nodes[0].writexml(writer)
return writer.getvalue().encode('utf-8')
return writer.getvalue().decode('utf-8')

21
generators/tag.py → dynastie/generators/tag.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -16,22 +17,11 @@
You should have received a copy of the GNU General Public License
along with Dynastie. If not, see <http://www.gnu.org/licenses/>.
"""
import os
from xml.dom.minidom import parse, parseString
from dynastie.generators.generator import DynastieGenerator
from dynastie.generators.index import Index
from django.db import models
class Tag(Index):
cur_page = 0
nb_pages = 0
cur_post = 0
posts_per_page = 0
filename = 'index'
dirname = ''
cur_tag = None
def createTag(self, posts, dom, root, node):
if node.hasAttribute('name'):
self.replaceByText(dom, root, node, self.cur_tag.name)
@@ -42,6 +32,7 @@ class Tag(Index):
def generate(self, blog, src, output):
from dynastie.models import Post, Blog, Tag
self.cur_tag = None
self.hooks['tag'] = self.createTag
dom = self.parseTemplate(blog, src, output, 'tag', 'tag')
@@ -53,13 +44,11 @@ class Tag(Index):
self.cur_tag = tag
posts = Post.objects.filter(tags__in=[tag.id], published=True).order_by('-creation_date')
self.nb_pages = 0
self.cur_page = 0
self.cur_post = 0
self.resetCounters()
self.dirname = '/tag/' + tag.name_slug
self.generatePages(dom, posts, src, output, 'tag', 'tag')
self.generatePages(dom, posts, src, output, 'tag')
if not self.somethingWrote:
self.addReport('Nothing changed')

226
models.py → dynastie/models.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -26,19 +27,24 @@ from re import sub
from datetime import datetime
from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_init, pre_delete, post_delete, post_save
from django.db.models.signals import pre_init, post_init, pre_delete, post_delete
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from dynastie.generators import *
def slugify(name):
name = name.strip()
name = normalize('NFKD', name).encode('ascii', 'ignore').replace(' ', '-').lower()
name = normalize('NFKD', name).replace(' ', '-').lower()
#remove `other` characters
name = sub('[^a-zA-Z0-9_-]', '', name)
#nomalize dashes
name = sub('-+', '-', name)
return name
class Language(models.Model):
name = models.CharField(max_length=255, unique=True)
abbrev = models.CharField(max_length=4, unique=True)
class Blog(models.Model):
name = models.CharField(max_length=255, unique=True)
title = models.CharField(max_length=255)
@@ -58,8 +64,8 @@ class Blog(models.Model):
def create(self):
self.create_paths()
if not os.path.exists('sites'):
os.mkdir('sites')
if not os.path.exists(os.environ['DYNASTIE_ROOT'] + 'sites'):
os.mkdir(os.environ['DYNASTIE_ROOT'] + 'sites')
if not os.path.exists(self.src_path):
os.mkdir(self.src_path)
@@ -81,8 +87,9 @@ class Blog(models.Model):
continue
engine = line.strip()
if not engine in globals():
print 'Engine ' + engine + ' doesn\'t exists'
self.engines.append(globals()[engine])
print('Engine ' + engine + ' doesn\'t exists')
else:
self.engines.append(globals()[engine])
f.close()
else:
self.engines.append(globals()['post'])
@@ -92,6 +99,10 @@ class Blog(models.Model):
self.engines.append(globals()['archive'])
self.engines.append(globals()['atom'])
self.engines.append(globals()['rss'])
self.engines.append(globals()['all_posts'])
def get_engines(self):
return self.engines
def copytree(self, src, dst):
names = os.listdir(src)
@@ -109,7 +120,9 @@ class Blog(models.Model):
if os.path.isdir(srcname):
if not os.path.exists(dstname):
os.makedirs(dstname)
self.copytree(srcname, dstname)
shutil.copytree(srcname, dstname, ignore=True)
else:
return self.copytree(srcname, dstname)
else:
copied = False
if os.path.exists(dstname):
@@ -153,17 +166,18 @@ class Blog(models.Model):
# XXX What about devices, sockets etc.?
except (IOError, os.error), why:
except (IOError, os.error) as why:
errors.append((srcname, dstname, str(why)))
# catch the Error from the recursive copytree so that we can
# continue with other files
except Exception, err:
except Exception as err:
errors.extend(err.args[0])
if errors:
raise Exception(errors)
def generate(self):
self.report = '<br/><br/>Generation of ' + datetime.now().strftime("%d/%m/%Y at %H:%M:%S") + '<br/>\n'
def generate(self, request):
start_time = datetime.now()
self.report = ''
self.load_generators()
self.copytree(self.src_path, self.output_path)
generated = []
@@ -176,12 +190,43 @@ class Blog(models.Model):
if inspect.isclass(obj) and obj.__module__.startswith("dynastie.generators"):
if obj.__module__ in generated: continue
e = obj(hash_posts, hash_posts_content)
r = e.generate(self, self.src_path, self.output_path)
print('Go for {}'.format(e))
try:
r = e.generate(self, self.src_path, self.output_path)
except Exception as err:
self.report += err
continue
generated.append(obj.__module__)
if not r is None:
self.report = self.report + '<br/>\n' + r
return self.report
duration = datetime.now() - start_time
t = '<br/><br/>Generation of ' + start_time.strftime("%d/%m/%Y at %H:%M:%S") + '<br/>\n'
t = t + 'Duration ' + str(duration) + '<br/><br/>\n'
return t + self.report
def generate_post(self, request, post):
from dynastie.generators import post as PostGenerator
start_time = datetime.now()
self.report = ''
self.load_generators()
self.copytree(self.src_path, self.output_path)
post_list = [post]
hash_posts = {}
hash_posts_content = {}
engine = globals()['post']
for name, obj in inspect.getmembers(engine):
if inspect.isclass(obj) and obj.__module__.startswith("dynastie.generators") \
and obj.__module__.endswith("post"):
e = obj(request, hash_posts, hash_posts_content)
self.report = e._generate(self, self.src_path, self.output_path, post_list)
break
# report = PostGenerator()._generate(self, self.src_path, self.output_path, post_list)
duration = datetime.now() - start_time
t = '<br/><br/>Generation of ' + start_time.strftime("%d/%m/%Y at %H:%M:%S") + ' post ' + str(post.id) + '<br/>\n'
t = t + 'Duration ' + str(duration) + '<br/><br/>\n'
return t + self.report
class Editor(models.Model):
name = models.CharField(max_length=255, unique=True)
@@ -189,9 +234,9 @@ class Editor(models.Model):
class Category(models.Model):
name = models.CharField(max_length=255, unique=True)
name_slug = models.CharField(max_length=255)
parent = models.ForeignKey('self', blank=True, null=True)
parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.CASCADE)
description = models.TextField(max_length=255, blank=True)
blog = models.ForeignKey(Blog)
blog = models.ForeignKey(Blog, on_delete=models.CASCADE)
def save(self):
self.name_slug = slugify(self.name)
@@ -207,7 +252,7 @@ class Category(models.Model):
class Tag(models.Model):
name = models.CharField(max_length=255, unique=True)
name_slug = models.CharField(max_length=255)
blog = models.ForeignKey(Blog)
blog = models.ForeignKey(Blog, on_delete=models.CASCADE)
def save(self):
self.name_slug = slugify(self.name)
@@ -219,7 +264,15 @@ class Tag(models.Model):
if os.path.exists(output):
shutil.rmtree(output)
class PostOnlyManager(models.Manager):
def get_queryset(self):
return super(PostOnlyManager, self).get_queryset().filter(post_type='P')
class Post(models.Model):
objects = PostOnlyManager()
title = models.CharField(max_length=255)
title_slug = models.CharField(max_length=255)
category = models.ForeignKey(Category, blank=True, null=True, on_delete=models.SET_NULL)
@@ -231,7 +284,15 @@ class Post(models.Model):
description = models.TextField(max_length=255, blank=True)
keywords = models.TextField(blank=True)
tags = models.ManyToManyField(Tag, blank=True, null=True)
blog = models.ForeignKey(Blog)
blog = models.ForeignKey(Blog, on_delete=models.CASCADE)
language = models.ForeignKey(Language, null=True, on_delete=models.CASCADE)
CONTENT_HTML = 0
CONTENT_TEXT = 1
CONTENT_FORMAT = (
(CONTENT_HTML, 'HTML'),
(CONTENT_TEXT, 'Text'))
content_format = models.IntegerField(choices=CONTENT_FORMAT, default=CONTENT_TEXT, blank=False, null=False)
post_type = models.CharField(max_length=1, default='P')
def getPath(self):
filename = '/post/'
@@ -242,39 +303,10 @@ class Post(models.Model):
def save(self):
self.title = self.title.strip()
self.title_slug = slugify(self.title)
self.modification_date=datetime.now()
super(Post, self).save()
def createPost(self, content, tags):
b = self.blog
output = b.src_path
if not os.path.exists(output + '/_post'):
os.mkdir(output + '/_post')
filename = output + '/_post/' + str(self.pk)
content = unicode(content)
content = content.encode('utf-8')
modif = True
if os.path.exists(filename):
f = open(filename, 'rb')
src_md5 = hashlib.md5()
src_md5.update(f.read())
f.close()
dst_md5 = hashlib.md5()
dst_md5.update(content)
if src_md5.digest() == dst_md5.digest():
modif = False
else:
os.unlink(filename)
if modif:
f = open(filename, 'wb')
f.write(content)
f.close()
self.modification_date=datetime.now()
def manageTags(self, tags):
tags_list = Tag.objects.filter(blog_id=self.blog.id)
my_tags = []
# Create new tags
@@ -325,7 +357,19 @@ class Post(models.Model):
# print 'Remove ' + t.name_slug
self.tags.remove(t)
self.save()
def createPost(self, content, tags):
output = self.blog.src_path
if not os.path.exists(output + '/_post'):
os.mkdir(output + '/_post')
filename = output + '/_post/' + str(self.pk)
content = content.encode('utf-8')
f = open(filename, 'wb')
f.write(content)
f.close()
self.manageTags(tags)
def remove(self):
b = self.blog
@@ -352,15 +396,80 @@ class Post(models.Model):
if os.path.exists(filename) and len(os.listdir(filename)) == 0:
os.rmdir(filename)
def get_editor(self):
if self.content_format == Post.CONTENT_HTML:
return 'html'
else:
return 'text'
class Draft(Post):
objects = models.Manager()
def createDraft(self, content, tags):
b = self.blog
output = b.src_path
if not os.path.exists(output + '/_draft'):
os.mkdir(output + '/_draft')
filename = output + '/_draft/' + str(self.pk)
content = content.encode('utf-8')
modif = True
if os.path.exists(filename):
f = open(filename, 'rb')
src_md5 = hashlib.md5()
src_md5.update(f.read())
f.close()
dst_md5 = hashlib.md5()
dst_md5.update(content)
if src_md5.digest() == dst_md5.digest():
modif = False
else:
os.unlink(filename)
if modif:
f = open(filename, 'wb')
f.write(content)
f.close()
self.manageTags(tags)
self.save()
def remove(self):
b = self.blog
output = b.src_path
filename = output + '/_draft/' + str(self.pk)
if os.path.exists(filename):
os.unlink(filename)
def save(self):
self.published = False
super(Draft, self).save()
class Comment(models.Model):
post = models.ForeignKey(Post)
parent = models.ForeignKey('self', null=True, blank=True)
post = models.ForeignKey(Post, on_delete=models.CASCADE)
parent = models.ForeignKey('self', null=True, blank=True, on_delete=models.CASCADE)
date = models.DateTimeField()
author = models.CharField(max_length=255)
email = models.EmailField(max_length=255, blank=True)
the_comment = models.TextField(max_length=255)
ip = models.GenericIPAddressField()
def _update_line_returns(self):
self.the_comment = self.the_comment.replace('\n', '<br />')
def _remove_br(self):
self.the_comment = self.the_comment.replace('<br />', '\n')
class FileOutputCache(models.Model):
name = models.CharField(max_length=512)
hash = models.CharField(max_length=512)
@receiver(post_init, sender=Blog)
def init_blog_signal(sender, **kwargs):
kwargs['instance'].create_paths()
@@ -381,7 +490,20 @@ def delete_tag_signal(sender, **kwargs):
def delete_post_signal(sender, **kwargs):
kwargs['instance'].remove()
@receiver(post_delete, sender=Draft)
def delete_draft_signal(sender, **kwargs):
kwargs['instance'].remove()
@receiver(pre_delete, sender=Post)
def pre_delete_post_signal(sender, **kwargs):
post = kwargs['instance']
comments = Comment.objects.filter(post=post.id).delete()
# Replace line returns by <br /> for generation
@receiver(pre_save, sender=Comment)
def pre_save_comment_signal(sender, **kwargs):
kwargs['instance']._update_line_returns()
@receiver(pre_save, sender=Draft)
def pre_save_draft_signal(sender, **kwargs):
kwargs['instance'].post_type = 'D'

29
search.py → dynastie/search.py Normal file → Executable file
View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -61,7 +61,7 @@ class Search:
def _saveDatabase(self, blog, hashtable):
d = pickle.dumps(hashtable)
f = open(blog.src_path + '/_search.db', 'w')
f = open(blog.src_path + '/_search.db', 'wb')
f.write(d)
f.close()
@@ -69,7 +69,7 @@ class Search:
filename = blog.src_path + '/_search.db'
if not os.path.exists(filename):
print 'No search index !'
print('No search index !')
return None
f = open(filename, 'rb')
@@ -100,7 +100,7 @@ class Search:
def _prepare_string(self, content):
content = self._remove_tag(content)
content = self._strip_accents(unicode(content, 'utf8'))
content = self._strip_accents(content)
return content
@@ -128,12 +128,12 @@ class Search:
except:
return
f = open(filename, 'r')
content = f.read()
f = open(filename, 'rb')
content = f.read().decode('utf-8')
f.close()
self._indexContent(hashtable, index, content, 1)
self._indexContent(hashtable, index, post.title.encode('utf-8'), 5)
self._indexContent(hashtable, index, post.title, 5)
def create_index(self, blog):
hashtable = {}
@@ -192,7 +192,7 @@ class Search:
def search(self, blog, string):
hashtable = self._loadDatabase(blog)
string = self._prepare_string(string.encode('utf-8'))
string = self._prepare_string(string)
wordlist = string.split(' ')
@@ -205,15 +205,10 @@ class Search:
for key in hashtable.keys():
if reg.match(key):
for post in hashtable[key]:
if not post[0] in res:
res[post[0]] = post[1]
else:
res[post[0]] += post[1]
res[post[0]] = res.get(post[0],0) + post[1]
sorted_res = sorted(res.iteritems(), key=operator.itemgetter(1))
sorted_res.reverse()
sorted_res = sorted(res.items(), key=operator.itemgetter(1), reverse=True)
res = [sorted_res[i][0] for i in range(len(sorted_res))]
res = []
for i in range(len(sorted_res)):
res .append(sorted_res[i][0])
return res

7
settings.py → dynastie/settings.py Normal file → Executable file
View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright 2012-2013 Grégory Soutadé
Copyright 2012-2014 Grégory Soutadé
This file is part of Dynastie.
@@ -34,6 +35,8 @@ ADMINS = (
('Gregory Soutade', 'gregory@soutade.fr'),
)
ALLOWED_HOSTS = ('*')
MANAGERS = ADMINS
DATABASES = {
@@ -132,7 +135,7 @@ ROOT_URLCONF = 'dynastie.urls'
WSGI_APPLICATION = 'dynastie.wsgi.application'
TEMPLATE_DIRS = (
dynastie_root
dynastie_root,
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.

View File

@@ -0,0 +1,13 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<dyn:all_posts>
<dyn:year>
<dyn:month>
<dyn:posts>
[<dyn:category_name/>] <dyn:title link="1"/>
</dyn:posts>
</dyn:month>
</dyn:year>
</dyn:all_posts>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,23 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<div id="archive_year">Archives <dyn:archive year="1"/></div>
<dyn:posts limit="5">
<article>
<header>
<div class="post_header">
<dyn:title link="1"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content/>
<footer class="post_footer">
<dyn:replace div_name="a" class="comments_link" href="dyn:post_url#comments"><dyn:comments_count/> commentaire(s)</dyn:replace> <dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
</article>
</dyn:posts>
<dyn:navigation/>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,115 @@
<html xmlns:dyn="http://indefero.soutade.fr/p/dynastie" xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<meta content="index, follow" name="robots"/>
<meta content="blog, gregory, soutade, grégory, soutadé, Grégory, Soutadé" name="keywords"/>
<meta content="Blog de Grégory Soutadé" name="description"/>
<meta content="Dynastie" name="generator"/>
<meta name="viewport" content="width=width, initial-scale=1"/>
<title>Blog de Grégory Soutadé</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link href="/rss.xml" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/atom.xml" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
<link href="/css/blog.css" rel="stylesheet" type="text/css"/>
<script src="/js/blog.js"> </script>
<dyn:block name="head"/>
</head>
<body>
<div class="content" id="content">
<header>
<a href="/"><img id="logo" alt="Logo Tux" src="/images/tux_final2.png"/></a>
<div id="header">
<span id="title"><a href="/">Blog de Grégory Soutadé</a></span>
</div>
</header>
<dyn:block name="content"/>
<footer>
<div class="footer">
Copyright © 2010-2022 Grégory Soutadé.<br/>
Tous droits réservés.
</div>
</footer>
</div>
<div class="hamburger" id="hamburger">
<a href="#" onclick="switchMenu();return false;">
<img id="hamburger_logo" alt="Menu" src="/images/hamburger.png"/>
</a>
</div>
<div class="menu" id="menu" lang="fr">
<div class="menu_content">
<div class="menu_content_header">Recherche</div>
<div class="menu_main">
<dyn:replace div_name="form" id="search_form" method="POST" action="/search/dyn:blog_id">
<input type="text" name="text" id="search_text" onkeypress="handleKeyPress(event,this.form)"/>
</dyn:replace>
</div>
</div>
<nav>
<div class="menu_content">
<div class="menu_content_header">Menu principal</div>
<div class="menu_main">
<div class="menu_content_content"><a href="/">Première page</a></div>
<div class="menu_content_content"><a href="/about.html">À propos</a></div>
<div class="menu_content_content"><a href="/all_posts.html">Tous les articles</a></div>
<div class="menu_content_content"><a href="http://indefero.soutade.fr">Projets personnels</a></div>
<div class="menu_content_content"><a href="/ljdc">Les joies du code</a></div>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Catégories</div>
<div class="menu_content_content">
<ul>
<li><a href="/category/articles">Articles</a></li>
<li><a href="/category/musique">Musique</a></li>
<li><a href="/category/informatique">Informatique</a></li>
<li><a href="/category/sport">Sport</a></li>
<li><a href="/category/configurations-pc">Configurations PC</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Tags</div>
<div class="menu_content_content">
<ul>
<li><a href="/tag/inenglish">In English</a></li>
<li><a href="/tag/python">Python</a></li>
<li><a href="/tag/sheevaplug">SheevaPlug</a></li>
<li><a href="/tag/course-a-pied">Course à pied</a></li>
<li><a href="/tag/tag-rugby">Tag rugby</a></li>
<li><a href="/tag/politique">Politique</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Archives</div>
<div class="menu_content_content">
<ul>
<li><a href="/archive/2021">2021</a></li>
<li><a href="/archive/2020">2020</a></li>
<li><a href="/archive/2019">2019</a></li>
<li><a href="/archive/2018">2018</a></li>
<li><a href="/archive/2017">2017</a></li>
<li><a href="/archive/2016">2016</a></li>
<li><a href="/archive/2015">2015</a></li>
<li><a href="/archive/2014">2014</a></li>
<li><a href="/archive/2013">2013</a></li>
<li><a href="/archive/2012">2012</a></li>
<li><a href="/archive/2011">2011</a></li>
<li><a href="/archive/2010">2010</a></li>
</ul>
</div>
</div>
<div class="feed">
<a href="/rss.xml"><img src="/images/rss.png" alt="RSS feeds"/> RSS</a><a href="/atom.xml"><img src="/images/atom.png" alt="Atom feeds"/> Atom</a>
</div>
<div class="newsletter">
<p>Newsletter
<input id="pannous_email" type="email" onclick="clear_your_email();" value="Your email"/>
<input type="button" value="Subscribe" onclick="pannous_list_subscribe();"/>
</p>
</div>
</nav>
<p style="text-align:center">Généré avec <a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a></p>
</div>
</body>
</html>

View File

@@ -0,0 +1,117 @@
<html xmlns:dyn="http://indefero.soutade.fr/p/dynastie" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<meta content="index, follow" name="robots"/>
<dyn:meta name="description"/>
<dyn:meta name="keywords"/>
<dyn:meta name="title"/>
<dyn:meta name="author"/>
<dyn:meta name="lang"/>
<meta content="Dynastie" name="generator"/>
<meta name="viewport" content="width=width, initial-scale=1"/>
<title>Blog de Grégory Soutadé</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link href="/rss.xml" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/atom.xml" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
<link href="/css/blog.css" rel="stylesheet" type="text/css"/>
<script src="/js/blog.js"> </script>
</head>
<body onLoad="javascript:init();">
<div class="content" id="content">
<header>
<a href="/"><img id="logo" alt="Logo Tux" src="/images/tux_final2.png"/></a>
<div id="header">
<span id="title"><a href="/">Blog de Grégory Soutadé</a></span>
</div>
</header>
<dyn:block name="content"/>
<footer>
<div class="footer">
Copyright © 2010-2022 Grégory Soutadé.<br/>
Tous droits réservés.
</div>
</footer>
</div>
<div class="hamburger" id="hamburger">
<a href="#" onclick="switchMenu();return false;">
<img id="hamburger_logo" alt="Menu" src="/images/hamburger.png"/>
</a>
</div>
<div class="menu" id="menu" lang="fr">
<div class="menu_content">
<div class="menu_content_header">Recherche</div>
<div class="menu_main">
<dyn:replace div_name="form" id="search_form" method="POST" action="/search/dyn:blog_id">
<input type="text" name="text" id="search_text" onkeypress="handleKeyPress(event,this.form)"/>
</dyn:replace>
</div>
</div>
<nav>
<div class="menu_content">
<div class="menu_content_header">Menu principal</div>
<div class="menu_main">
<div class="menu_content_content"><a href="/">Première page</a></div>
<div class="menu_content_content"><a href="/about.html">À propos</a></div>
<div class="menu_content_content"><a href="/all_posts.html">Tous les articles</a></div>
<div class="menu_content_content"><a href="http://indefero.soutade.fr">Projets personnels</a></div>
<div class="menu_content_content"><a href="/ljdc">Les joies du code</a></div>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Catégories</div>
<div class="menu_content_content">
<ul>
<li><a href="/category/articles">Articles</a></li>
<li><a href="/category/musique">Musique</a></li>
<li><a href="/category/informatique">Informatique</a></li>
<li><a href="/category/sport">Sport</a></li>
<li><a href="/category/configurations-pc">Configurations PC</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Tags</div>
<div class="menu_content_content">
<ul>
<li><a href="/tag/inenglish">In English</a></li>
<li><a href="/tag/python">Python</a></li>
<li><a href="/tag/sheevaplug">SheevaPlug</a></li>
<li><a href="/tag/course-a-pied">Course à pied</a></li>
<li><a href="/tag/tag-rugby">Tag rugby</a></li>
<li><a href="/tag/politique">Politique</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Archives</div>
<div class="menu_content_content">
<ul>
<li><a href="/archive/2021">2021</a></li>
<li><a href="/archive/2020">2020</a></li>
<li><a href="/archive/2019">2019</a></li>
<li><a href="/archive/2018">2018</a></li>
<li><a href="/archive/2017">2017</a></li>
<li><a href="/archive/2016">2016</a></li>
<li><a href="/archive/2015">2015</a></li>
<li><a href="/archive/2014">2014</a></li>
<li><a href="/archive/2013">2013</a></li>
<li><a href="/archive/2012">2012</a></li>
<li><a href="/archive/2011">2011</a></li>
<li><a href="/archive/2010">2010</a></li>
</ul>
</div>
</div>
<div class="feed">
<a href="/rss.xml"><img src="/images/rss.png" alt="RSS feeds"/> RSS</a><a href="/atom.xml"><img src="/images/atom.png" alt="Atom feeds"/> Atom</a>
</div>
<div class="newsletter">
<p>Newsletter
<input id="pannous_email" type="email" onclick="clear_your_email();" value="Your email"/>
<input type="button" value="Subscribe" onclick="pannous_list_subscribe();"/>
</p>
</div>
</nav>
<p style="text-align:center">Généré avec <a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a></p>
</div>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<div id="category_name"><dyn:category name="1"/></div>
<dyn:posts limit="5">
<article>
<header>
<div class="post_header">
<dyn:title link="1"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content/>
<footer class="post_footer">
<dyn:replace div_name="a" class="comments_link" href="dyn:post_url#comments"><dyn:comments_count/> commentaire(s)</dyn:replace> <dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
</article>
</dyn:posts>
<dyn:navigation/>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,9 @@
post
index
category
tag
archive
atom
rss
all_posts
ljdc

View File

@@ -0,0 +1,33 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<dyn:posts limit="5">
<article>
<header>
<div class="post_header">
<dyn:title link="1"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content/>
<footer class="post_footer">
<dyn:replace div_name="a" class="comments_link" href="dyn:post_url#comments"><dyn:comments_count/> commentaire(s)</dyn:replace> <dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
</article>
</dyn:posts>
<dyn:first_page_only>
<div id="last_ljdc">
<b>Dernier gif</b> <a href="/ljdc">les joies du code</a>
<a href="/ljdc"><dyn:ljdc_last/></a>
</div>
</dyn:first_page_only>
<nav>
<dyn:recents>
<span id="recents_title">More posts...</span>
</dyn:recents>
<dyn:navigation/>
</nav>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,13 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="head">
<link href="http://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css"/>
<link href="/css/ljdc.css" rel="stylesheet" type="text/css"/>
</dyn:block>
<dyn:block name="content">
<h1>Best of les joies du code</h1>
<dyn:posts limit="5"/>
<nav>
<dyn:navigation/>
</nav>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,643 @@
<?xml version="1.0" encoding="utf-8"?>
<ljdc>
<entry>
<address>https://lesjoiesducode.fr/quand-le-client-menvoie-ses-nouvelles-demandes-devolution</address>
<title>Quand le client m'envoie ses nouvelles demandes d'évolution</title>
<img>https://lesjoiesducode.fr/content/046/oYStSXb.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jessaie-de-suivre-un-tuto-et-que-la-complexite-augmente-dun-coup</address>
<title>Quand j'essaie de suivre un tuto et que la complexité augmente d'un coup</title>
<img>https://lesjoiesducode.fr/content/046/SEZ5vom.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-po-commence-a-tester-mon-dev</address>
<title>Quand le PO commence à tester mon dev</title>
<img>https://lesjoiesducode.fr/content/029/tFAJw1m.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-les-experts-securite-saverent-etre-moins-competents-que-prevu</address>
<title>Quand les experts sécurité s'avèrent être moins compétents que prévu</title>
<img>https://lesjoiesducode.fr/content/043/rhLvUor.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-debugue-en-prod</address>
<title>Quand on débugue en prod</title>
<img>https://lesjoiesducode.fr/content/043/yq08VvS.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jessaie-dimplementer-le-multithreading</address>
<title>Quand j'essaie d'implémenter le multithreading</title>
<img>https://lesjoiesducode.fr/content/042/MaxpeKQ.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-specialiste-securite-essaie-de-pentester-mon-application</address>
<title>Quand le spécialiste sécurité essaie de pentester mon application</title>
<img>https://lesjoiesducode.fr/content/041/8sVIedl.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-nai-pas-gere-les-effets-de-bord</address>
<title>Quand je n'ai pas géré les effets de bord</title>
<img>https://lesjoiesducode.fr/content/040/IJgJqmd.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-fais-mon-dernier-git-push-avant-les-vacances</address>
<title>Quand je fais mon dernier git push avant les vacances</title>
<img>https://lesjoiesducode.fr/content/039/aX7FfR2.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-reviens-au-bureau-apres-un-buffet-a-volonte</address>
<title>Quand je reviens au bureau après un buffet à volonté</title>
<img>https://lesjoiesducode.fr/content/038/9hWfv30.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-me-lance-seul-sur-un-projet-avec-une-techno-que-je-ne-connais-pas</address>
<title>Quand on me lance seul sur un projet avec une techno que je ne connais pas</title>
<img>https://lesjoiesducode.fr/content/038/HsO3DA6.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-toute-lequipe-sacharne-a-me-contredire</address>
<title>Quand toute l'équipe s'acharne à me contredire</title>
<img>https://lesjoiesducode.fr/content/037/yUlS8jd.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jessaie-de-suivre-le-lead-dev-dans-ses-explications</address>
<title>Quand j'essaie de suivre le lead dev dans ses explications</title>
<img>https://lesjoiesducode.fr/content/037/MW7IC4h.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-compile-mon-code-pour-la-premiere-fois</address>
<title>Quand je compile mon code pour la première fois</title>
<img>https://lesjoiesducode.fr/content/037/iB7iVrw.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-ma-requete-sql-ne-retourne-rien</address>
<title>Quand ma requête SQL ne retourne rien</title>
<img>https://lesjoiesducode.fr/content/036/Dxzg1wD.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-remet-lappli-au-client</address>
<title>Quand on remet l'appli au client</title>
<img>https://lesjoiesducode.fr/content/036/3aBmbkM.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-vois-comment-le-client-utilise-lapplication</address>
<title>Quand je vois comment le client utilise l'application</title>
<img>https://lesjoiesducode.fr/content/036/JqeuVFM.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-lappli-ne-repond-plus</address>
<title>Quand l'appli ne répond plus</title>
<img>https://lesjoiesducode.fr/content/022/mhxbumI.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/comment-je-mimagine-les-developpeurs-cobol</address>
<title>Comment je m'imagine les développeurs COBOL</title>
<img>https://lesjoiesducode.fr/content/025/PRjlD6h.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-vois-le-rendu-de-mon-css</address>
<title>Quand je vois le rendu de mon CSS</title>
<img>https://lesjoiesducode.fr/content/034/yjaD7Xr.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-collgue-minterrompt-en-pleine-rflexion</address>
<title>Quand un collègue minterrompt en pleine réflexion</title>
<img>https://lesjoiesducode.fr/content/012/cF3StcQ9cXV5u.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-mon-environnement-de-dveloppement-nest-pas</address>
<title>Quand mon environnement de développement n'est pas adapté</title>
<img>https://lesjoiesducode.fr/content/011/B7OTzWA.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-nobody-notices-my-bug-during-the-demo</address>
<title>When nobody notices my bug during the demo</title>
<img>https://thecodinglove.com/content/017/hpktiZq.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-a-client-comes-in-the-office-in-august</address>
<title>When a client comes in the office in august</title>
<img>https://thecodinglove.com/content/017/h3bPkKi.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-make-a-minor-change-in-a-legacy-code</address>
<title>When I make a minor change in a legacy code</title>
<img>https://thecodinglove.com/content/028/sv1sN0F.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-client-mcontent-me-saute-dessus-ds-le-lundi-matin</address>
<title>Quand un client mécontent me saute dessus dès le lundi matin</title>
<img>https://lesjoiesducode.fr/content/010/ahfGsho.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-fais-un-force-commit</address>
<title>Quand je fais un force commit</title>
<img>https://lesjoiesducode.fr/content/028/szetnRM.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/vendredi-aprs-midi</address>
<title>Vendredi après-midi</title>
<img>https://lesjoiesducode.fr/content/017/H9PbWDi.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/seeing-my-own-code-after-years</address>
<title>Seeing my own code after years</title>
<img>https://thecodinglove.com/content/023/nDmdJau.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-you-discover-a-serious-bug-during-a-client</address>
<title>When you discover a serious bug during a client demo</title>
<img>https://thecodinglove.com/content/027/rzUXIEl.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/arriving-late-to-an-important-meeting</address>
<title>Arriving late to an important meeting</title>
<img>https://thecodinglove.com/content/012/CXW1sJ4.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-a-mad-boss-looking-for-me-enters-the-open</address>
<title>When a mad boss looking for me enters the open space</title>
<img>https://thecodinglove.com/content/001/18aypyo.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/friday-evening</address>
<title>Friday evening</title>
<img>https://thecodinglove.com/content/006/66r12jM.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/git-push-force</address>
<title>Git push force</title>
<img>https://thecodinglove.com/content/003/30GaznI.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-nouveau-essaie-de-suivre-le-dialogue</address>
<title>Quand le nouveau essaie de suivre le dialogue entre le client et le commercial</title>
<img>https://lesjoiesducode.fr/content/015/FcIr0Od.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-nouveau-essaie-de-sintgrer-lquipe</address>
<title>Quand le nouveau essaie de s'intégrer à l'équipe</title>
<img>https://lesjoiesducode.fr/content/002/2QdeyzW.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-cancel-the-deployment-right-on-time</address>
<title>When I cancel the deployment right on time</title>
<img>https://thecodinglove.com/content/035/ZTl3UxN.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-russis-enfin-ajuster-les-marges-de-limpression</address>
<title>Quand je réussis enfin à ajuster les marges de l'impression</title>
<img>https://lesjoiesducode.fr/content/019/JT2cxL0.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/completing-a-project-before-holidays</address>
<title>Completing a project before holidays</title>
<img>https://thecodinglove.com/content/008/8nZ39Xu.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/fixing-a-critical-bug-5-minutes-before-the</address>
<title>Fixing a critical bug 5 minutes before the deployment</title>
<img>https://thecodinglove.com/content/019/J6s9wr8.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-client-always-sends-me-the-same-bug</address>
<title>When the client always sends me the same bug ticket</title>
<img>https://thecodinglove.com/content/021/LgnGD09.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jai-fait-une-erreur-et-que-quelquun</address>
<title>Quand j'ai fait une erreur et que quelqu'un d'autre se fait blâmer à ma place</title>
<img>https://lesjoiesducode.fr/content/030/uRNHJje.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/trying-to-stop-the-projects-deployment</address>
<title>Trying to stop the projects deployment</title>
<img>https://thecodinglove.com/content/018/iXXli87.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-development-team-says-the-build-doesnt</address>
<title>When the development team says the build doesnt need to be tested</title>
<img>https://thecodinglove.com/content/015/FhsufXe.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/switching-frameworks-just-because-a-feature</address>
<title>Switching frameworks just because a feature sounded cool</title>
<img>https://thecodinglove.com/content/002/2mYDrjH.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-a-colleague-hands-me-his-keyboard-to-help-him</address>
<title>When a colleague hands me his keyboard to help him fix a bug</title>
<img>https://thecodinglove.com/content/013/dRUGycW.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/developer-vs-designer</address>
<title>Developer vs designer</title>
<img>https://thecodinglove.com/content/019/jPOgeEh.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-guette-larrive-dune-dveloppeuse-qui-vient-passer-un-entretien</address>
<title>Quand je guette l'arrivée d'une développeuse qui vient passer un entretien</title>
<img>https://lesjoiesducode.fr/content/032/WS8cDDf.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-boss-is-not-around-on-friday-night</address>
<title>When the boss is not around on friday night</title>
<img>http://i.imgur.com/DZBuoIt.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-forgot-and-ending-condition-in-my-while</address>
<title>When I forgot and ending condition in my while loop</title>
<img>https://thecodinglove.com/content/033/XhFmRb0.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-app-wont-stop</address>
<title>When the app wont stop</title>
<img>https://thecodinglove.com/content/034/yszCN0J.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-boss-is-on-holidays</address>
<title>When the boss is on holidays</title>
<img>https://thecodinglove.com/content/011/BavZuVt.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-toute-lquipe-scrute-les-stats-du-rseau-alors-que-la-connexion-est-instable</address>
<title>quand toute l'équipe scrute les stats du réseau alors que la connexion est instable</title>
<img>https://lesjoiesducode.fr/content/008/8lc6A.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-solve-an-annoying-bug</address>
<title>When I solve an annoying bug</title>
<img>http://i.imgur.com/7uKQBkq.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-dont-have-any-time-left-for-the-tests</address>
<title>When I dont have any time left for the tests</title>
<img>https://thecodinglove.com/content/021/lIm3con.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-commercial-annonce-la-signature-dun-site-avec</address>
<title>quand le commercial annonce la signature d'un site avec Dorcel</title>
<img>https://lesjoiesducode.fr/content/014/eONWG4U.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-mets-un-break-dans-la-mauvaise-fonction</address>
<title>quand je mets un break dans la mauvaise fonction</title>
<img>https://lesjoiesducode.fr/content/002/20EefUs.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jimplmente-pour-la-premire-fois-une-nouvelle</address>
<title>quand j'implémente pour la première fois une nouvelle API</title>
<img>https://lesjoiesducode.fr/content/028/sUM14Vp.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-do-an-rm-on-a-linux-server</address>
<title>When I do an rm on a linux server</title>
<img>http://i.minus.com/i1wHuaMkzSau7.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-learn-a-new-framework</address>
<title>When I learn a new framework</title>
<img>http://i.imgur.com/9SM3IVT.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-corrige-sans-problme-une-srie-de-bugs</address>
<title>quand je corrige sans problème une série de bugs mineurs</title>
<img>https://lesjoiesducode.fr/content/017/H3lqXrR.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-server-crashes-right-before-the-week-end</address>
<title>When the server crashes right before the week end</title>
<img>http://i.imgur.com/444LbGY.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/vendredi-17h</address>
<title>Vendredi, 17h</title>
<img>https://lesjoiesducode.fr/content/003/3V6zUKr.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-my-app-comes-back-from-qa-without-any-bugs</address>
<title>When my app comes back from QA without any bugs</title>
<img>http://i.imgur.com/uk5JoVB.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-me-donne-quelque-chose-coder-aprs-un-mois</address>
<title>quand on me donne quelque chose à coder après un mois passé à rédiger des docs</title>
<img>https://lesjoiesducode.fr/content/014/eSi5YaK.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-debug-en-mode-ninja-pendant-la-dmo</address>
<title>quand on debug en mode ninja pendant la démo</title>
<img>https://lesjoiesducode.fr/content/018/ibpfNpQ8sZ4ziO.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-une-mise-en-production-seffectue-sans-souci</address>
<title>quand une mise en production s'effectue sans souci</title>
<img>http://i.imgur.com/oRTod71.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-caffeine-is-no-longer-effective</address>
<title>When caffeine is no longer effective</title>
<img>http://i.imgur.com/ocjPFJL.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-suggre-lusage-de-nouvelles-technos</address>
<title>quand je suggère l'usage de nouvelles technos</title>
<img>http://i.imgur.com/BezORLq.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-collgue-me-refile-un-ticket-facile-traiter</address>
<title>quand un collègue me refile un ticket "facile à traiter"</title>
<img>https://lesjoiesducode.fr/content/033/XyeioZc.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-client-rclame-une-feature-hors-cahier-des</address>
<title>quand le client réclame une feature hors cahier des charges et qu'on lui renvoie en réponse sa facture impayée</title>
<img>http://i.imgur.com/3minh1d.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-me-demande-si-je-veux-relire-la-doc</address>
<title>quand on me demande si je veux relire la doc</title>
<img>https://lesjoiesducode.fr/content/005/5jFD7OS.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-have-a-bad-feeling-about-the-project</address>
<title>When I have a bad feeling about the project</title>
<img>http://i.imgur.com/GMU8de2.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-intern-modifies-my-code</address>
<title>When the intern modifies my code</title>
<img>http://i.imgur.com/8jw2zLm.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-its-finally-time-to-leave-work</address>
<title>When its finally time to leave work</title>
<img>http://i.minus.com/i6r0CMzKoKhcr.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-a-backend-developer-wants-to-edit-my-sass</address>
<title>When a backend developer wants to edit my sass files</title>
<img>http://i.imgur.com/kKqDrYd.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-intern-tries-to-use-my-library-for-the</address>
<title>When the intern tries to use my library for the first time</title>
<img>http://i.imgur.com/eGUcWVN.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-finally-release-an-annoying-project</address>
<title>When I finally release an annoying project</title>
<img>http://i.imgur.com/GT8qqQz.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-my-boss-is-looking-for-a-bug-fixer-on-friday</address>
<title>When my boss is looking for a bug fixer on friday night</title>
<img>http://i.imgur.com/CVDVCwz.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-boss-calls-me-to-tell-me-that-he-even</address>
<title>When the boss calls me to tell me that he even cant launch the application</title>
<img>http://i.imgur.com/baZaV.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-see-my-clients-car-parked-outside-when-im</address>
<title>When I see my clients car parked outside when Im leaving the office</title>
<img>http://i.imgur.com/eoqaGSx.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-the-network-is-very-slow</address>
<title>When the network is very slow</title>
<img>http://i.minus.com/ibz5fxcZqtgSHt.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-think-i-will-finish-a-project-without-any</address>
<title>When I think I will finish a project without any issues</title>
<img>http://i.imgur.com/yPE58vP.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-criticize-my-boss-decision-who-is-right</address>
<title>When I criticize my boss decision who is right around the corner</title>
<img>http://i.imgur.com/d86g7Ps.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-dont-have-time-for-writing-tests</address>
<title>When I dont have time for writing tests</title>
<img>http://i.imgur.com/WKr8PT6.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-a-colleague-does-not-agree-with-our-coding</address>
<title>When a colleague does not agree with our coding rules</title>
<img>http://i.imgur.com/JaDshKN.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/hey-look-the-bug-is-fixed</address>
<title>“hey look, the bug is fixed”</title>
<img>http://i.imgur.com/oH4BThU.gif</img>
</entry>
<entry>
<address>https://thecodinglove.com/when-i-try-to-sneak-out-of-the-office-early</address>
<title>When I try to sneak out of the office early, thinking that the boss is not around</title>
<img>http://i.imgur.com/6Ewq7Ha.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-ma-requte-sql-me-retourne-exactement-ce-que-je</address>
<title>quand ma requête SQL me retourne exactement ce que je veux</title>
<img>https://lesjoiesducode.fr/content/008/8cimjld.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-commence-dvelopper-sous-linux-aprs-plusieurs-annes-passes-sous-windows</address>
<title>quand je commence à développer sous Linux après plusieurs années passées sous Windows</title>
<img>https://lesjoiesducode.fr/content/022/Ma1feZq.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-proche-me-demande-encore-une-fois-de-rparer</address>
<title>quand un proche me demande encore une fois de "réparer son Facebook"</title>
<img>https://lesjoiesducode.fr/content/022/MxFZvNI.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/la-dev-team-quand-la-mise-en-prod-fonctionne-du-premier</address>
<title>la dev team quand la mise en prod fonctionne du premier coup</title>
<img>https://lesjoiesducode.fr/content/018/iQybVzt.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-git-blame-balance-qui-a-crit-le-code-que-la</address>
<title>quand "git blame" balance qui a écrit le code que la team a passé 2 jours à debugger</title>
<img>https://lesjoiesducode.fr/content/018/ibz52ZxNgAM2oA.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/la-diffrence-entre-lintitul-du-stage-et-le-stage-en</address>
<title>la différence entre l'intitulé du stage et le stage en question</title>
<img>https://lesjoiesducode.fr/content/028/ScSsJaG.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-prends-en-charge-le-support-utilisateur</address>
<title>quand je prends en charge le support utilisateur</title>
<img>https://lesjoiesducode.fr/content/018/iREPuffTNOthP.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-dveloppe-une-appli-facebook-et-que-le-boss</address>
<title>quand je développe une appli Facebook et que le boss jette un oeil à mon écran</title>
<img>https://lesjoiesducode.fr/content/035/zjik30m.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-sysadmin-a-mal-configur-le-proxy</address>
<title>quand le sysadmin a mal configuré le proxy</title>
<img>https://lesjoiesducode.fr/content/024/o5LbzNy.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-mon-pc-rame-sans-raison-et-que-jai-des-choses</address>
<title>quand mon PC rame sans raison et que j'ai des choses urgentes à faire</title>
<img>https://lesjoiesducode.fr/content/018/i2rMts44clHLw.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-cache-des-bugs-au-chef</address>
<title>quand je cache des bugs au chef</title>
<img>https://lesjoiesducode.fr/content/013/dBATah1.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-les-collgues-se-ramassent-sur-un-projet-sur</address>
<title>quand les collègues se ramassent sur un projet sur lequel je ne travaille pas</title>
<img>https://lesjoiesducode.fr/content/015/FCpwSIk.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-teste-une-requte-sql-monstrueuse-et-que-je</address>
<title>quand je teste une requête SQL monstrueuse et que je m'aperçois que j'ai oublié une parenthèse</title>
<img>https://lesjoiesducode.fr/content/007/7ZGdjjk.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-publie-une-appli-jeu-concours-qui-a-t-tease</address>
<title>quand je publie une appli jeu-concours qui a été teasée à mort</title>
<img>https://lesjoiesducode.fr/content/018/ibgETFO7jGDq2n.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-la-nouvelle-dveloppeuse-casse-mon-code</address>
<title>quand la nouvelle développeuse casse mon code</title>
<img>https://lesjoiesducode.fr/content/016/gtXEh5k.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-collgue-fait-un-force-commit-de-son-code</address>
<title>quand un collègue fait un force commit de son code "testé"</title>
<img>https://lesjoiesducode.fr/content/001/17ZvQW7.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-tente-de-faire-adopter-de-nouvelles</address>
<title>quand je tente de faire adopter de nouvelles technologies à mon boss</title>
<img>https://lesjoiesducode.fr/content/002/2yLYnwm.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/premier-jour-de-production-de-lappli</address>
<title>premier jour de production de l'appli</title>
<img>https://lesjoiesducode.fr/content/017/h72rDqA.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-lance-un-script-sensible-en-prod</address>
<title>Quand je lance un script sensible en prod</title>
<img>https://lesjoiesducode.fr/content/028/SQ23RQv.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-mes-15-lignes-de-code-font-buguer-les-5000-codes</address>
<title>quand mes 15 lignes de code font buguer les 5000 codées par mon collègue</title>
<img>https://lesjoiesducode.fr/content/018/i1iPnQGiNMMcS.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-jvite-de-justesse-une-intgration-sous-ie</address>
<title>quand j'évite de justesse une intégration sous IE</title>
<img>https://lesjoiesducode.fr/content/018/ibrcM4QCUzuO4F.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/chaque-fois-que-je-dois-corriger-un-bug</address>
<title>à chaque fois que je dois corriger un bug</title>
<img>https://lesjoiesducode.fr/content/018/ibwJNFK7KOextP.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-teste-la-release-pour-la-premire-fois</address>
<title>quand on teste la release pour la première fois</title>
<img>https://lesjoiesducode.fr/content/018/iNBfqcRWVujkK.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-chef-me-surveille-de-loin-sur-mon-pc</address>
<title>Quand le chef me surveille de loin sur mon PC</title>
<img>https://lesjoiesducode.fr/content/027/rJoXjxb.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-la-concurrence-nous-rend-visite-sur-un-salon</address>
<title>quand la concurrence nous rend visite sur un salon</title>
<img>https://lesjoiesducode.fr/content/030/UA3XKTA.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-sysadmin-passe-par-lopen-space-pour-rebooter</address>
<title>quand le sysadmin passe par l'open space pour rebooter un serveur crashe par l'applicatif</title>
<img>https://lesjoiesducode.fr/content/024/Oxdx7cS.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-montre-au-stagiaire-comment-devrait-se-passer</address>
<title>quand je montre au stagiaire comment devrait se passer une mise en prod</title>
<img>https://lesjoiesducode.fr/content/018/iOON215zIRp7s.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-pense-que-ma-correction-est-passe-en-prod</address>
<title>quand je pense que ma correction est passée en prod alors que je suis en local</title>
<img>https://lesjoiesducode.fr/content/030/uP2Urzr.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-veux-utiliser-la-dernire-api-en-version-bta</address>
<title>Quand je veux utiliser la dernière API en version bêta dans un projet en prod</title>
<img>https://lesjoiesducode.fr/content/034/yidIDyA.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-mon-try-catch-ne-fonctionne-pas</address>
<title>Quand mon try-catch ne fonctionne pas</title>
<img>https://lesjoiesducode.fr/content/025/PrestigiousDownrightHerring.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-chef-veut-faire-le-point-5-heures-le</address>
<title>quand le chef veut faire le point à 5 heures le vendredi</title>
<img>https://lesjoiesducode.fr/content/014/E1DhQgU.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-lquipe-support-se-tient-prte-pour-la-mise-en</address>
<title>Quand l'équipe support se tient prête pour la mise en prod</title>
<img>https://lesjoiesducode.fr/content/018/iwCfev6TBohRP.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-un-client-mcontent-se-pointe-au-bureau</address>
<title>Quand un client mécontent se pointe au bureau</title>
<img>https://lesjoiesducode.fr/content/018/i1cbaP9vnF8d8.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-nouveau-ne-comprend-rien-au-code-existant</address>
<title>Quand le nouveau ne comprend rien au code existant</title>
<img>https://lesjoiesducode.fr/content/010/Ab1sBGN.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-forme-le-stagiaire</address>
<title>Quand je forme le stagiaire</title>
<img>https://lesjoiesducode.fr/content/019/JPJjSDO.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-fais-une-demo-de-la-stabilite-du-programme-aux</address>
<title>Quand je fais une démo de la stabilité du programme aux clients</title>
<img>https://lesjoiesducode.fr/content/012/c9RSVyh.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-on-mannonce-que-je-vais-devoir-travailler-main</address>
<title>Quand on m'annonce que je vais devoir travailler main dans la main avec les sysadmins</title>
<img>https://lesjoiesducode.fr/content/013/dguiD.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-me-rends-compte-que-je-bloque-depuis-2-heures</address>
<title>Quand je me rends compte que je bloque depuis 2 heures à cause d'un point virgule oublié</title>
<img>https://lesjoiesducode.fr/content/011/bBKKy.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-le-client-essaie-de-cliquer-sur-les-maquettes</address>
<title>quand le client essaie de cliquer sur les maquettes</title>
<img>http://i.imgur.com/Fs2K4.gif</img>
</entry>
<entry>
<address>https://lesjoiesducode.fr/quand-je-decouvre-un-force-close-juste-apres-ma-soumission-sur-le-play-store-android</address>
<title>Quand je découvre un force close juste après ma soumission sur le play store // android</title>
<img>https://lesjoiesducode.fr/content/026/QJu8Z.gif</img>
</entry>
</ljdc>

View File

@@ -0,0 +1,44 @@
<dyn:base file="_base_post.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<dyn:post>
<article>
<div class="post">
<header>
<div class="post_header">
<dyn:title link="0"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content> </dyn:post_content>
<footer class="post_footer">
<dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
<footer id="comments">
<dyn:comments>
<dyn:replace div_name="div" id="comment_dyn:comment_index"> </dyn:replace>
<div class="comment_header">#<dyn:comment_index/> De<dyn:comment_author/>, le<dyn:comment_date/></div>
<dyn:comment_content/>
<dyn:replace div_name="a" href="javascript:void(0);" onClick="javascript:display('response_dyn:comment_index');">Répondre</dyn:replace><br/>
<dyn:replace div_name="form" id="response_dyn:comment_index" class="response" method="POST" action="/comment/add/dyn:post_id/dyn:comment_id" onsubmit="return validateComment('response_dyn:comment_index');">
Auteur :<br/><input required="1" name="author"/><br/><br/>
e-mail* :<br/><input id="email" type="email" name="email"/><input type="email" name="mel"/><br/><br/>
Le commentaire :<br/><textarea required="1" name="the_comment" cols="80" rows="10"> </textarea><br/><br/>
<input type="submit" value="Commenter"/>
</dyn:replace>
</dyn:comments>
<dyn:replace div_name="form" id="response_0" method="POST" action="/comment/add/dyn:post_id/0" onsubmit="return validateComment('response_0');">
Auteur :<br/><input required="1" name="author"/><br/><br/>
e-mail* :<br/><input id="email" type="email" name="email"/><input type="email" name="mel"/><br/><br/>
Le commentaire :<br/><textarea required="1" name="the_comment" cols="80" rows="10"> </textarea><br/><br/>
<input type="submit" value="Commenter"/><br/><br/>
* Seulement pour être notifié d'une réponse à cet article
</dyn:replace>
</footer>
</div>
</article>
</dyn:post>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,21 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<dyn:posts limit="25">
<article>
<header>
<div class="post_header">
<dyn:title link="1"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content/>
<footer class="post_footer">
<dyn:replace div_name="a" class="comments_link" href="dyn:post_url#comments"><dyn:comments_count/> commentaire(s)</dyn:replace> <dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
</article>
</dyn:posts>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,23 @@
<dyn:base file="_base.html" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
<dyn:block name="content">
<div id="tag_name"><dyn:tag name="1"/></div>
<dyn:posts limit="5">
<article>
<header>
<div class="post_header">
<dyn:title link="1"/>
<div class="post_sub_header">
<dyn:date format="%A, %d %B %Y"/> | <div class="author_icon"> Écrit par <dyn:author/> </div>
</div>
<dyn:tags link="1"/>
</div>
</header>
<dyn:post_content/>
<footer class="post_footer">
<dyn:replace div_name="a" class="comments_link" href="dyn:post_url#comments"><dyn:comments_count/> commentaire(s)</dyn:replace> <dyn:replace div_name="a" href="http://dyn:post_full_url">permalink</dyn:replace>
</footer>
</article>
</dyn:posts>
<dyn:navigation/>
</dyn:block>
</dyn:base>

View File

@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<meta content="index, follow" name="robots"/>
<meta content="blog, gregory, soutade, grégory, soutadé, Grégory, Soutadé" name="keywords"/>
<meta content="Blog de Grégory Soutadé" name="description"/>
<meta content="Dynastie" name="generator"/>
<title>Blog de Grégory Soutadé</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link href="/rss.xml" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/atom.xml" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
<link href="/css/blog.css" rel="stylesheet" type="text/css"/>
<script src="/js/base64.js"></script>
<script language="javascript" type="text/javascript" >
<!--
function decryptBase64()
{
var elements = document.getElementsByClassName("decode64");
for(var i=0; i<elements.length; i++)
{
content = elements[i].innerHTML;
decoded = Base64.decode(content);
elements[i].innerHTML = decoded;
}
}
-->
</script>
</head>
<body onLoad="decryptBase64();">
<div class="content" id="content">
<header>
<a href="/"><img id="logo" alt="Logo Tux" src="/images/tux_final2.png"/></a>
<div id="header">
<span id="title"><a href="/">Blog de Grégory Soutadé</a></span>
</div>
</header>
<div class="about">
<p>Bienvenue sur mon blog</p> <p>Bien que beaucoup d'articles soient techniques, l'objectif de ce dernier est avant tout le partage. J'y traiterai ainsi de sujets aussi divers que la musique, le cinéma, des reportages photo de balades, de sciences informatiques, de société et de tout ce qui me passera par la tête et que je jugerai bon de publier.</p>
<p>Pour ma part, je suis ingénieur en informatique, spécialisé dans le logiciel embarqué. Après 10 ans passés chez Neotion (dans nos beaux locaux de Sophia-Antipolis), je suis désormais consultant chez Elsys Design (site de Vallauris/Sophia-Antipolis).</p><br/>
Pour me contacter :<br/>
<ul>
<li class="decode64">PGltZyBzcmM9L2ltYWdlcy9tYWlsLnBuZyBhbHQ9bG9nbyBtYWlsPiA8YSBocmVmPW1haWx0bzpncmVnb3J5QHNvdXRhZGUuZnI+Z3JlZ29yeUBzb3V0YWRlLmZyPC9hPg==</li>
<li class="decode64">PGltZyBzcmM9L2ltYWdlcy94bXBwLnBuZyBhbHQ9bG9nbyBYTVBQPiBncmVnb3J5QHNvdXRhZGUuZnI=</li>
<li class="decode64">PGltZyBzcmM9L2ltYWdlcy9mYWNlYm9vay5wbmcgYWx0PWxvZ28gRmFjZWJvb2s+IDxhIGhyZWY9aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL2dyZWdvcnkuc291dGFkZT5GYWNlYm9vazwvYT4=</li>
<li class="decode64">PGltZyBzcmM9L2ltYWdlcy9saW5rZWRpbi5wbmcgYWx0PWxvZ28gTGlua2VkSU4+IDxhIGhyZWY9aHR0cHM6Ly9saW5rZWRpbi5jb20vaW4vZ3LDqWdvcnktc291dGFkw6k+TGlua2VkaW48L2E+</li>
</ul>
<br/>
<div class="decode64">TWEgY2zDqSA8YSBocmVmPSJodHRwOi8vZnIud2lraXBlZGlhLm9yZy93aWtpL0dQRyI+R1BHPC9hPiA6</div>
<div class="decode64">PHByZT4tLS0tLUJFR0lOIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0NClZlcnNpb246IEdudVBHIHYxLjQuMTQgKEdOVS9MaW51eCkNCg0KbVFFTkJGS294NUlCQ0FDOHZOMG83aWRqODJrUXBuSWJxeXR0NzVraGc1TFhMNEJVWVord0ZFZEg2L2FqdGNWVw0KZWxvSlh0Zld6YTlxaTZTdUFPYVBJMVdXS2lMdjFqSW92TEpnSW92Y2Y3aDlOODUwUG85TWc5ZnBwU1NBazFhdg0KcERMUUlvdTcxWlZ2bTU1bTF1amxZZFIwVGxEU016cWJnKzVRY1pWL09sZ1p6R0hXd3NpYjhOazBJN2J6OTRROQ0KRE95TkxxOHJ3U05WL203dEw1WGhJOWFoMjNHNHVWN0VwdXlMenZBeDhPUyt5NGo0NW9SSCt4bkw1RS9DNktPQQ0Ka0FZb1NBaElOQVl4MXVvL0k0YlNzYjFmK1l0ajVjazVhTHdHMytJWWRFK3VUaUVlUUdJSEZ6UXJDUFZEc3AvNA0KZSt3YWNWWjJPY0NkcXlKaTYzVVRTVVQvOUMyQ0dQQTZjbHR2QUJFQkFBRzBKa2R5dzZsbmIzSjVJRk52ZFhSaA0KWk1PcElEeG5jbVZuYjNKNVFITnZkWFJoWkdVdVpuSStpUUU0QkJNQkFnQWlCUUpTcU1lU0Foc0RCZ3NKQ0FjRA0KQWdZVkNBSUpDZ3NFRmdJREFRSWVBUUlYZ0FBS0NSQWtZUDdLNWpnT2k1WkFCL3NHVk1VSnRYWlFJcVhhK3gyUQ0KRkozc0xUWVA3ODF4UmdhM1hLaW9vTk5ReTN1QkptUFdVc1RzZzdqSVljTGRhcTh6a1JYdjB6bjFxYkE3V0tLZQ0KNjd0YkVseUwwYWZqR1d4NDU1cXJBMzRNZmVNMkdRUGIzUWZTTXpSZGc1YkxQamlpbzNnRi8yR1JoUWJLVlh4eA0KNnY0aGRMVEY4SkVoWDk5M1drTDFtMkZKdGp0L1NxSWx5Y0kxclY1dlJXSmFqZk9RSVhsWlFPQXFmM0J1amU1NQ0KNExmRlF5V1A1VmFYVFhRM3RNczl4bzREaWMyZk1CZSt0S290eVdpcysxTFFaYmRGSFN1NDJsTTZXNWdaV3A2Uw0KeFgra2szbDNhNmtKZGt3TmhKYTFra3pXdGF2UFEvZ3Z6VTI2d3lBTVpueDh2bTBEa1RLK1Y0c1JHZmhoV3ZnUA0KZzB2a3VRRU5CRktveDVJQkNBREpXT2hzQkZqVE9rYmlVdDNubWRSOXQyN1p4WWRnTTAvbzZlek9ML08zR0IzMQ0Kb0FKR2xrUFdGaDVjUE5qL0tSZ2Zrd2ZOZ1RvNkNYVjJBSEdCRWw5ejQwRDY2WFhVdEU5U3ovdEJjQXRUS1B2MA0KY1g0c0hoVVZBZmJyZEJwWFgxSXJsOGJEQ2FlNTdKSEFWUSsycVpWYlptOWs2ZG1IN3pFVTcwWU81MWRQbjJuZg0KbXcvUG1NS1lLV2JYNWpPWUpaWFd1bDM4aFBJZU9wTkNGdHBIS3ZURkJvb0prd3NPRCtLMzQyY3R3WWc5YlZmZw0KTWZkeEtla2EwVnBVSy9sOG1FV25ablFObGdHeTVGSGkzVjFSNStPK1lVaDd4WnBQWUNmSjE4bEtCQi9vbHlZUg0KTmR5QTZrcXg4cHlvdHpVOU42NnVZOVN0Wi82cnBPZ0JoR0hUa2dyeEFCRUJBQUdKQVI4RUdBRUNBQWtGQWxLbw0KeDVJQ0d3d0FDZ2tRSkdEK3l1WTREb3VQTndmL1JlU0RBQzFQQmk4Q1VLZXdETWVtcmFlanpKTFpoVzNZWEFZag0KM3ZLZk5Ja290dS96MU9BY1QxZVc4bzdla2h3dzhTMktyMk5DUEhRalJqRmdqNExiWEQrS3lFTFhuVUNDckk3bg0Kc0hXMzcraHB4R0J4ck9zVGRxZitXM2plRUFEVVBHcTVnZW54NnFBVU1yWFpvT2lXUUt6Q1MzczkyZFh3Qk1NRA0KbU1ZbVBBTTFJVFdPbkt4WkhHNlByUTFKWEVzMDAzR0RObHlVZ2xpeW9zd2MwTGN5M25odEVUTGprWVg5QTVLTA0KdEZyMWlkTEtvTEFqMTh2SmVLZTZpSzhWYWVpMExLN3R0Z0VKQmo5UDhaalBobVpRaUpCOTkxTHNlSDBDUmd1dw0KQ3J3MzdqVm9wclRwazFwcG5TcDVsSVhubWh2RXRtVytNaEE4emdWa3BqR2xPaFlRYUxrRExnUlNxTWdGRVFnQQ0KOFFQUnBUZXIwM2tTMlhnNTZnSkFBdWgzRE5ncE1VbkQvMUNrNysrc3NwR1BpUFJvY1BEeCtjVnNlUUdaZDNGVA0KMkVTL1pTSEwvMWFxRnh4V01ZNmZGRjRhbjg3czdGdFdGNDJjWk9OL0NraVJjeXo3dlpHTVhvTzBGUVUzVG1yWA0KZGJ6dU9rc3g5V21ENkhsRWhOYktaSmVYZUVOMjcxdGlXOGNIQzdrTUZWei9Kdk9JQjdJOVlKeWd5QnUvWHJJeQ0KaU9VbzM5aWltcmpsUHRWUDR1T3hBOTVDaHBSNjFNcDVlb25Na2F2M0dFRTZNaFRGTlJVRnI2bVd3MWR3M1B0SQ0KL3NUQ25Ncjl3bG5WL05VRE9vMlZjSEY5c21VM091eEJDWDBQQnBndXpjZTliVjE4R0dMTEhaaXFvQk4wWk0rOQ0KSklQRGxrUzM3VnJnVVNYbXRpbDJ4d0VBckprOW5SU2dFRm8vTEgvVkdCYTVDVlBTQmNjY1MvcWdYUTZJTm9XTQ0KdzRNSUFPa0tUeVVQRVJKUy8zV2tCQ2IwcHd6dUVVVi8wRmZKZjBnamErQW1qYkRaeE9ObEliL2YyRVJRb0FFMg0KYk5qOVU5RUYyYXYwZDJKdzVjSTJCTmN6SkFFdDFOSTk4aXQ5Y3Z0ajI4S3NxZzZwYzN1VEllTDlqWmU3a1dYaQ0KdCtEUkkzKzZLMnZPc010MTZINi9HUlBCNExicDVQUHZHTEs1cS9ya0d4Q3VRRFdWQ3ROMzIwMHgwV2NrUHRRZA0Kb0p6Rk9NMDBVaWJhQ0tid1NCdGFlUFUxWEJhbC9HOHJwdVQwM2hIdHB6d1paN045SlY4ZzFWNHNXRHlJTmNQTw0Kb1dsUTVoUXVPZU1IYkpCaGVyWlAvemN6cWx5YnVQRnYyaFRUVFZEUWN2WXJNTlJPRTczR25QTmhaTzlNSUhiMQ0KV0xHUTJRc2RwT2h3VVFraU9ZTG1yUXZDd3o4SC8wekZ6Z2NpbWMrV0plU0tKNllWMHpxTDZUYUoxTThGTkNUdQ0KdWdQWjBVeXRuWmM5MFJsN1VDS0RhOFJzbTZNQnV0MWpYWlMwaGZqUVl4aitObnpnbWg4WUNwTmhwQncrUTJseg0KWEdEN3FJZHgzUzdQU3p3RUQvbGNqZVp3aFIySnpPT3Z4SS9vei9JTVJjV3ZGWFBsZHNueHM5N2Qxa2p0blFJNA0KM3hMUEVoRHZ2TDBNWlJ3MDl5Z2VwSE1IU0FrM1d3My8vR1NRaWt0THRZc3lIK2phL2d1R2t6ZmpsUHhBNmhOSg0KeWFsU1U0TGcvOEN1RTdUaGQyTEdOVVRQUDYrUkhyRDBBN3l6M21XSXozUUZaYTJvbE9VZjh0VncwWktJUGoxZg0KT0RyUmFBZnMwUnVhR3BWaDIwM2VBbGZzbDVXTmRaamhvWlJyYkp1RTlySnFYaDVlMUV5SkFYOEVHQUVDQUFrRg0KQWxLb3lBVUNHd0lBYWdrUUpHRCt5dVk0RG90ZklBUVpFUWdBQmdVQ1VxaklCUUFLQ1JDM2x1bi83OTQ5R1psRA0KQVA0MGNydE5OcUVLZlhkYWFQWDVyZ0FIajRCSG8vbmF0SXNxUGxZNXRobU9sUUQ3QjJ1MEp0MUpYOTgrNTRJQg0KU1lnL3llTlZqZElCRmhOTkhkbWsyVkhYMDlFaHNnZ0FtcS84SURqT21UdEI3bkd0Q2gwMU01cDBXeThLQzExZw0Ka3JFUm93UjZubnQ2ZkNJZmFXamhUUVRCNDh4WWZSR3ZIOHcxZDlJcDBibVZVUkRuZ3lNdlduY01HeVd5aWk5VA0KTXdzUDdndE93UUJIQVFYR1VuK2lEd3FlMjhQVXBvMytzM3ZNTWhLaUZFWnhEN3ZzVkc5Z1VYb0lzVllaQVlncg0KWG9hZEpRZWNHM1g5RWFzcCtFTkV3aU5rYStuYWh3bVZ1SjdmZm9EQnR4UVI0V1lkQnZlSDVWUUpBbW16L01FMw0Kak45U3JkR1RIcmI0aVdJUFllM1FrQ2xrQkpKL3hocGt3ZGpjRjFwbHdXQlE4OCtZb0RMaXVvWWY4Z3pmTmN4eg0KSmRHQ3FzRnhZL3ROMkIvMkw1eXUvMVBQUDZEc1lGY2lDZmlsOWJURUNzVWRyQldMeWxzTFp3PT0NCj02ZDcyDQotLS0tLUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tDQo8L3ByZT4=</div>
</div>
<footer>
<div class="footer">
Copyright © 2010-2022 Grégory Soutadé.<br/>
Tous droits réservés.
</div>
</footer>
</div>
<div class="hamburger" id="hamburger">
<a href="#" onclick="switchMenu();return false;">
<img id="hamburger_logo" alt="Menu" src="/images/hamburger.png"/>
</a>
</div>
<div class="menu">
<div class="menu_content">
<div class="menu_content_header">Recherche</div>
<div class="menu_main">
<form action="/search/1" id="search_form" method="POST">
<input id="search_text" name="text" onkeypress="handleKeyPress(event,this.form)" type="text"/>
</form>
</div>
</div>
<nav>
<div class="menu_content">
<div class="menu_content_header">Menu principal</div>
<div class="menu_main">
<div class="menu_content_content"><a href="/">Première page</a></div>
<div class="menu_content_content"><a href="/about.html">À propos</a></div>
<div class="menu_content_content"><a href="/all_posts.html">Tous les articles</a></div>
<div class="menu_content_content"><a href="http://indefero.soutade.fr">Projets personnels</a></div>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Catégories</div>
<div class="menu_content_content">
<ul>
<li><a href="/category/articles">Articles</a></li>
<li><a href="/category/musique">Musique</a></li>
<li><a href="/category/informatique">Informatique</a></li>
<li><a href="/category/cinema">Cinéma</a></li>
<li><a href="/category/sport">Sport</a></li>
<li><a href="/category/configurations-pc">Configurations PC</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Tags</div>
<div class="menu_content_content">
<ul>
<li><a href="/tag/inenglish">In English</a></li>
<li><a href="/tag/python">Python</a></li>
<li><a href="/tag/sheevaplug">SheevaPlug</a></li>
<li><a href="/tag/course-a-pied">Course à pied</a></li>
<li><a href="/tag/tag-rugby">Tag rugby</a></li>
<li><a href="/tag/politique">Politique</a></li>
</ul>
</div>
</div>
<div class="menu_content">
<div class="menu_content_header">Archives</div>
<div class="menu_content_content">
<ul>
<li><a href="/archive/2021">2021</a></li>
<li><a href="/archive/2020">2020</a></li>
<li><a href="/archive/2019">2019</a></li>
<li><a href="/archive/2018">2018</a></li>
<li><a href="/archive/2017">2017</a></li>
<li><a href="/archive/2016">2016</a></li>
<li><a href="/archive/2015">2015</a></li>
<li><a href="/archive/2014">2014</a></li>
<li><a href="/archive/2013">2013</a></li>
<li><a href="/archive/2012">2012</a></li>
<li><a href="/archive/2011">2011</a></li>
<li><a href="/archive/2010">2010</a></li>
</ul>
</div>
</div>
<div class="feed">
<a href="/rss.xml"><img src="/images/rss.png" alt="RSS feeds"/> RSS</a><a href="/atom.xml"><img src="/images/atom.png" alt="Atom feeds"/> Atom</a>
</div>
<div class="newsletter">
<p>Newsletter
<input id="pannous_email" type="email" onclick="clear_your_email();" value="Your email"/>
<input type="button" value="Subscribe" onclick="pannous_list_subscribe();"/>
</p>
</div>
</nav>
<p style="align:text-center">Généré avec <a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a></p>
</div>
</body>
</html>

View File

@@ -0,0 +1,600 @@
body
{
background-color: #f0e5a4;
font-family: Verdana, Serif;
/* font-family: Georgia, 'Times New Roman', Times, serif; */
}
#logo
{
z-index:2;
display:inline;
position:absolute;
top: -125px;
left:-30px;
}
#title a
{
color:black;
font-size: 2em;
padding-left:20%;
padding-right:2em;
margin-right:3em;
}
#header
{
padding-top:2em;
padding-bottom:3em;
background-color:white;
font-size: 1.5em;
}
#recents_title
{
font-weight:bold;
}
div.content
{
display:inline-block;
position:relative;
top:170px;
left:170px;
padding-left:2em;
padding-right:2em;
margin-bottom:15em;
/* margin-right:25%;*/
width:70%;
background-color:white;
border-style:solid;
border-color:black;
border-width:3px;
z-index:1;
}
/* Menu */
div.menu
{
display:inline-block;
background-color:white;
border-radius: 10px;
border-style:solid;
border-color: black;
border-width:3px;
background-color: #edeee7;
width:13%;
position:absolute;
top:20em;
right:2%;
z-index:0;
}
.menu_main
{
padding:0.5em;
}
div.menu
{
font-family: Sans-serif;
}
div.menu div.menu_content
{
/* background-color: #edeee7; */
border-style : solid solid solid solid;
border-color:#d4d6c6;
border-width:2px;
padding:0.3em;
margin :1em;
}
div.menu div.menu_content div.menu_content_header
{
font-size: 17pt;
background-repeat: no-repeat;
background-position: left center;
text-align:center;
color: #475028;
}
div.menu div.menu_content div.menu_content_content
{
color: #5e6a34;
margin: 0.2em;
}
div.menu_content_content a, a:link, a:hover
{
font-family: Sans-serif;
color: #5e6a34;
font-weight: normal;
font-style: normal;
}
div.menu div.menu_content div.menu_content_content ul
{
padding-left:1.3em;
}
div.menu div.menu_content div.menu_content_content li
{
list-style-image: url("/images/BlockContentBullets.png");
}
div.menu a img
{
display:inline;
}
/* Footer */
div.recents
{
margin-left:20px;
}
#archive_year, #category_name, #tag_name
{
font-size:50pt;
padding-bottom:0.5em;
}
div.navigation
{
margin:1em;
text-align:center;
}
div.footer
{
width:100%;
display:block;
text-align:center;
padding-bottom:1em;
}
/* Post */
div.post
{
display:block;
margin-bottom:5em;
}
div.post div.post_header
{
display:block;
color: #3c3e2d;
}
div.post_header h2.title, div.post_header h2.title > a
{
display:block;
text-decoration:none;
margin: 0.2em 0;
padding: 0;
font-weight:normal;
font-style:normal;
letter-spacing:normal;
word-spacing:normal;
font-variant:normal;
text-decoration:none;
font-variant:normal;
text-transform:none;
text-align:left;
text-indent:0;
line-height:inherit;
font-size: 33pt;
color: #181B0D;
}
div.post_header div.post_sub_header
{
display:block;
background-color: #edeee7;
padding : 0.3em;
}
div.post_header div.post_sub_header > div.author_icon
{
display:inline;
background-image: url('/images/authoricon.png');
background-repeat: no-repeat;
background-position: center left;
padding-left: 1.5em;
}
div.post_header div.post_sub_header > div.author_icon div.author
{
display:inline;
font-family: Sans-serif;
}
div.post_header div.post_sub_header div.date
{
display:inline;
font-family: Sans-serif;
background-image: url('/images/dateicon.png');
background-repeat: no-repeat;
background-position: left center;
padding-left: 1.5em;
}
div.post div.post_content
{
display:block;
margin-top:1%;
font-size: 1.1em;
color: #171811;
}
footer.post_footer
{
text-align:right;
}
footer.post_footer > a, a:link, a:hover
{
color: blue;
text-decoration:none;
}
footer.post_footer > a:hover
{
color: blue;
text-decoration:underline;
}
footer.post_footer > a:visited
{
color: purple;
text-decoration:underline;
}
a, a:link, a:hover
{
font-family: Verdana, Serif;
color: #818f00;
text-decoration:none;
}
a img
{
margin-left: auto;
margin-right: auto;
display:block;
}
.inlineimage
{
display:inline;
margin-left: 5em;
}
a .inlineimage
{
display:inline;
margin-left: 5em;
}
h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
{
font-weight: inherit;
font-style: inherit;
}
ul li
{
list-style-image: url("/images/bullet.png");
}
/* Comments */
.comments
{
padding-left:1%;
padding-top:1%;
padding-bottom:1%;
margin-bottom:5%;
}
.comment
{
background-color: #edeceb;
border-style:solid;
border-radius: 10px;
border-color: #8e785b;
padding:0.5em;
margin:1em;
}
.comment .comment
{
margin-top:1em;
margin-left:1em;
}
.comment_content
{
padding-top:0.5em;
padding-left:0.5em;
margin-bottom:0.5em;
text-align:justify;
}
.comment_index, .comment_author, .comment_date
{
display: inline
}
.comment_author, .comment_date
{
margin-left:0.3em;
}
.comment_author
{
font-weight:bold;
}
.response
{
display:none;
padding:0.5em;
}
.tags, .tag
{
display:inline;
}
.tag
{
margin-left:1em;
}
#email
{
display:none;
}
.newsletter > p {
font-weight:bold;
text-align:center;
color: #5e6a34;
}
/* Pygments */
.codehilite, .highlight { background-color: #e8e8e8; }
.hl, .color_emacs_hll { background-color: #ffffcc }
.c, .color_emacs_c { color: #008800; font-style: italic } /* Comment */
.er, .color_emacs_err { border: 1px solid #FF0000 } /* Error */
.k, .color_emacs_k { color: #AA22FF; font-weight: bold } /* Keyword */
.o, .color_emacs_o { color: #666666 } /* Operator */
.cm, .color_emacs_cm { color: #008800; font-style: italic } /* Comment.Multiline */
.cp, .color_emacs_cp { color: #008800 } /* Comment.Preproc */
.c1, .color_emacs_c1 { color: #008800; font-style: italic } /* Comment.Single */
.cs, .color_emacs_cs { color: #008800; font-weight: bold } /* Comment.Special */
.gd, .color_emacs_gd { color: #A00000 } /* Generic.Deleted */
.ge, .color_emacs_ge { font-style: italic } /* Generic.Emph */
.gr, .color_emacs_gr { color: #FF0000 } /* Generic.Error */
.gh, .color_emacs_gh { color: #000080; font-weight: bold } /* Generic.Heading */
.gi, .color_emacs_gi { color: #00A000 } /* Generic.Inserted */
.go, .color_emacs_go { color: #808080 } /* Generic.Output */
.gp, .color_emacs_gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.gs, .color_emacs_gs { font-weight: bold } /* Generic.Strong */
.gu, .color_emacs_gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.gt, .color_emacs_gt { color: #0040D0 } /* Generic.Traceback */
.kc, .color_emacs_kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */
.kd, .color_emacs_kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */
.kn, .color_emacs_kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */
.kp, .color_emacs_kp { color: #AA22FF } /* Keyword.Pseudo */
.kr, .color_emacs_kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */
.kt, .color_emacs_kt { color: #00BB00; font-weight: bold } /* Keyword.Type */
.m, .color_emacs_m { color: #666666 } /* Literal.Number */
.s, .color_emacs_s { color: #BB4444 } /* Literal.String */
.na, .color_emacs_na { color: #BB4444 } /* Name.Attribute */
.nb, .color_emacs_nb { color: #AA22FF } /* Name.Builtin */
.nc, .color_emacs_nc { color: #0000FF } /* Name.Class */
.no, .color_emacs_no { color: #880000 } /* Name.Constant */
.nd, .color_emacs_nd { color: #AA22FF } /* Name.Decorator */
.ni, .color_emacs_ni { color: #999999; font-weight: bold } /* Name.Entity */
.ne, .color_emacs_ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.nf, .color_emacs_nf { color: #00A000 } /* Name.Function */
.nl, .color_emacs_nl { color: #A0A000 } /* Name.Label */
.nn, .color_emacs_nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.nt, .color_emacs_nt { color: #008000; font-weight: bold } /* Name.Tag */
.nv, .color_emacs_nv { color: #B8860B } /* Name.Variable */
.ow, .color_emacs_ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.w, .color_emacs_w { color: #bbbbbb } /* Text.Whitespace */
.mf, .color_emacs_mf { color: #666666 } /* Literal.Number.Float */
.mh, .color_emacs_mh { color: #666666 } /* Literal.Number.Hex */
.mi, .color_emacs_mi { color: #666666 } /* Literal.Number.Integer */
.mo, .color_emacs_mo { color: #666666 } /* Literal.Number.Oct */
.sb, .color_emacs_sb { color: #BB4444 } /* Literal.String.Backtick */
.sc, .color_emacs_sc { color: #BB4444 } /* Literal.String.Char */
.sd, .color_emacs_sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */
.s2, .color_emacs_s2 { color: #BB4444 } /* Literal.String.Double */
.se, .color_emacs_se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.sh, .color_emacs_sh { color: #BB4444 } /* Literal.String.Heredoc */
.si, .color_emacs_si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.sx, .color_emacs_sx { color: #008000 } /* Literal.String.Other */
.sr, .color_emacs_sr { color: #BB6688 } /* Literal.String.Regex */
.s1, .color_emacs_s1 { color: #BB4444 } /* Literal.String.Single */
.ss, .color_emacs_ss { color: #B8860B } /* Literal.String.Symbol */
.bp, .color_emacs_bp { color: #AA22FF } /* Name.Builtin.Pseudo */
.vc, .color_emacs_vc { color: #B8860B } /* Name.Variable.Class */
.vg, .color_emacs_vg { color: #B8860B } /* Name.Variable.Global */
.vi, .color_emacs_vi { color: #B8860B } /* Name.Variable.Instance */
.il, .color_emacs_il { color: #666666 } /* Literal.Number.Integer.Long */
/* Search */
#search_form
{
padding:0;
margin:0;
}
#search_text
{
width:100%;
}
/* All posts */
div.all_posts
{
display:block;
}
div.all_posts div.year
{
display:block;
margin-bottom:3em;
}
div.all_posts div.month
{
display:block;
margin-bottom:1.3em;
margin-left:1.3em;
}
div.all_posts year
{
display:block;
margin-bottom:1em;
font-size: x-large;
font-weight:bold;
}
div.all_posts month
{
display:block;
margin-bottom:0.2em;
font-size: large;
}
div.all_posts div.post
{
display:block;
margin-bottom:0.1em;
margin-left:1.3em;
}
.post_content > p > img
{
display:block;
margin-left: auto;
margin-right: auto;
}
.post_content > p
{
text-align:justify;
}
.feed
{
margin-right:auto;
margin-left:4em;
}
.feed > a
{
margin-right:1em;
}
#last_ljdc
{
padding-bottom:4em;
}
.comments_link
{
padding-right:1em;
}
.year .title
{
display:inline;
}
.hamburger
{
display:none;
}
.about
{
font-family: Verdana, Serif;
}
.about li
{
list-style-image: none;
list-style-type: none;
}
@media only screen and (max-width:1080px) {
#header
{
padding-bottom:1em;
}
#title a
{
font-size: 1.5em;
padding-left:1em;
padding-right:1em;
margin-right:0em;
}
div.menu
{
display:none;
left:10%;
top:2em;
margin-bottom:2em;
}
div.content
{
top:1em;
left:1em;
margin-right:2em;
padding-left:0.5em;
padding-right:0.5em;
margin-bottom:3em;
}
.hamburger
{
display:block;
z-index:999;
position:fixed;
top:2em;
right:-5em;
}
img
{
width: 70%;
}
#hamburger_logo
{
width:30%;
}
#logo
{
display:none;
}
.feed img
{
width:10%;
}
}

View File

@@ -0,0 +1,32 @@
.ljdc
{
display:block;
margin:30px;
}
.ljdc a, .ljdc title
{
font-family: 'Source Code Pro',Courier;
font-size: 1.3em;
font-weight:300;
line-height: 1.3em;
text-align: center;
margin: 5px;
}
.ljdc img
{
display:block;
margin: 10px;
max-width: 400px;
max-height: 400px;
margin-left: auto;
margin-right: auto;
}
.ljdc a:link, .ljdc a:visited, .ljdc a:hover
{
color: rgba(0, 0, 0, 0.8);
text-decoration:none;
}

View File

@@ -98,4 +98,51 @@ function handleKeyPress(e){
f = document.getElementById("search_form");
f.submit();
}
}
}
function switchMenu()
{
var menu = document.getElementById("menu");
var content = document.getElementById("content");
if (menu.style.display == "none" ||
menu.style.display == "")
{
menu.style.display = "block";
content.style.display = "none";
}
else
{
menu.style.display = "none";
content.style.display = "block";
}
}
function pannous_list_do_action(action)
{
var xhr = new XMLHttpRequest();
var email_elem = document.getElementById('pannous_email');
var uri = 'https://pannous.soutade.fr//rest/lists/blog/' + action + '?email=' + email_elem.value;
xhr.open('GET', encodeURI(uri));
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.addEventListener('readystatechange', function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (this.status == 200) {
alert(xhr.responseText);
}
else {
alert("Error " + this.status);
}
}
});
xhr.addEventListener('error', function(event) {
alert('Error ' + this.statusText);
});
xhr.send();
}
function pannous_list_subscribe() { pannous_list_do_action('subscribe'); }
function pannous_list_unsubscribe() { pannous_list_do_action('unsubscribe'); }
function clear_your_email() {
var email_elem = document.getElementById('pannous_email');
if (email_elem.value === 'Your email') email_elem.value = '';
}

View File

@@ -2,4 +2,9 @@
{
color:green;
font-weight:bold;
}
.markdown_help
{
padding-right:20px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
static/js/aes.js → dynastie/static/js/aes.js Normal file → Executable file
View File

View File

@@ -3,7 +3,7 @@ tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,dynastiecolor",
plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,dynastiecolor,dynastieinclude",
editor_selector : "mceAdvanced",
encoding : "raw",
entities : "",
@@ -14,7 +14,7 @@ tinyMCE.init({
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,charmap,emotions,iespell,media,advhr,dynastiecolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,charmap,emotions,iespell,media,advhr,dynastiecolor,dynastieinclude",
// theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
@@ -23,6 +23,10 @@ tinyMCE.init({
width: "60%",
height: "400",
theme_advanced_font_sizes: "14px,16px,18px,20px",
font_size_style_values : "14px,16px,18px,20px",
content_css : "../../static/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/custom_content.css",
external_image_list_url : external_list,
});
@@ -46,3 +50,39 @@ function previewPost(blog_id)
form.action = action;
form.target = target;
}
function addTag()
{
text_tags = document.getElementById('id_text_tags');
avail_tags = document.getElementById('available_tags');
cur_elem = avail_tags.selectedIndex;
cur_elem = (cur_elem >= 0) ? avail_tags.options[cur_elem].value : "";
if(cur_elem != "" && text_tags.value.indexOf(cur_elem) == -1)
{
if (text_tags.value.length > 0)
text_tags.value += ", " + cur_elem;
else
text_tags.value = cur_elem;
}
}
function switchEditor()
{
options = document.getElementById("editor");
help = document.getElementById("markdown_help");
if (options.selectedIndex == 0) // HTML
{
tinyMCE.execCommand('mceAddControl', false, 'content');
help.style.display="none";
// tinymce.execCommand('mceToggleEditor',true,'content');
} else // Text
{
tinyMCE.execCommand('mceRemoveControl', false, 'content');
help.style.display="block";
// tinymce.execCommand('mceToggleEditor',false,'content');
}
}

0
static/js/sha1.js → dynastie/static/js/sha1.js Normal file → Executable file
View File

View File

@@ -0,0 +1,493 @@
Version 3.5.10 (2013-10-24)
Fixed bug where dialogs using inlinepopups plugin would display incorrectly sometimes
Fixed bug in paste plugin word import that was removing type from lists
Fixed bug where IE 11 wouldn't be properly detected if IE 10 emulation was enabled.
Version 3.5.9 (2013-10-10)
Added IE 11 compatibility. IE 11 is treated as Gecko but it has still many IE bugs.
Fixed bug where importing CSS classes would fail if it contained @import rules to remote domain on Gecko.
Fixed bug in spelling plugin where misspelt words are not always marked.
Fixed bug where script tag was removed when nested inside a div or p.
Fixed full screen plugin state migration from original editor.
Fixed edgecase on up/down arrow keys scrolling with native lists.
Fixed bug where space can scroll webpage when using keyboard to access toolbar buttons.
Fixed bug where up/down arrow keys scroll entire webpage when using keyboard nav in menu ui.
Fixed bug where applying ins/del as inline elements would apply them as blocks.
Fixed bug where backspace on a space after an image would produce a BR on WebKit.
Fixed bug where it wasn't possible to change block type of text blocks.
Version 3.5.8 (2012-11-20)
Fixed bug where html5 data attributes where stripped from contents.
Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
Fixed bug where the editor view whouldn't scroll to BR elements when using shift+enter or br enter mode.
Fixed bug where a JS error would be thrown when trying to paste table rows then the rows clipboard was empty.
Fixed bug with auto detection logic for youtube urls in the media plugin.
Fixed bug where the formatter would throw errors if you used the jQuery version of TinyMCE and the latest jQuery.
Fixed bug where the latest WebKit versions would produce span elements when deleting text between blocks.
Fixed bug where the autolink plugin would produce DOM exceptions when pressing shift+enter inside a block element.
Fixed bug where toggling of blockquotes when using br enter mode would produce an exception.
Fixed bug where focusing out of the body of the editor wouldn't properly add an undo level.
Fixed issue with warning message being displayed on IE 9+ about the meta header fix for IE 8.
Version 3.5.7 (2012-09-20)
Changed table row properties dialog to not update multiple rows when row type is header or footer.
Fixed bug in hyperlink dialog for IE9 where links with no target attr set had target value of --
Changing toolbars to have a toolbar role for FF keyboard navigation works correctly.
Fixed bug where applying formatting to an empty block element would produce redundant spans.
Fixed bug where caret formatting on IE wouldn't properly apply if you pressed enter/return.
Fixed bug where loading TinyMCE using an async script wouldn't properly initialize editors.
Fixed bug where some white space would be removed after inline elements before block elements.
Fixed bug where it wouldn't properly parse attributes with a single backslash as it's contents.
Fixed bug where noscript elements would loose it's contents on older IE versions.
Fixed bug where backspace inside empty blockquote wouldn't delete it properly.
Fixed bug where custom elements with . in their names wouldn't work properly.
Fixed bug where the custom_elements option didn't properly setup the block elements schema structure.
Fixed bug where the custom_elements option didn't auto populate the extended_valid_elements.
Fixed bug where the whole TD element would get blcok formatted when there where BR elements in it.
Fixed bug where IE 9 might crash if the editor was hidden and specific styles where applied to surrounding contents.
Fixed bug where shift+enter inside a table cell on Gecko would produce an zero width non breaking space between tr:s.
Fixed bug where the advlink dialog wouldn't properly populate the anchors dropdown if the HTML5 schema was used.
Fixed issue with missing autofocus attribute on input element when using the HTML5 schema.
Fixed issue where enter inside a block contained within an LI element wouldn't produce a new LI.
Version 3.5.6 (2012-07-26)
Added "text" as a valid option to the editor.getContent format option. Makes it easier to get a text representation of the editor contents.
Fixed bug where resizing an image to less that 0x0 pixels would display the ghost image at an incorrect position.
Fixed bug where the remove format button would produce extra paragraphs on WebKit if all of the contents was selected.
Fixed issue where edge resize handles on images of wouldn't scale it with the same aspect ratio.
Fixed so force_p_newlines option works again since some users want mixed mode paragraphs.
Fixed so directionality plugin modifies the dir attribute of all selected blocks in the editor.
Fixed bug where backspace/delete of a custom element would move it's attributes to the parent block on Gecko.
Version 3.5.5 (2012-07-19)
Added full resize support for images and tables on WebKit/Opera. It now behaves just like Gecko.
Added automatic embed support for Vimeo, Stream.cz and Google Maps in media plugin. Patch contributed by Jakub Matas.
Fixed bug where the lists plugin wouldn't properly remove all li elements when toggling selected items of. Patched by Taku AMANO.
Fixed bug where the lists plugin would remove the entire list if you pressed deleted at the beginning of the first element. Patched by Taku AMANO.
Fixed bug where the ordered/unordered list buttons could both be enabled if you nested lists. Patch contributed by Craig Petchell.
Fixed bug where shift+enter wouldn't produce a BR in a LI when having forced_root_blocks set to false.
Fixed bug where scrollbars aren't visible in fullscreen when window is resized.
Fixed bug with updating the border size using the advimage dialog on IE 9.
Fixed bug where the selection of inner elements on IE 8 in contentEditable mode would select the whole parent element.
Fixed bug where the enter key would produce an empty anchor if you pressed it at the space after a link on IE.
Fixed bug where autolink plugin would produce an exception for specific html see bug #5365
Fixed so the formatChanged function takes an optional "similar" parameter to use while matching the format.
Version 3.5.4.1 (2012-06-24)
Fixed issue with Shift+A selecting all contents on Chrome.
Version 3.5.4 (2012-06-21)
Added missing mouse events to HTML5 schema. Some events needs to be manually defined though since the spec is huge.
Added image resizing for WebKit browsers by faking the whole resize behavior.
Fixed bug in context menu plugin where listener to hide menu wasn't removed correctly.
Fixed bug where media plugin wouldn't use placeholder size for the object/video elements.
Fixed bug where jQuery plugin would break attr function in jQuery 1.7.2.
Fixed bug where jQuery plugin would throw an error if you used the tinymce pseudo selector when TinyMCE wasn't loaded.
Fixed so encoding option gets applied when using jQuery val() or attr() to extract the contents.
Fixed so any non valid width/height passed to media plugin would get parsed to proper integer or percent values.
Version 3.5.3 (2012-06-19)
Added missing wbr element to HTML5 schema.
Added new mceToggleFormat command. Enabled you to toggle a specific format on/off.
Fixed bug where undo/redo state didn't update correctly after executing an execCommand call.
Fixed bug where the editor would get auto focused on IE running in quirks mode.
Fixed bug where pressing enter before an IMG or INPUT element wouldn't properly split the block.
Fixed bug where backspace would navigate back when selecting control types on IE.
Fixed bug where the editor remove method would unbind events for controls outside the editor instance UI.
Fixed bug where the autosave plugin would try to store a draft copy of editors that where removed.
Fixed bug where floated elements wouldn't expand the block created when pressing enter on non IE browsers.
Fixed bug where the caret would be placed in the wrong location when pressing enter at the beginning of a block.
Fixed bug where it wasn't possible to block events using the handle_event_callback option.
Fixed bug where keyboard navigation of the ColorSplitButton.js didn't work correctly.
Fixed bug where keyboard navigation didn't work correctly on split buttons.
Fixed bug where the legacy Event.add function didn't properly handle multiple id:s passed in.
Fixed bug where the caret would disappear on IE when selecting all contents and pressing backspace/delete.
Fixed bug where the getStart/getEnd methods would sometimes return elements from the wrong document on IE.
Fixed so paragraphs gets created if you press enter inside a form element.
Version 3.5.2 (2012-05-31)
Added new formatChanged method to tinymce.Formatter class. Enables easier state change handling of formats.
Added new selectorChanged method to tinymce.dom.Selection class. Enables easier state change handling of matching CSS selectors.
Changed the default theme to be advanced instead of simple since most users uses the advanced theme.
Changed so the theme_advanced_buttons doesn't have a default set if one button row is specified.
Changed the theme_advanced_toolbar_align default value to "left".
Changed the theme_advanced_toolbar_location default value to "top".
Changed the theme_advanced_statusbar_location default value to "bottom".
Fixed bug where the simple link dialog would remove class and target attributes from links when updating them if the drop downs wasn't visible.
Fixed bug where the link/unlink buttons wouldn't get disabled once a link was created by the autolink plugin logic.
Fixed bug where the border attribute was missing in the HTML5 schema.
Fixed bug where the legacyoutput plugin would use inline styles for font color.
Fixed bug where editing of anchor names wouldn't produce an undo level.
Fixed bug where the table plugin would delete the last empty block element in the editor.
Fixed bug where pasting table rows when they where selected would make it impossible to editor that table row.
Fixed bug with pressing enter in IE while having a select list focused would produce a JS error.
Fixed bug where it wasn't possible to merge table cells by selecting them and using merge from context menu.
Removed summary from HTML5 table attributes and fixed so this and other deprecated table fields gets hidden in the table dialog.
Version 3.5.1.1 (2012-05-25)
Fixed bug with control creation where plugin specific controls didn't work as expected.
Version 3.5.1 (2012-05-25)
Added new onBeforeAdd event to UndoManager patch contributed by Dan Rumney.
Added support for overriding the theme rendering logic by using a custom function.
Fixed bug where links wasn't automatically created by the autolink plugin on old IE versions when pressing enter in BR mode.
Fixed bug where enter on older IE versions wouldn't produce a new paragraph if the previous sibling paragraph was empty.
Fixed bug where toString on a faked DOM range on older IE versions wouldn't return a proper string.
Fixed bug where named anchors wouldn't work properly when schema was set to HTML5.
Fixed bug where HTML5 datalist options wasn't correctly parsed or indented.
Fixed bug where linking would add anchors around block elements when the HTML5 schema was used.
Fixed issue where the autolink plugin wouldn't properly handle mailto:user@domain.com.
Optimized initialization and reduced rendering flicker by hiding the target element while initializing.
Version 3.5.0.1 (2012-05-10)
Fixed bug where selection normalization logic would break the selections of parent elements using the element path.
Fixed bug where the autolink plugin would include trailing dots in domain names in the link creation.
Fixed bug where the autolink plugin would produce an error on older IE versions when pressing enter.
Fixed bug where old IE versions would throw an error during initialization when the editor was placed in an size restricted div.
Version 3.5 (2012-05-03)
Fixed menu rendering issue if the document was in rtl mode.
Fixed bug where the hide function would throw an error about a missing variable.
Fixed bug where autolink wouldn't convert URLs when hitting enter on IE due to the new enter key logic.
Fixed bug where formatting using shortcuts like ctrl+b wouldn't work properly the first time.
Fixed bug where selection.setContent after a formatter call wouldn't generate formatted contents.
Fixed bug where whitespace would be removed before/after invalid_elements when they where removed.
Fixed bug where updating styles using the theme image dialog in non inline mode on IE9 would produce errors.
Fixed bug where IE 8 would produce an error when using the contextmenu plugin.
Fixed bug where delete/backspace could remove contents of noneditable elements.
Fixed so background color in style preview gets computed from body element if the current style element is transparent.
Version 3.5b3 (2012-03-29)
Added cancel button to colour picker dialog.
Added figure and figcaption to the html5 visualblocks plugin.
Added default alignment options for the figure element.
Fixed bug where empty inline elements within block elements would sometimes produce a br child element.
Fixed bug where urls pointing to the same domain as the current one would cause undefined errors. Patch contributed by Paul Giberson.
Fixed bug where enter inside an editable element inside an non editable element would split the element.
Fixed bug where cut/copy/paste of noneditable elements didn't work.
Fixed bug where backspace would sometimes produce font elements on WebKit.
Fixed bug where WebKit would produce spans out of various inline elements when using backspace.
Fixed bug where IE9 wouldn't properly update image styles when images where resized.
Fixed bug where drag/drop of noneditable elements didn't work correctly.
Fixed bug where applying formatting to all contents wouldn't work correctly when an end point was inside an empty bock. Patch contributed by Jose Luiz.
Fixed bug where IE10 removed the scopeName from the DOM element interface and there for it produced an undefined string in element path.
Fixed bug where the caret would be placed at an incorrect location if you applied block formatting while having the caret at the end of the block.
Fixed bug where applying column changes using the cell dialog would only update the first column. Patch contributed by krzyko.
Fixed bug where the visualblocks plugin would force editor focus if it was turned on by default.
Fixed bug where the tabfocus plugin would tab to iframes these are now ignored.
Fixed bug where format drop down list wouldn't show the currently active format for a parent element.
Fixed bug where paste of plain text in IE 9 would remove the new line characters from text.
Fixed bug where the menu buttons/split button menus wouldn't be opened at the right location on older IE versions.
Fixed bug where Gecko browsers wouldn't properly display the right format when having the selection as specific places.
Fixed bug where shift+enter inside the body when having forced_root_blocks set to false would throw an error.
Fixed bug where the jQuery plugin would break the attr method of jQuery 1.7.2. Patch contributed by Markus Kemmerling.
Fixed so options like content_css accepts and array as well as a comma separated string as input.
Restructured the internal logic to make it more separate from Editor.js.
Updated the Sizzle engine to the latest version.
Version 3.5b2 (2012-03-15)
Rewrote the enter key logic to normalize browser behavior.
Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option.
Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node.
Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls.
Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection.
Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string.
Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default.
Version 3.5b1 (2012-03-08)
Added new event class that is faster and enables support for faking events.
Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema.
Added new schema option and support for the HTML5 schema.
Added new visualblocks plugin that shows html5 blocks with visual borders.
Added new types and selector options to make it easier to create editor instances with different configs.
Added new preview of formatting options in various listboxes.
Added new preview_styles option that enables control over what gets previewed.
Fixed bug where content css would be loaded twice into iframe.
Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing.
Version 3.4.9 (2012-02-23)
Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
Fixed bug in Gecko where undo wasn't added when focus was lost.
Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
Fixed bug where right-click on formatted text in IE selected the entire line.
Fixed bug where text ending with space could not be unformatted in IE.
Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used.
Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts.
Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config.
Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser.
Fixed bug where content css files where loaded twice into the iframe.
Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse.
Version 3.4.8 (2012-02-02)
Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text.
Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked.
Fixed bug where wrong text align buttons are active when multiple block elements are selected.
Fixed bug where selected link not showing in target field of link dialog in some selection cases.
Use settings for remove_trailing_br so this can be turned off instead of hard coding the value.
Fixed bug in IE where the media plugin displayed null text when some values aren't filled in.
Added API method 'onSetAttrib' that fires when the attribute value on a node changes.
Fix font size dropdown value not being updated when text already has a font size in the advanced template.
Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times.
Fixed bug where caret cannot be placed after table if table is at end of document in IE.
Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur.
Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
Fixed bug where a stranded bullet point would get created in WebKit.
Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
Fix white space in between spans from being deleted.
Fixed bug where scrollbars where visible in the character map dialog on Gecko.
Fixed issue with missing translation for one of the emoticons.
Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout.
Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace.
Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber.
Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu.
Version 3.4.7 (2011-11-03)
Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office.
Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text.
Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row.
Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10.
Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph.
Fix new list items in IE8 not displayed on a new line when list contains nested list items.
Clear formatting in table cell breaks the cell.
Made media type list localisable.
Fix out of memory error when using prototype in media dialog.
Fixed bug where could not add a space in the middle of a th cell.
Fixed bug where adding a bullet between two existing bullets adds an extra one
Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in.
Fixed bug where pressing enter on an empty list item does not outdent properly in FF
Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell
Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox.
Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph.
Fixed bug where deleting part of the link text can cause a link with no destination to be saved.
Fixed bug where css style border widths wasn't handled correctly in table dialog.
Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop.
Fixed bug where scripts with custom script types wasn't properly passed though the editor.
Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled.
Made emoticons dialog use the keyboard naviation.
Added navigation instructions to the symbols dialog.
Added ability to set default values for the media plugin.
Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties.
Fixed bug where the symbols dialog was not accessible.
Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility.
Fixed bug where the advanced color picker wasn't working properly on FF 7.
Fixed issue where the advanced color picker was producing uppercase hex codes.
Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements.
Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit.
Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes.
Version 3.4.6 (2011-09-29)
Fixed bug where list items were being created for empty divs.
Added support in Media plugin for audio media using the embed tag
Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read.
Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers)
Fixed bug where classid attribute was not being checked from embed objects.
Fixed bug in jsrobot tests with intermittently failing.
Fixed bug where anchors wasn't updated properly if you edited them using IE 8.
Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor.
Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them.
Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin.
Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin.
Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin.
Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko.
Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly.
Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers.
Version 3.4.5 (2011-09-06)
Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes.
Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved.
Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats.
Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly.
Fixed bug in WebKit where console messages would be logged when deleting an empty document.
Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list
Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements.
Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases.
Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM.
Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized.
Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control.
Fixed bug where adjacent links would get merged on IE due to bugs in their link command.
Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe.
Fixed bug where floated images in WebKit wouldn't get properly linked.
Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode.
Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P.
Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit.
Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit.
Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7.
Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit.
Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents.
Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text.
Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled.
Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin.
Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped.
Version 3.4.4 (2011-08-04)
Added new html5 audio support. Patch contributed by Ronald M. Clifford.
Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin.
Fixed selection to match visual selection before applying formatting changes.
Fixed browser specific bugs in lists for WebKit and IE.
Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel.
Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser.
Fixed bug where formatting change would be lost after pressing enter.
Fixed bug in WebKit where deleting across blocks would add extra styles.
Fixed bug where moving cursor vertically in tables in WebKit wasn't working.
Fixed bug in IE where deleting would cause error in console.
Fixed bug where the formatter was not applying formats across list elements.
Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed.
Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden.
Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko.
Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements.
Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event.
Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them.
Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog.
Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location.
Version 3.4.3.2 (2011-06-30)
Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit.
Fixed bugs in tests in firefox5 and WebKit.
Fixed bug where selection of table cells would produce an exception on Gecko.
Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden.
Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup.
Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection.
Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes.
Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document.
Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them.
Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed.
Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element.
Fixed performance issue with the noneditable plugin where it would enable/disable controls to often.
Version 3.4.3.1 (2011-06-16)
Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin.
Fixed bug where custom buttons were not being rendered correctly when in high contrast mode.
Added support for iOS 5 that now supporting contentEditable in it's latest beta.
Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output.
Fixed bug where custom_elements option wasn't working properly on IE browsers.
Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements.
Fixed bug where attributes with </> wasn't properly encoded as XML entities.
Version 3.4.3 (2011-06-09)
Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location.
Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly.
Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8.
Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs.
Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied.
Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page.
Fixed bug where applying a heading style to a list item would cascade style to children list items.
Fixed bug where Editor loses focus when backspacing and changing styles in WebKit.
Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided.
Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari.
Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk.
Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded.
Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ).
Added possibility to change properties of all table cells in a column.
Added external_image_list option to get images list from user-defined variable or function.
Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome.
Fixed bug where table size inputs were to small for values with size units.
Fixed bug where table cell/row size input values were not validated.
Fixed bug where menu item line-height would be set to wrong value by external styles.
Fixed bug where hasUndo() would return wrong answer.
Fixed bug where page title would be set to undefined by fullpage plugin.
Fixed bug where HTML5 video properties were not updated in embedded media settings.
Fixed bug where HTML comment on the first line would cause an error.
Fixed bug where spellchecker menu was positioned incorrectly on IE.
Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list.
Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped.
Fixed bug where numeric entities with leading zeros would produce incorrect decoding.
Fixed bug where hexadecimal entities wasn't properly decoded.
Fixed bug where bookmarks wasn't properly stored/restored on undo/redo.
Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents.
Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements.
Fixed so contentEditable is used for the body of the editor if it's supported.
Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null.
Fixed performance issue with mceInsertCommand and inserting very simple contents.
Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic.
Fixed performance issue with table plugin where it checked for selected cells to often.
Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers.
Fixed bug where Gecko would remove single paragraphs if there where contents before/after it.
Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin.
Version 3.4.2 (2011-04-07)
Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers.
Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser.
Fixed bug where blocks containing a single anchor element would be treated as empty.
Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed.
Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed.
Fixed bug where image border color/style values were overwritten by advimage plugin.
Fixed bug where setting border in advimage plugin would throw error in IE.
Fixed bug where empty anchors list in link settings wasn't hidden.
Fixed bug where xhtmlextras popups were missing localized popup-size parameters.
Fixed bug where the context menu wouldn't select images on WebKit browsers.
Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior.
Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control.
Fixed bug where contextmenu wasn't disabled on noneditable elements.
Fixed bug where getStyle function would trigger error when called on element without style property.
Fixed bug where editor fail to load if Javascript Compressor was used.
Fixed bug where list-style-type=lower-greek would produce errors in IE<8.
Fixed bug where spellchecker plugin would produce errors on IE6-7.
Fixed bug where theme_advanced_containers configuration option causes error.
Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value.
Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size.
Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog.
Version 3.4.1 (2011-03-24)
Added significantly improved list handling via the new 'lists' plugin.
Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default.
Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color.
Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour.
Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled.
Fixed bug where selection locations on undo/redo didn't work correctly on specific contents.
Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe.
Fixed bug where some ascii numeric entities wasn't properly decoded.
Fixed bug where some non western language codes wasn't properly decoded/encoded.
Fixed bug where undo levels wasn't created when deleting contents on IE.
Fixed bug where the initial undo levels bookmark wasn't updated correctly.
Fixed bug where search/replace wouldn't be scoped to editor instances on IE8.
Fixed bug where IE9 would produce two br elements after block elements when pasting.
Fixed bug where IE would place the caret at an incorrect position after a paste operation.
Fixed bug where a paste operation using the keyboard would add an extra undo level.
Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted.
Fixed bug where the table plugin couldn't correctly handle invalid table structures.
Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin.
Fixed bug where toggle states on some of the list boxes didn't update correctly.
Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10.
Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin.
Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid.
Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme.
Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome.
Fixed bug with references to non-existing images in css of fullpage plugin.
Fixed bug where item could be unselected in spellchecker's language selector.
Fixed bug where some mispelled words could be not highlighted using spellchecker plugin.
Fixed bug where spellchecking would merge some words on IE.
Fixed bug where spellchecker context menu was not always positioned correctly.
Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled.
Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents.
Fixed bug where selecting the whole table would enable table tools for cells and rows.
Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin.
Fixed bug where setting text color in fullpage plugin doesn't work.
Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly.
Fixed bug where black spade suit character was not included in special character selector.
Fixed bug where setting invalid values for table cell size would throw an error in IE.
Fixed bug where spellchecking would remove whitespace characters from PRE block in IE.
Fixed bug where HR was inserted inside P elements instead of splitting them.
Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes.
Fixed bug where bullet lists weren't always detected correctly.
Fixed bug where deleting some paragraphs on IE would cause an exception.
Fixed bug where the json encoder logic wouldn't properly encode \ characters.
Fixed bug where the onChange event would be fired when the editor was first initialized.
Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class.
Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences.
Fixed issue where styles were not included when using the full page plugin.
Fixed issue where drag/drop operations wasn't properly added to the undo levels.
Fixed issue where colors wasn't correctly applied to elements with underline decoration.
Fixed issue where deleting some paragraphs on IE would cause an exception.
Version 3.4 (2011-03-10)
Added accessibility example with various accessibility options contributed by Ephox.
Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin.
Fixed bug where the image.htm had some strange td artifacts probably due to auto merging.
Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method.
Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent.
Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode.
Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode.
Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode.
Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox.
Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme.
Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x.
Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right.
Fixed bug where the formatter would align images when the selection range was collapsed.
Fixed bug where the image button would be active when the selection range was collapsed.
Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic.
Fixed bug where the table cell/row dialogs would produce empty attributes.
Fixed bug where the tfoot wouldn't be added to the top of the table.
Fixed bug where the formatter would merge siblings with white space between them.
Fixed bug where pasting headers and paragraphs would produce an extra paragraph.
Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color.
Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting.
Fixed bug where multiple BR elements at end of block elements where removed.
Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages.
Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode.
Fixed bug where the search/replace plugin wouldn't work correctly on IE 9.
Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox.
Fixed so the values entered in the color picker are forced to hex values.
Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade.
Removed obsolete calls in various plugins to the mceBeginUndoLevel command.

View File

@@ -4,6 +4,6 @@
var tinyMCETemplateList = [
// Name, URL, Description
["Simple snippet", "templates/snippet1.htm", "Simple HTML snippet."],
["Layout", "templates/layout1.htm", "HTML Layout."]
["Simple snippet", "snippet1.htm", "Simple HTML snippet."],
["Layout", "layout1.htm", "HTML Layout."]
];

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -20,7 +20,7 @@ free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
can use it too, but we suggest you first think carefuly about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -395,12 +395,14 @@ var ImageDialog = {
if (v == '0')
img.style.border = isIE ? '0' : '0 none none';
else {
if (b.length == 3 && b[isIE ? 2 : 1])
bStyle = b[isIE ? 2 : 1];
var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);
if (b.length == 3 && b[isOldIE ? 2 : 1])
bStyle = b[isOldIE ? 2 : 1];
else if (!bStyle || bStyle == 'none')
bStyle = 'solid';
if (b.length == 3 && b[isIE ? 0 : 2])
bColor = b[isIE ? 0 : 2];
bColor = b[isOldIE ? 0 : 2];
else if (!bColor || bColor == 'none')
bColor = 'black';
img.style.border = v + 'px ' + bStyle + ' ' + bColor;

View File

@@ -64,13 +64,14 @@ function init() {
if (elm != null && elm.nodeName == "A")
action = "update";
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
setPopupControlsDisabled(true);
if (action == "update") {
var href = inst.dom.getAttrib(elm, 'href');
var onclick = inst.dom.getAttrib(elm, 'onclick');
var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
// Setup form data
setFormValue('href', href);
@@ -98,7 +99,7 @@ function init() {
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
setFormValue('target', linkTarget);
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
// Parse onclick data
@@ -119,7 +120,7 @@ function init() {
addClassesToList('classlist', 'advlink_styles');
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
selectByValue(formObj, 'targetlist', linkTarget, true);
} else
addClassesToList('classlist', 'advlink_styles');
}
@@ -377,6 +378,9 @@ function getAnchorListHTML(id, target) {
for (i=0, len=nodes.length; i<len; i++) {
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';
if ((name = nodes[i].id) != "" && !nodes[i].href)
html += '<option value="#' + name + '">' + name + '</option>';
}
if (html == "")

View File

@@ -0,0 +1 @@
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f>=2?f-2:0);a.setEnd(n,f>=1?f-1:0);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();

View File

@@ -22,15 +22,15 @@
init : function(ed, url) {
var t = this;
// Internet Explorer has built-in automatic linking
if (tinyMCE.isIE)
return;
// Add a key down handler
ed.onKeyDown.add(function(ed, e) {
ed.onKeyDown.addToTop(function(ed, e) {
if (e.keyCode == 13)
return t.handleEnter(ed);
});
});
// Internet Explorer has built-in automatic linking for most cases
if (tinyMCE.isIE)
return;
ed.onKeyPress.add(function(ed, e) {
if (e.which == 41)
@@ -61,7 +61,7 @@
// We need at least five characters to form a URL,
// hence, at minimum, five characters from the beginning of the line.
r = ed.selection.getRng().cloneRange();
r = ed.selection.getRng(true).cloneRange();
if (r.startOffset < 5) {
// During testing, the caret is placed inbetween two text nodes.
// The previous text node contains the URL.
@@ -89,8 +89,11 @@
while (endContainer.nodeType != 3 && endContainer.firstChild)
endContainer = endContainer.firstChild;
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
// Move range to text node
if (endContainer.nodeType == 3) {
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
}
}
if (r.endOffset == 1)
@@ -104,8 +107,8 @@
do
{
// Move the selection one character backwards.
r.setStart(endContainer, end - 2);
r.setEnd(endContainer, end - 1);
r.setStart(endContainer, end >= 2 ? end - 2 : 0);
r.setEnd(endContainer, end >= 1 ? end - 1 : 0);
end -= 1;
// Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
@@ -124,13 +127,19 @@
r.setEnd(endContainer, start);
}
// Exclude last . from word like "www.site.com."
var text = r.toString();
if (text.charAt(text.length - 1) == '.') {
r.setEnd(endContainer, start - 1);
}
text = r.toString();
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
if (matches) {
if (matches[1] == 'www.') {
matches[1] = 'http://www.';
} else if (/@$/.test(matches[1])) {
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
matches[1] = 'mailto:' + matches[1];
}
@@ -139,6 +148,7 @@
ed.selection.setRng(r);
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
ed.selection.moveToBookmark(bookmark);
ed.nodeChanged();
// TODO: Determine if this is still needed.
if (tinyMCE.isWebKit) {

Some files were not shown because too many files have changed in this diff Show More