From eaa24c2737de8e944878f10a4b660c9b9c40dbc4 Mon Sep 17 00:00:00 2001 From: Alexandre Magno Date: Tue, 14 Jul 2015 13:44:22 -0300 Subject: [PATCH] Initial tests with testwordpress.py (translations) --- paicemana/testwordpress.py | 22 ++ paicemana/testwordpresscontent.py | 404 ++++++++++++++++++++++++++++++ 2 files changed, 426 insertions(+) create mode 100644 paicemana/testwordpress.py create mode 100644 paicemana/testwordpresscontent.py diff --git a/paicemana/testwordpress.py b/paicemana/testwordpress.py new file mode 100644 index 0000000..b813865 --- /dev/null +++ b/paicemana/testwordpress.py @@ -0,0 +1,22 @@ +import re + +lang = 'Ja' +text = 'My text here' + +src="weekly 256 - 09.06.–15.06.2015semanario 256 - 09.06.–15.06.2015週刊OSM 256 - 09.06.–15.06.2015hebdo 256 - 09.06.–15.06.2015týdeník 256 - 09.06.–15.06.2015edisi minggu 256 - 09.06.–15.06.2015 256 - 09.06.–15.06.2015semanário 256 - 09.06.–15.06.2015Wochennotiz 256 - 09.06.–15.06.2015Săptămânal nr. 256 - 09.06.–15.06.2015" + +from testwordpresscontent import src + +# to negate a word 'bar': '^(?!.*?bar).*' or '^(.(?)(.(?))*?()(.*)$' % lang, # TODO fix for break lines + r'\1\2%s\4\5' % text, + src +) + +print() +print(src) +print() +print(out) +print() diff --git a/paicemana/testwordpresscontent.py b/paicemana/testwordpresscontent.py new file mode 100644 index 0000000..0b75ad0 --- /dev/null +++ b/paicemana/testwordpresscontent.py @@ -0,0 +1,404 @@ +src = """23.06.-29.06.2015 + +[caption id="attachment_11897" align="alignnone" width="640"]Säulendiagramm des Spendenaufkommens, eine Säule pro Tag Donations during the fundraising campaign to finance new hardware for OSM. Chart: Nakaner - data: Frederik Ramm. [1][/caption] +

About us

+ +

Mapping

+ +

Community

+ +

OpenStreetMap Foundation

+ +

Events

+ +

Humanitarian OSM

+ +

Maps

+ +

Open Data

+ +

Licences

+ +

Software

+ +

Did you know …

+ +

Other "geo" things

+

+

23.06.-29.06.2015

+

[caption id="attachment_11897" align="alignnone" width="640"]Säulendiagramm des Spendenaufkommens, eine Säule pro Tag Las donaciones durante la campaña de recaudación para financiar el nuevo hardware de OSM. Gráfico: Nakaner - data: Frederik Ramm[1][/caption]

+

Sobre nosotros

+ +

Mapeando

+ +

Comunidad

+ +

Fundación OpenStreetMap

+ +

Eventos

+ +

OSM Humanitario (HOT)

+ +

Mapas

+ +

Open Data

+ +

Licencias

+ +

Software

+ +

¿Sabías que…

+ +

Otras "geo" cosas

+ +

+

+

23.06.-29.06.2015

+

[caption id="attachment_11897" align="alignnone" width="640"]Säulendiagramm des Spendenaufkommens, eine Säule pro Tag Donations during the fundraising campaign to finance new hardware for OSM. Chart: Nakaner - data: Frederik Ramm. [1][/caption]

+

私たちについて

+ +

マッピング

+ +

コミュニティ

+ +

OpenStreetMap Foundation

+ +

イベント

+ +

OSM人道支援

+ +

地図

+ +

オープンデータ

+ +

ライセンス

+ +

ソフトウェア

+ +

ご存知でしたか?

+ +

その他の "ジオ" な事柄

+ +

+

23.06.‒29.06.2015

+

[caption id="attachment_11897" align="alignnone" width="640"]Doações num gráfico em barras, uma coluna por dia Doações durante a campanha de angariação de fundos para o financiamento de um novo hardware para o OpenStreetMap. Gráfico: Nakaner; Dados: Frederik Ramm. [1][/caption] 

+

Sobre nós

+ +

Mapeamento

+ +

Comunidade

+ +

Fundação OpenStreetMap

+ +

Eventos

+ +

OSM Humanitário

+ +

Mapas

+ +

Dados Abertos

+ +

Licenças

+ +

Software

+ +

Você sabia …

+ +

Outras coisas “geo”

+ +

+

+

Ein Klick entfernt ... die deutsche Wochennotiz

+

+

+"""