=====================
Pelican Microblogging
=====================
*A Pelican plugin providing "microblogging" capabilities.*
.. image:: https://img.shields.io/pypi/v/minchin.pelican.readers.microblog.svg?style=flat
:target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/
:alt: PyPI version number
.. image:: https://img.shields.io/badge/-Changelog-success
:target: https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/CHANGELOG.rst
:alt: Changelog
.. image:: https://img.shields.io/pypi/pyversions/minchin.pelican.readers.microblog?style=flat
:target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/
:alt: Supported Python version
.. image:: https://img.shields.io/pypi/l/minchin.pelican.readers.microblog.svg?style=flat&color=green
:target: https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/LICENSE.txt
:alt: License
.. image:: https://img.shields.io/pypi/dm/minchin.pelican.readers.microblog.svg?style=flat
:target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/
:alt: Download Count
Quickstart
----------
1. Install the plugin via pip: ``pip install
minchin.pelican.readers.microblogging``
2. Generally, the plugin should be loaded and configured automatically without
further effort on your part.
3. Create a ``micro`` folder in your content folder (to hold your micro blog
posts!).
4. Create a new post in your ``micro`` folder. This can be generally be just
the text (body) of your post. In terms of metadata, ``title`` is unneeded
(and ignored), ``slug`` will be auto-generated (based on the post date), and
``date`` will determined from the file creation datetime of the post file.
If you provide the ``date``, it must be on the first line, in ``key: value``
format. The text body will be read as Markdown (so plain text effectively
works too)!
5. Regenerate your Pelican site!
Sample (Micro) Post File
------------------------
.. code-block:: md
<!-- ./content/micro/202307091701.md -->
date: 2023-07-09 17:01+0600
I'm microblogging with Pelican!
https://blog.minchin.ca/label/microblogging-pelican
Or a post with an image:
.. code-block:: md
<!-- ./content/micro/202307112138.md -->
date: 2023-07-11 21:38-0600
image: images/birger-strahl-olI66vtMgNo-unsplash.jpg
Microblog posts can have "feature" images too! (URL of photo should
automatically be added.)
The image path is relative to your ``content`` folder. A URL of the photo is
added to the end of the post as well.
Or with tags (or hashtags):
.. code-block:: md
<!-- ./content/micro/202307131456.md -->
date: 2023-07-13 14:56 -0600
tags: Python, Pelican, Microblogging
I'm now Microblogging with Pelican!
This will add links at the end of your post to the tags to the tag page for
your (Pelican) site.
For now, it does not pull tags out of the body of your post.
Background Notes (on Micro Blogging)
------------------------------------
Microblogging is here considered to be blog posts, but very short in length.
The most common example is Twitter, with an original limit of 140 characters
(to be less than the SMS max of 160 characters). Twitter has since doubled
their limit to 280 characters. The default on Mastodon is 500 characters, the
same as (newly released) Threads. (Note that on Twitter, all links are run
through a shortener and so are considered 23 characters long.) Here, the
default soft limit is 140 characters. You can choose to ignore that, or set a
higher limit (via ``MICROBLOG_MAX_LENGTH``), but there are certain assumptions
about presentation that start to fail as the posts get longer....
Installation
------------
The easiest way to installed *Microblogging* is through ``pip``:
.. code-block:: sh
pip install minchin.pelican.reader.microblog
Requirements
------------
*Microblogging* relies on Pelican, and the ``autoloader`` plugin (for
autoloading). If this plugin is installed from PyPI, these should automatically
be installed.
if you need to insrall them manually:
.. code-block:: sh
pip install pelican
pip install minchin.pelican.plugins.autoloader
Additional Images
-----------------
Micro blog post, using the Seafoam theme:
(Placeholder image for the moment...)
.. image:: https://github.com/MinchinWeb/seafoam/raw/master/docs/screenshots/2.6.0/article_with_header.png
:align: center
:alt: Replace Image...
Pelican Settings
----------------
These settings can be set in your ``pelicanconf.py`` file (your Pelican settings
file) to alter the behavior of the plugin.
If a value is given below, this represents the effective default value. If no
value is given, the effective default value is ``None``.
*Microblogging* also auto-configures itself when possible. If you need to
manually create the default configuration, you would need the following:
.. code-block:: python
# pelicanconf.py
# if PLUGINS is not defined on Pelican 4.5+, these plugins will autoload
PLUGINS = [
"minchin.pelican.readers.microblog",
# others, as desired...
]
# the rest of the your configuration file...
This documentation has to be manually updated. If the settings no longer match
the plugin's behavior, or a setting is missing from here, please open a ticket
on `GitHub
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues>`_.
.. use the ".. data::" directive here for Sphinx output, but on GitHub, that just causes everything to disappear
MICROBLOG_FOLDER = "micro"
Folder containing your micro blog posts, relative to your content root.
MICROBLOG_MAX_LENGTH = 140
How long should your micro blog posts ve limited to. Pelican will emit a
warning if you exceed this.
MICROBLOG_SAVE_AS = ARTICLE_SAVE_AS
What to save the micro blog posts output file as. Defaults to using the same
file structure as you are using for articles. c.f. ``MICROBLOG_URL``.
MICROBLOG_SLUG = "u{date:%Y%m%d%H%M}"
The slug that will be used for micro blog posts. Eg. ``u202307091701``.
Note that Pelican expects slugs to be universally unique.
MICROBLOG_URL = ARTICLE_URL
What URL to post the micro blog posts to. Defaults to using the same URL
structure as you are using for articles. c.f. ``MICROBLOG_SAVE_AS``.
Integration with Themes
-----------------------
For best support, you will need to modify your theme, or select a theme that
already supports *Microblogging*, like my `seafoam
<http://blog.minchin.ca/label/seafoam/>`_.
Some helpful notes:
- Microblog posts are considered ``Articles`` by Pelican, and will be included
in the ``articles`` and ``dates`` "lists".
- Microblog posts all have ``article.micro = True``.
- Microblog posts are added to the ``µ`` category.
- Generally, you'll want to disregard and now show the title of the microblog
post. The title is set to the slug.
- Because of their short length, it may make sense to display the whole body
(``article.content``) in places that a link via the title of the article is
typically shown.
Changelog
---------
`Changelog <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/CHANGELOG.rst>`_
Roadmap
-------
These are features that I would like to eventually add to the plugin (and the
issues I'm using to track their progress):
- `Issue 1
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/1>`_
-- count links as 23 characters (*Ã la* Twitter)
- `Issue 2
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/2>`_
-- process ReST microblog posts
- `Issue 3
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/3>`_
-- CLI command to create microposts
- `Issue 4
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/4>`_
-- add link previews
- `Issue 5
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/5>`_
-- show (if applicable) that this is a reply to something (or a "re-tweet")
- `Issue 6
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/6>`_
-- show replies to each post (borrow the comment setup?)
- `Issue 7
<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/7>`_
-- automatically add hashtags as (Pelican) tags
Pull Requests to implement any of these are welcomed!
- [x] update Seafoam theme
- [x] make sorting work for microblog posts
Known Issues
------------
- Processing relies on Pelican's built-in Markdown reader.
- The length of links to featured images will change if the ``SITE_URL``
changes. This can mean that the microblog post is "short" enough when
reviewing your site locally, but not when the site is generated for
publication.
.. Credits
Raw data
{
"_id": null,
"home_page": "http://blog.minchin.ca/label/microblog-pelican/",
"name": "minchin.pelican.readers.microblog",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "W. Minchin",
"author_email": "w_minchin@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/73/e7/cdc56ce2a2f143cdd085850cc3a75dfe69d2d1d2d20f37f2f129531e1d93/minchin.pelican.readers.microblog-1.1.0.tar.gz",
"platform": "any",
"description": "=====================\r\nPelican Microblogging\r\n=====================\r\n\r\n*A Pelican plugin providing \"microblogging\" capabilities.*\r\n\r\n.. image:: https://img.shields.io/pypi/v/minchin.pelican.readers.microblog.svg?style=flat\r\n :target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/\r\n :alt: PyPI version number\r\n\r\n.. image:: https://img.shields.io/badge/-Changelog-success\r\n :target: https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/CHANGELOG.rst\r\n :alt: Changelog\r\n\r\n.. image:: https://img.shields.io/pypi/pyversions/minchin.pelican.readers.microblog?style=flat\r\n :target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/\r\n :alt: Supported Python version\r\n\r\n.. image:: https://img.shields.io/pypi/l/minchin.pelican.readers.microblog.svg?style=flat&color=green\r\n :target: https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/LICENSE.txt\r\n :alt: License\r\n\r\n.. image:: https://img.shields.io/pypi/dm/minchin.pelican.readers.microblog.svg?style=flat\r\n :target: https://pypi.python.org/pypi/minchin.pelican.readers.microblog/\r\n :alt: Download Count\r\n\r\nQuickstart\r\n----------\r\n\r\n1. Install the plugin via pip: ``pip install\r\n minchin.pelican.readers.microblogging``\r\n2. Generally, the plugin should be loaded and configured automatically without\r\n further effort on your part.\r\n3. Create a ``micro`` folder in your content folder (to hold your micro blog\r\n posts!).\r\n4. Create a new post in your ``micro`` folder. This can be generally be just\r\n the text (body) of your post. In terms of metadata, ``title`` is unneeded\r\n (and ignored), ``slug`` will be auto-generated (based on the post date), and\r\n ``date`` will determined from the file creation datetime of the post file.\r\n If you provide the ``date``, it must be on the first line, in ``key: value``\r\n format. The text body will be read as Markdown (so plain text effectively\r\n works too)!\r\n5. Regenerate your Pelican site!\r\n\r\nSample (Micro) Post File\r\n------------------------\r\n\r\n.. code-block:: md\r\n\r\n <!-- ./content/micro/202307091701.md -->\r\n\r\n date: 2023-07-09 17:01+0600\r\n\r\n I'm microblogging with Pelican!\r\n https://blog.minchin.ca/label/microblogging-pelican\r\n\r\nOr a post with an image:\r\n\r\n.. code-block:: md\r\n\r\n <!-- ./content/micro/202307112138.md -->\r\n\r\n date: 2023-07-11 21:38-0600\r\n image: images/birger-strahl-olI66vtMgNo-unsplash.jpg\r\n\r\n Microblog posts can have \"feature\" images too! (URL of photo should\r\n automatically be added.)\r\n\r\nThe image path is relative to your ``content`` folder. A URL of the photo is\r\nadded to the end of the post as well.\r\n\r\nOr with tags (or hashtags):\r\n\r\n.. code-block:: md\r\n\r\n <!-- ./content/micro/202307131456.md -->\r\n\r\n date: 2023-07-13 14:56 -0600\r\n tags: Python, Pelican, Microblogging\r\n\r\n I'm now Microblogging with Pelican!\r\n\r\n\r\nThis will add links at the end of your post to the tags to the tag page for\r\nyour (Pelican) site.\r\n\r\nFor now, it does not pull tags out of the body of your post.\r\n\r\nBackground Notes (on Micro Blogging)\r\n------------------------------------\r\n\r\nMicroblogging is here considered to be blog posts, but very short in length.\r\n\r\nThe most common example is Twitter, with an original limit of 140 characters\r\n(to be less than the SMS max of 160 characters). Twitter has since doubled\r\ntheir limit to 280 characters. The default on Mastodon is 500 characters, the\r\nsame as (newly released) Threads. (Note that on Twitter, all links are run\r\nthrough a shortener and so are considered 23 characters long.) Here, the\r\ndefault soft limit is 140 characters. You can choose to ignore that, or set a\r\nhigher limit (via ``MICROBLOG_MAX_LENGTH``), but there are certain assumptions\r\nabout presentation that start to fail as the posts get longer....\r\n\r\nInstallation\r\n------------\r\n\r\nThe easiest way to installed *Microblogging* is through ``pip``:\r\n\r\n.. code-block:: sh\r\n\r\n pip install minchin.pelican.reader.microblog\r\n\r\nRequirements\r\n------------\r\n\r\n*Microblogging* relies on Pelican, and the ``autoloader`` plugin (for\r\nautoloading). If this plugin is installed from PyPI, these should automatically\r\nbe installed.\r\n\r\nif you need to insrall them manually:\r\n\r\n.. code-block:: sh\r\n\r\n pip install pelican\r\n pip install minchin.pelican.plugins.autoloader\r\n\r\n\r\nAdditional Images\r\n-----------------\r\n\r\nMicro blog post, using the Seafoam theme:\r\n\r\n(Placeholder image for the moment...)\r\n\r\n.. image:: https://github.com/MinchinWeb/seafoam/raw/master/docs/screenshots/2.6.0/article_with_header.png\r\n :align: center\r\n :alt: Replace Image...\r\n\r\n\r\nPelican Settings\r\n----------------\r\n\r\nThese settings can be set in your ``pelicanconf.py`` file (your Pelican settings\r\nfile) to alter the behavior of the plugin.\r\n\r\nIf a value is given below, this represents the effective default value. If no\r\nvalue is given, the effective default value is ``None``.\r\n\r\n*Microblogging* also auto-configures itself when possible. If you need to\r\nmanually create the default configuration, you would need the following: \r\n\r\n.. code-block:: python \r\n\r\n # pelicanconf.py \r\n\r\n # if PLUGINS is not defined on Pelican 4.5+, these plugins will autoload \r\n PLUGINS = [ \r\n \"minchin.pelican.readers.microblog\", \r\n # others, as desired... \r\n ] \r\n\r\n # the rest of the your configuration file... \r\n\r\nThis documentation has to be manually updated. If the settings no longer match\r\nthe plugin's behavior, or a setting is missing from here, please open a ticket\r\non `GitHub\r\n<https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues>`_. \r\n\r\n.. use the \".. data::\" directive here for Sphinx output, but on GitHub, that just causes everything to disappear\r\n\r\nMICROBLOG_FOLDER = \"micro\"\r\n Folder containing your micro blog posts, relative to your content root.\r\nMICROBLOG_MAX_LENGTH = 140\r\n How long should your micro blog posts ve limited to. Pelican will emit a\r\n warning if you exceed this.\r\nMICROBLOG_SAVE_AS = ARTICLE_SAVE_AS\r\n What to save the micro blog posts output file as. Defaults to using the same\r\n file structure as you are using for articles. c.f. ``MICROBLOG_URL``.\r\nMICROBLOG_SLUG = \"u{date:%Y%m%d%H%M}\"\r\n The slug that will be used for micro blog posts. Eg. ``u202307091701``.\r\n\r\n Note that Pelican expects slugs to be universally unique.\r\nMICROBLOG_URL = ARTICLE_URL\r\n What URL to post the micro blog posts to. Defaults to using the same URL\r\n structure as you are using for articles. c.f. ``MICROBLOG_SAVE_AS``.\r\n\r\nIntegration with Themes\r\n-----------------------\r\n\r\nFor best support, you will need to modify your theme, or select a theme that\r\nalready supports *Microblogging*, like my `seafoam\r\n<http://blog.minchin.ca/label/seafoam/>`_.\r\n\r\nSome helpful notes:\r\n\r\n- Microblog posts are considered ``Articles`` by Pelican, and will be included\r\n in the ``articles`` and ``dates`` \"lists\".\r\n- Microblog posts all have ``article.micro = True``.\r\n- Microblog posts are added to the ``\u00c2\u00b5`` category.\r\n- Generally, you'll want to disregard and now show the title of the microblog\r\n post. The title is set to the slug.\r\n- Because of their short length, it may make sense to display the whole body\r\n (``article.content``) in places that a link via the title of the article is\r\n typically shown.\r\n\r\nChangelog\r\n---------\r\n\r\n`Changelog <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/CHANGELOG.rst>`_\r\n\r\nRoadmap\r\n-------\r\n\r\nThese are features that I would like to eventually add to the plugin (and the\r\nissues I'm using to track their progress):\r\n\r\n- `Issue 1\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/1>`_\r\n -- count links as 23 characters (*\u00c3\u00a0 la* Twitter)\r\n- `Issue 2\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/2>`_\r\n -- process ReST microblog posts\r\n- `Issue 3\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/3>`_\r\n -- CLI command to create microposts\r\n- `Issue 4\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/4>`_\r\n -- add link previews\r\n- `Issue 5\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/5>`_\r\n -- show (if applicable) that this is a reply to something (or a \"re-tweet\")\r\n- `Issue 6\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/6>`_\r\n -- show replies to each post (borrow the comment setup?)\r\n- `Issue 7\r\n <https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues/7>`_\r\n -- automatically add hashtags as (Pelican) tags\r\n\r\nPull Requests to implement any of these are welcomed!\r\n\r\n- [x] update Seafoam theme\r\n- [x] make sorting work for microblog posts\r\n\r\n\r\nKnown Issues\r\n------------\r\n\r\n- Processing relies on Pelican's built-in Markdown reader.\r\n- The length of links to featured images will change if the ``SITE_URL``\r\n changes. This can mean that the microblog post is \"short\" enough when\r\n reviewing your site locally, but not when the site is generated for\r\n publication.\r\n\r\n\r\n.. Credits\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Microblogging for Pelican",
"version": "1.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/MinchinWeb/minchin.pelican.readers.microblog/issues",
"Changelog": "https://github.com/MinchinWeb/minchin.pelican.readers.microblog/blob/master/CHANGELOG.rst",
"Homepage": "http://blog.minchin.ca/label/microblog-pelican/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "723536659defdc7b9bb6e74bb6c15dbf236c554d57ed10f01e7a3cc272a13104",
"md5": "e02ff54a3d3ef450e08f9f0e2aab729a",
"sha256": "39d5f7e677d76ec571ff51d8f010dc0ebb6447576f5594ddcf704be05de184a9"
},
"downloads": -1,
"filename": "minchin.pelican.readers.microblog-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e02ff54a3d3ef450e08f9f0e2aab729a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 30547,
"upload_time": "2023-07-13T21:19:40",
"upload_time_iso_8601": "2023-07-13T21:19:40.250933Z",
"url": "https://files.pythonhosted.org/packages/72/35/36659defdc7b9bb6e74bb6c15dbf236c554d57ed10f01e7a3cc272a13104/minchin.pelican.readers.microblog-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "73e7cdc56ce2a2f143cdd085850cc3a75dfe69d2d1d2d20f37f2f129531e1d93",
"md5": "67ddba119a557861fca28a4bbda5ef5e",
"sha256": "36fba422e274a651bd86854309bbb95945072ac4356488751c4260e4692cb942"
},
"downloads": -1,
"filename": "minchin.pelican.readers.microblog-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "67ddba119a557861fca28a4bbda5ef5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12826,
"upload_time": "2023-07-13T21:19:04",
"upload_time_iso_8601": "2023-07-13T21:19:04.965960Z",
"url": "https://files.pythonhosted.org/packages/73/e7/cdc56ce2a2f143cdd085850cc3a75dfe69d2d1d2d20f37f2f129531e1d93/minchin.pelican.readers.microblog-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-13 21:19:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MinchinWeb",
"github_project": "minchin.pelican.readers.microblog",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "minchin.pelican.readers.microblog"
}