nefelibata package

Submodules

nefelibata.console module

Nefelibata weblog engine.

Usage:

nb init [ROOT_DIR] [–loglevel=INFO] nb new POST [ROOT_DIR] [–loglevel=INFO] nb build [ROOT_DIR] [-f] [-s POST_DIR] [–no-collect] [–loglevel=INFO] nb preview [-p PORT] [ROOT_DIR] [–loglevel=INFO] nb publish [ROOT_DIR] [-f] [-s POST_DIR] [–loglevel=INFO]

Actions:

init Create a new weblog skeleton. new Create a new post. build Build weblog from Markdown and social media interactions. preview Run SimpleHTTPServer. publish Publish weblog to configured locations and announce new posts.

Options:

-h –help Show this screen. –version Show version. -p PORT Port to run the web server for preview. [default: 8000] -f –force Force build/publishing of up-to-date resources. -s POST_DIR Build/publish a single post by specifying its directory –no-collect Do not collect replies when building. –loglevel=LEVEL Level for logging. [default: INFO]

Released under the MIT license. (c) 2013-2020 Beto Dealmeida <roberto@dealmeida.net>

nefelibata.console.main()None[source]

Main entry point allowing external calls

nefelibata.post module

class nefelibata.post.Post(file_path: pathlib.Path)[source]

Bases: object

property date
save()None[source]

Save post back.

property summary
property title
property up_to_date
update_metadata()None[source]

Automatically generate date and subject headers.

property url
nefelibata.post.get_posts(root: pathlib.Path) → List[nefelibata.post.Post][source]

Return list of posts for a given root directory.

nefelibata.utils module

nefelibata.utils.find_directory(cwd: pathlib.Path)pathlib.Path[source]

Find root of blog, starting from cwd.

The function will traverse up trying to find a configuration file.

nefelibata.utils.get_config(root: pathlib.Path) → Dict[str, Any][source]

Return the configuration file for a weblog.

nefelibata.utils.json_storage(file_path: pathlib.Path) → Iterator[Dict[str, Any]][source]

Open a file and load it as JSON. Save back if modified.

nefelibata.utils.modify_html(file_path: pathlib.Path) → Iterator[bs4.BeautifulSoup][source]

Parse an HTML file to BeautifulSoup. Save back if modified.

nefelibata.utils.sanitize(directory: str)str[source]

Sanitize a post title into a directory name.

nefelibata.utils.setup_logging(loglevel: str)None[source]

Setup basic logging

nefelibata.utils.strip_accents(text: str)str[source]

Module contents