Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Denis Salem
VenC
Commits
3a47cd88
Commit
3a47cd88
authored
Feb 15, 2019
by
Denis Salem
Browse files
done with improving prompt output
parent
3ce22f3d
Changes
11
Hide whitespace changes
Inline
Side-by-side
changelog.md
View file @
3a47cd88
# version 1.0.0 Last minute edition :p
DONE | Copy recursively, if necessary, data from extra.
DONE | Copy recursively, if necessary data from assets.
DONE | Copy if necessary data from assets.
DONE | Export RSS recusively (for each thread and sub category thread).
DONE | Copy recursively, if necessary, data from extra.
DONE | Copy recursively, if necessary data from assets.
DONE | Copy if necessary data from assets.
DONE | Export RSS recusively (for each thread and sub category thread).
# version 1.1.0
DONE | Fix wrong association with entry id and entry filename.
DONE | Fix wrong dates listing order.
DONE | Fix categories list input.
DONE | Fix wrong entries sorting when getting latest ID.
DONE | Fix wrong relative path when categories are empty.
DONE | EntryCategoriesTop turns to EntryCategoriesLeafs.
DONE | Make pattern processor recursive.
DONE | IfInThread special pattern must act like if/else statement.
DONE | Notice missing variables in blog_conf.
DONE | Add command to edit and automatically re-export the blog.
DONE | Syntax coloration via pygmentize.
DONE | Must implement weight exploitation for BlogCategoriesLeaf and BlogDates.
DONE | Must support FTP.
DONE | Fix wrong association with entry id and entry filename.
DONE | Fix wrong dates listing order.
DONE | Fix categories list input.
DONE | Fix wrong entries sorting when getting latest ID.
DONE | Fix wrong relative path when categories are empty.
DONE | EntryCategoriesTop turns to EntryCategoriesLeafs.
DONE | Make pattern processor recursive.
DONE | IfInThread special pattern must act like if/else statement.
DONE | Notice missing variables in blog_conf.
DONE | Add command to edit and automatically re-export the blog.
DONE | Syntax coloration via pygmentize.
DONE | Must implement weight exploitation for BlogCategoriesLeaf and BlogDates.
DONE | Must support FTP.
# version 1.1.1
DONE | Fix entries skipping.
DONE | Remove BlogCategoriesLeafs.
DONE | Fix wrong dates sorting.
DONE | Implement weight exploitation for BlogCategories anf fix mess with RecursiveFor.
DONE | Sort entries in categories tree.
DONE | Add verbose when export blog
DONE | Notice malformed entries.
DONE | Fix entries skipping.
DONE | Remove BlogCategoriesLeafs.
DONE | Fix wrong dates sorting.
DONE | Implement weight exploitation for BlogCategories anf fix mess with RecursiveFor.
DONE | Sort entries in categories tree.
DONE | Add verbose when export blog
DONE | Notice malformed entries.
# version 1.1.2
DONE | Fix entries from RSS feed order.
DONE | Add relativeLocation .:Get::RelativeLocation:.
DONE | Turns EntryCategoriesLeafs to EntryCategoriesLeaves.
DONE | Fix entries from RSS feed order.
DONE | Add relativeLocation .:Get::RelativeLocation:.
DONE | Turns EntryCategoriesLeafs to EntryCategoriesLeaves.
# version 1.2.0
DONE | Fix CodeHighlight and markdown collision.
DONE | Fix wrong line number with codehighlight.
DONE | Add more verbose on corrupt Entry. Stop nicely.
DONE | Fix empty entry creation when passing wrong or none template.
DONE | Add custom metadata to entries. CSS and doNotUseMarkdown.
DONE | Add remote copy commande.
DONE | Make markdown optional.
DONE | Fix parsing when reading template.
DONE | Print errors when pattern processor fail.
DONE | Add -h commande to print reminder
DONE | Add english language.
DONE | Clean blog folder on compilation.
DONE | Fix documentation about .:PagesList:.
DONE | Fix Entry tags index out of range.
DONE | Print ressource and current string when pattern processor fail.
DONE | Fix infinite scroll : opacity transition and loading image issue. Upgrade the whole plugin :).
DONE | Fix index_file_name issue: GetPreviousPage and GetNextPage were ignoring blog_configuration.yaml value.
DONE | GetPrevious and GetNextPage should work outside thread.
DONE | Optimize I/O stream.
DONE | Optimize pattern processor to get it twice faster.
DONE | Installation via pypi.
DONE | Add some themes.
DONE | Choose theme to apply while export.
DONE | Display available themes.
DONE | Modified default blog_configuration structure, replace url by blog_url.
DONE | Fix dummy theme.
DONE | Fix edit-and-export NoneType error.
DONE | Fix CodeHighlight and markdown collision.
DONE | Fix wrong line number with codehighlight.
DONE | Add more verbose on corrupt Entry. Stop nicely.
DONE | Fix empty entry creation when passing wrong or none template.
DONE | Add custom metadata to entries. CSS and doNotUseMarkdown.
DONE | Add remote copy commande.
DONE | Make markdown optional.
DONE | Fix parsing when reading template.
DONE | Print errors when pattern processor fail.
DONE | Add -h commande to print reminder
DONE | Add english language.
DONE | Clean blog folder on compilation.
DONE | Fix documentation about .:PagesList:.
DONE | Fix Entry tags index out of range.
DONE | Print ressource and current string when pattern processor fail.
DONE | Fix infinite scroll : opacity transition and loading image issue. Upgrade the whole plugin :).
DONE | Fix index_file_name issue: GetPreviousPage and GetNextPage were ignoring blog_configuration.yaml value.
DONE | GetPrevious and GetNextPage should work outside thread.
DONE | Optimize I/O stream.
DONE | Optimize pattern processor to get it twice faster.
DONE | Installation via pypi.
DONE | Add some themes.
DONE | Choose theme to apply while export.
DONE | Display available themes.
DONE | Modified default blog_configuration structure, replace url by blog_url.
DONE | Fix dummy theme.
DONE | Fix edit-and-export NoneType error.
# version 1.2.1
DONE | Fix wrong css style name on C++.
DONE | Fix key errors in templates.
DONE | Fix wrong parsing with semi-colon on CodeHighlight.
DONE | Warn about possible missing code highlight CSS.
DONE | Install theme command.
DONE | Fix wrong css style name on C++.
DONE | Fix key errors in templates.
DONE | Fix wrong parsing with semi-colon on CodeHighlight.
DONE | Warn about possible missing code highlight CSS.
DONE | Install theme command.
# version 2.0.0
DONE | Subprocess call catch exception.
DONE | Subprocess support args.
DONE | Remove extra newlines from PrintThemes.
DONE | Print nicer warnings when found unknown values in chunks.
DONE | Notify when found invalid entry filename in entries folder.
DONE | Remove CSS field from entry.
DONE | Catch exception when Yaml cannot parse blog configuration.
DONE | Hardcoded opening,closing and separator symbols in pattern processor.
DONE | Add a copyright notice and term of use in each source files.
DONE | Warn about missing mandatory field in entry.
DONE | Add function GetBlogMetadataIfExists and GetEntryMetadataIfExists.
DONE | Catch exception nicely in CodeHighLight.
DONE | Catch KeyError exception due to wrong blog path configuration.
DONE | Moar comments in the code.
DONE | No more awkward silence when something is successfully done.
DONE | Add more coloration for message!
DONE | Specify where error occurs when parsing patterns.
DONE | More verbosity about wrong pattern arguments.
DONE | More verbosity about malformed entry.
DONE | Clear white spaces in error messages.
DONE | Implement RelativeLocation.
DONE | Optimisation of categories tree.
DONE | Code should be a little bit more PEP 8 compliant.
DONE | Handle currentLocale = locale.getlocale()[0].split('_')[0] AttributeError: 'NoneType'.
DONE | Clean up installation.
DONE | Add random number generator.
DONE | Add function Include. (Add a directory force included ressources)
DONE | Create theme folder if missing while setup new theme.
DONE | Auto include CodeHighlight CSS.
DONE | Add CodeHighlight css override option in blog configuration.
DONE | Raise error if unknown markup language required.
DONE | Fix markup language collision AGAIN...
DONE | Massive refactorisation, code cleaning and optimisation.
DONE | Fix pattern recursion issue (CodeHighlight).
DONE | Fix vertical scroll bar in code snippet.
DONE | Adding Tex math to mathml support (depend on latex2mathml)
DONE | Add reStructuredText support, remove do_not_use_markdown option.
DONE | Improve reStructuredText integration with VenC.
DONE | Quit gracefully when ftp timeout error.
DONE | add entry preview / full content.
DONE | Support for video.
DONE | Support for audio.
DONE | Optimise entries access with linked list.
DONE | Add more specific pattern to detect location (IfInCategories,IfInArchives,IfInFirstPage, etc).
DONE | Fix: Import asset from external theme if necessary.
DONE | Export empty blog.
DONE | Allow disabling exportation of specific kind of thread.
DONE | Add categories tree in entry.
DONE | Remove illegal character from paths.
DONE | Add support for embed content (oEmbed).
DONE | Add custom subfolders.
DONE | Add GetRootPage.
DONE | Add SetColor.
DONE | Split install and blog creation chapter in tutorial.
DONE | Fix prevent crash from invalid entry id.
DONE | Support for migration.
DONE | Catch UnicodeEncodeError.
DONE | Serv page.
DONE | Replace python-markdown by markdown2.
DONE | Replace white spaces in url by dashes.
DONE | Add support for Atom feed.
DONE | Add blog generation timestamp.
DONE | Split unit-test from main branch
DONE | Subprocess call catch exception.
DONE | Subprocess support args.
DONE | Remove extra newlines from PrintThemes.
DONE | Print nicer warnings when found unknown values in chunks.
DONE | Notify when found invalid entry filename in entries folder.
DONE | Remove CSS field from entry.
DONE | Catch exception when Yaml cannot parse blog configuration.
DONE | Hardcoded opening,closing and separator symbols in pattern processor.
DONE | Add a copyright notice and term of use in each source files.
DONE | Warn about missing mandatory field in entry.
DONE | Add function GetBlogMetadataIfExists and GetEntryMetadataIfExists.
DONE | Catch exception nicely in CodeHighLight.
DONE | Catch KeyError exception due to wrong blog path configuration.
DONE | Moar comments in the code.
DONE | No more awkward silence when something is successfully done.
DONE | Add more coloration for message!
DONE | Specify where error occurs when parsing patterns.
DONE | More verbosity about wrong pattern arguments.
DONE | More verbosity about malformed entry.
DONE | Clear white spaces in error messages.
DONE | Implement RelativeLocation.
DONE | Optimisation of categories tree.
DONE | Code should be a little bit more PEP 8 compliant.
DONE | Handle currentLocale = locale.getlocale()[0].split('_')[0] AttributeError: 'NoneType'.
DONE | Clean up installation.
DONE | Add random number generator.
DONE | Add function Include. (Add a directory force included ressources)
DONE | Create theme folder if missing while setup new theme.
DONE | Auto include CodeHighlight CSS.
DONE | Add CodeHighlight css override option in blog configuration.
DONE | Raise error if unknown markup language required.
DONE | Fix markup language collision AGAIN...
DONE | Massive refactorisation, code cleaning and optimisation.
DONE | Fix pattern recursion issue (CodeHighlight).
DONE | Fix vertical scroll bar in code snippet.
DONE | Adding Tex math to mathml support (depend on latex2mathml)
DONE | Add reStructuredText support, remove do_not_use_markdown option.
DONE | Improve reStructuredText integration with VenC.
DONE | Quit gracefully when ftp timeout error.
DONE | add entry preview / full content.
DONE | Support for video.
DONE | Support for audio.
DONE | Optimise entries access with linked list.
DONE | Add more specific pattern to detect location (IfInCategories,IfInArchives,IfInFirstPage, etc).
DONE | Fix: Import asset from external theme if necessary.
DONE | Export empty blog.
DONE | Allow disabling exportation of specific kind of thread.
DONE | Add categories tree in entry.
DONE | Remove illegal character from paths.
DONE | Add support for embed content (oEmbed).
DONE | Add custom subfolders.
DONE | Add GetRootPage.
DONE | Add SetColor.
DONE | Split install and blog creation chapter in tutorial.
DONE | Fix prevent crash from invalid entry id.
DONE | Support for migration.
DONE | Catch UnicodeEncodeError.
DONE | Serv page.
DONE | Replace python-markdown by markdown2.
DONE | Replace white spaces in url by dashes.
DONE | Add support for Atom feed.
DONE | Add blog generation timestamp.
DONE | Split unit-test from main branch
DONE | Support ForPage in entries thread.
DONE | Update command help with.
DONE | Handle ftp encoding error.
DONE | Sort by metadata.
DONE | Speed up blog exportation (almost nine times faster!).
DONE | Escape patterns.
DONE | Chapters engine.
DONE | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
DONE | Infinite scroll use html anchor instead of harcoded indexing.
DONE | Prevent Infinite scroll to block when ressource isn't available.
DONE | Rewrite pattern processor unit tests.
DONE | fix FAQ latex2mathml is incomplete.
DONE | fix FAQ categories separator is ' > ', not '>'
DONE | fix FAQ subfolders must not start with '/'
DONE | fix FAQ https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting.
DONE | Update command help with.
DONE | Handle ftp encoding error.
DONE | Sort by metadata.
DONE | Speed up blog exportation (almost nine times faster!).
DONE | Escape patterns.
DONE | Chapters engine.
DONE | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
DONE | Infinite scroll use html anchor instead of harcoded indexing.
DONE | Prevent Infinite scroll to block when ressource isn't available.
DONE | Rewrite pattern processor unit tests.
DONE | fix FAQ latex2mathml is incomplete.
DONE | fix FAQ categories separator is ' > ', not '>'
DONE | fix FAQ subfolders must not start with '/'
DONE | fix FAQ https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting.
DONE | Refactor DatesThread to ArchivesThread.
TODO | Add definition for optional fields in blog configuration .
TODO | Open with navigator manual.
TODO | Client-side search engine.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
TODO | Add relevant templates for themes.
WIP | Change nomenclature: Most of the usual patterns are changed. Fix doc.
TODO | Add definition for optional fields in blog configuration.
TODO | Open with navigator manual.
WIP | Client-side search engine.
WIP | Semantic-web features.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
TODO | Add relevant templates for themes.
WIP | Change nomenclature: Most of the usual patterns are changed. Fix doc.
# version 2.x.x
TODO | Add support for access metadata by key.
TODO | Make some dependencies optional.
TODO | Split themes from main branch
TODO | Add translation for Deutsch and Spanish.
TODO | Add ForMetadata, ForMetadataIfExists
TODO | Add docutils reStructuredText parser settings override.
TODO | Decrease halt_level to render reStructuredText even if errors occurs.
TODO | Access {count} and {weight} from LeavesForEntrycategories.
TODO | Add Yaml comments in blog configuration.
TODO | Catch invalid encoding at startup.
TODO | Add nice 404 errors page.
TODO | Improve Feed.
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex.
TODO | Warn about entry title duplicates.
TODO | Handle missing args in case of unknown number of args (Pattern).
TODO | Add configuration field type check.
TODO | Optimize modules importation.
TODO | Concatenate user defined blog keywords with entries keywords.
TODO | Add more informations into JSON-LD document.
TODO | Optimize JSON-LD processing.
TODO | Embed as much as possible microdata/JSON-LD into blog.
TODO | Make some dependencies optional.
TODO | Split themes from main branch
TODO | Add translation for Deutsch and Spanish.
TODO | Add ForMetadata, ForMetadataIfExists
TODO | Add docutils reStructuredText parser settings override.
TODO | Decrease halt_level to render reStructuredText even if errors occurs.
TODO | Access {count} and {weight} from LeavesForEntrycategories.
TODO | Add Yaml comments in blog configuration.
TODO | Catch invalid encoding at startup.
TODO | Add nice 404 errors page.
TODO | Improve Feed.
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex.
TODO | Warn about entry title duplicates.
TODO | Handle missing args in case of unknown number of args (Pattern).
TODO | Add configuration field type check.
TODO | Optimize modules importation.
TODO | Concatenate user defined blog keywords with entries keywords.
TODO | Add more informations into JSON-LD document.
TODO | Optimize JSON-LD processing.
TODO | Embed as much as possible microdata/JSON-LD into blog.
TODO | Automatically add entries categories to entries tags.
# version 3.x.x
TODO | Add support for plugin.
TODO | Add Incremental blog update.
TODO | Add support for plugin.
TODO | Add Incremental blog update.
TODO | Add support for blog within blog.
TODO | Add support for single page.
src/venc2/commands/export.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -163,7 +163,7 @@ def export_blog(argv=list()):
processor
.
blacklist
.
append
(
"Escape"
)
notify
(
messages
.
pre_process
)
notify
(
"├─ "
+
messages
.
pre_process
)
# Now we want to perform first parsing pass on entries and chunk
for
entry
in
datastore
.
get_entries
():
...
...
@@ -227,7 +227,7 @@ def export_blog(argv=list()):
thread
.
do
()
# Copy assets and extra files
notify
(
'└─ '
+
messages
.
copy_assets_and_extra_files
)
code_highlight
.
export_style_sheets
()
copy_recursively
(
"extra/"
,
"blog/"
)
copy_recursively
(
theme_folder
+
"assets/"
,
"blog/"
)
...
...
src/venc2/datastore/__init__.py
View file @
3a47cd88
...
...
@@ -38,7 +38,7 @@ def merge(iterable, argv):
class
DataStore
:
def
__init__
(
self
):
notify
(
messages
.
loading_data
)
notify
(
"┌─ "
+
messages
.
loading_data
)
self
.
blog_configuration
=
get_blog_configuration
()
self
.
sort_by
=
self
.
blog_configuration
[
"sort_by"
]
self
.
enable_jsonld
=
self
.
blog_configuration
[
"enable_jsonld"
]
...
...
src/venc2/l10n/en.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -102,3 +102,4 @@ class Messages:
chapter_already_exists
=
"Chapters
\"
{0}
\"
(id = {1}) and
\"
{2}
\"
(id = {3}) have the same index
\"
{4}
\"
."
malformed_escape_patterns_missing_opening_symbols
=
"Malformed escaping patterns in
\"
{0}
\"
: One or more opening symbols are missing."
malformed_escape_patterns_missing_closing_symbols
=
"Malformed escaping patterns in
\"
{0}
\"
: One or more closing symbols are missing."
copy_assets_and_extra_files
=
"Copying extra files..."
src/venc2/l10n/fr.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -100,5 +100,5 @@ class Messages:
chapter_already_exists
=
"Les chapitres
\"
{0}
\"
(id = {1}) et
\"
{2}
\"
(id = {3}) ont le même index
\"
{4}
\"
."
malformed_escape_patterns_missing_opening_symbols
=
"Motifs d'échappement mal formés dans
\"
{0}
\"
: Il manque un ou plusieurs symboles d'ouverture."
malformed_escape_patterns_missing_closing_symbols
=
"Motifs d'échappement mal formés dans
\"
{0}
\"
: Il manque un ou plusieurs symboles de fermeture."
copy_assets_and_extra_files
=
"Copie des fichiers additionelles..."
src/venc2/threads/__init__.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -32,7 +32,7 @@ class Thread:
self
.
datastore
=
datastore
# Notify wich thread is processed
if
prompt
!=
""
:
notify
(
prompt
)
notify
(
"├─ "
+
prompt
)
self
.
forbidden
=
forbidden
self
.
entries_per_page
=
int
(
datastore
.
blog_configuration
[
"entries_per_pages"
])
...
...
src/venc2/threads/archives.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -34,11 +34,18 @@ class ArchivesThread(Thread):
return
argv
[
0
].
strip
()
def
do
(
self
):
for
thread
in
self
.
datastore
.
entries_per_dates
:
len_archives
=
len
(
self
.
datastore
.
entries_per_dates
)
for
i
in
range
(
0
,
len_archives
):
thread
=
self
.
datastore
.
entries_per_dates
[
i
]
if
thread
.
value
in
self
.
disable_threads
:
continue
notify
(
"
\t
"
+
thread
.
value
+
"..."
)
if
i
==
len_archives
-
1
:
tree_special_char
=
'└'
else
:
tree_special_char
=
'├'
notify
(
"│
\t
"
+
tree_special_char
+
"─ "
+
thread
.
value
+
"..."
)
self
.
export_path
=
str
(
"blog/"
+
self
.
sub_folders
+
'/'
+
thread
.
value
+
'/'
).
replace
(
' '
,
'-'
)
os
.
makedirs
(
self
.
export_path
)
self
.
organize_entries
([
...
...
src/venc2/threads/categories.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -26,7 +26,7 @@ from venc2.threads import Thread
class
CategoriesThread
(
Thread
):
def
__init__
(
self
,
prompt
,
datastore
,
theme
,
patterns
,
forbidden
):
super
().
__init__
(
prompt
,
datastore
,
theme
,
patterns
,
forbidden
)
self
.
indentation_level
=
"│ "
self
.
filename
=
self
.
datastore
.
blog_configuration
[
"path"
][
"index_file_name"
]
self
.
export_path
=
"blog/"
+
self
.
datastore
.
blog_configuration
[
"path"
][
"categories_sub_folders"
]
+
'/'
self
.
relative_origin
=
""
...
...
@@ -49,12 +49,20 @@ class CategoriesThread(Thread):
def
do
(
self
,
root
=
None
):
if
root
==
None
:
root
=
self
.
datastore
.
entries_per_categories
for
node
in
root
:
len_root
=
len
(
root
)
for
i
in
range
(
0
,
len_root
):
node
=
root
[
i
]
if
node
.
value
in
self
.
disable_threads
:
continue
notify
(
"
\t
"
+
node
.
value
+
"..."
)
if
i
==
len_root
-
1
:
tree_special_char
=
'└'
else
:
tree_special_char
=
'├'
notify
(
self
.
indentation_level
+
tree_special_char
+
"─ "
+
node
.
value
+
"..."
)
export_path
=
self
.
export_path
self
.
export_path
+=
str
(
node
.
value
+
'/'
).
replace
(
' '
,
'-'
)
...
...
@@ -69,15 +77,25 @@ class CategoriesThread(Thread):
# Get entries
entries
=
[
self
.
datastore
.
entries
[
entry_index
]
for
entry_index
in
node
.
related_to
]
self
.
organize_entries
(
entries
[::
-
1
]
if
self
.
datastore
.
blog_configuration
[
"reverse_thread_order"
]
else
entries
)
super
().
do
()
entries
=
sorted
(
entries
,
key
=
lambda
entry
:
entry
.
id
,
reverse
=
True
)[
0
:
self
.
datastore
.
blog_configuration
[
"feed_lenght"
]]
if
i
==
len_root
-
1
:
tree_special_char
=
' '
else
:
tree_special_char
=
'│'
if
not
self
.
disable_rss_feed
:
self
.
rss_feed
.
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
)
self
.
rss_feed
.
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
,
self
.
indentation_level
+
tree_special_char
+
' '
,
'├'
if
not
self
.
disable_atom_feed
or
len
(
node
.
childs
)
else
'└'
)
if
not
self
.
disable_atom_feed
:
self
.
atom_feed
.
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
)
self
.
atom_feed
.
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
,
self
.
indentation_level
+
tree_special_char
+
' '
,
'├'
if
len
(
node
.
childs
)
else
'└'
)
if
len_root
-
1
==
i
:
self
.
indentation_level
+=
" "
else
:
self
.
indentation_level
+=
"│ "
self
.
do
(
root
=
node
.
childs
)
self
.
indentation_level
=
self
.
indentation_level
[:
-
3
]
# Restore path
self
.
export_path
=
export_path
...
...
src/venc2/threads/entries.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
src/venc2/threads/feed.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -38,8 +38,8 @@ class FeedThread(Thread):
self
.
in_thread
=
True
self
.
content_type
=
feed_type
def
do
(
self
,
entries
,
export_path
,
relative_origin
):
notify
(
"│
\t
└
─ "
+
getattr
(
messages
,
"generating_"
+
self
.
content_type
))
def
do
(
self
,
entries
,
export_path
,
relative_origin
,
indentation_level
,
tree_special_char
):
notify
(
indentation_level
+
' '
+
tree_special_char
+
"
─ "
+
getattr
(
messages
,
"generating_"
+
self
.
content_type
))
self
.
export_path
=
export_path
self
.
relative_origin
=
relative_origin
self
.
organize_entries
(
entries
)
...
...
src/venc2/threads/main.py
View file @
3a47cd88
#! /usr/bin/python3
# Copyright 2016, 201
8
Denis Salem
# Copyright 2016, 201
9
Denis Salem
#
# This file is part of VenC.
#
...
...
@@ -48,10 +48,10 @@ class MainThread(Thread):
from
venc2.threads.feed
import
FeedThread
if
not
disable_atom_feed
:
FeedThread
(
datastore
,
theme
,
patterns
,
forbidden
,
"atom"
).
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
)
FeedThread
(
datastore
,
theme
,
patterns
,
forbidden
,
"atom"
).
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
,
"│ "
,
'└'
if
disable_atom_feed
else
'├'
)
if
not
disable_rss_feed
:
FeedThread
(
datastore
,
theme
,
patterns
,
forbidden
,
"rss"
).
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
)
FeedThread
(
datastore
,
theme
,
patterns
,
forbidden
,
"rss"
).
do
(
entries
,
self
.
export_path
,
self
.
relative_origin
,
"│ "
,
'└'
)
def
get_feed_entries
(
self
):
entries
=
[]
...
...
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