Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spip2pelican
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
groupe-calcul
spip2pelican
Commits
122b3455
Unverified
Commit
122b3455
authored
Nov 13, 2018
by
Roland Denis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverting changes on create_spip_article_clean.py
parent
8d5410aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
create_spip_article_clean.py
create_spip_article_clean.py
+1
-6
No files found.
create_spip_article_clean.py
View file @
122b3455
...
@@ -86,12 +86,7 @@ with open("./spip_yml/spip_articles.yml", 'r') as stream:
...
@@ -86,12 +86,7 @@ with open("./spip_yml/spip_articles.yml", 'r') as stream:
regex
=
re
.
compile
(
f
'(
{
r
}
.*)'
)
regex
=
re
.
compile
(
f
'(
{
r
}
.*)'
)
lines
=
regex
.
sub
(
remove
,
lines
)
lines
=
regex
.
sub
(
remove
,
lines
)
#lines = lines.encode('iso-8859-1', 'utf8').decode('utf-8', 'mixed')
lines
=
lines
.
encode
(
'iso-8859-1'
,
'utf8'
).
decode
(
'utf-8'
,
'mixed'
)
import
ftfy
lines
=
ftfy
.
fix_encoding
(
lines
)
with
open
(
"tmp.yml"
,
"w"
)
as
fout
:
fout
.
write
(
lines
)
y
=
yaml
.
load
(
clean_titles
(
strip_invalid
(
lines
)))
y
=
yaml
.
load
(
clean_titles
(
strip_invalid
(
lines
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment