{"id":36780607,"url":"https://github.com/davidbetz/pyecontent","last_synced_at":"2026-01-12T13:16:46.536Z","repository":{"id":57425523,"uuid":"64365038","full_name":"davidbetz/pyecontent","owner":"davidbetz","description":"Python module to read extended file content and metadata","archived":false,"fork":false,"pushed_at":"2021-04-24T23:27:54.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T17:55:10.160Z","etag":null,"topics":["citations","footnotes","metadata","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidbetz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-28T04:43:21.000Z","updated_at":"2024-01-29T03:26:58.000Z","dependencies_parsed_at":"2022-08-29T22:51:20.527Z","dependency_job_id":null,"html_url":"https://github.com/davidbetz/pyecontent","commit_stats":null,"previous_names":["davidbetz/econtent"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/davidbetz/pyecontent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbetz%2Fpyecontent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbetz%2Fpyecontent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbetz%2Fpyecontent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbetz%2Fpyecontent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidbetz","download_url":"https://codeload.github.com/davidbetz/pyecontent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbetz%2Fpyecontent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["citations","footnotes","metadata","python"],"created_at":"2026-01-12T13:16:45.771Z","updated_at":"2026-01-12T13:16:46.476Z","avatar_url":"https://github.com/davidbetz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extended Content Reader\n\n**Copyright (c) 2016-2017 David Betz**\n\n[![Build Status](https://travis-ci.org/davidbetz/pyecontent.svg?branch=master)](https://travis-ci.org/davidbetz/pyecontent)\n[![PyPI version](https://badge.fury.io/py/econtent.svg)](https://badge.fury.io/py/econtent)\n\n## Installation\n\n    pip install econtent\n\n## Compatibility\n\nPython 2 and 3\n\n## Purpose\n\nFiles have content and metadata. Markdown has already helps us go from boring text files to rich text (without RTF or proprietary voodoo), but it's not enough. My content needs sections and it needs metadata. They already have a create date and a modified date, but I often need to overwrite these. That's where this component comes in. It's been helping me for a few years now (well, this is the Python refactor/port of my original/production/more complex .NET version).\n\nIt's easier to following if you just look at the example...\n\nThe following example is ridiculous, but it's an example of the type of stuff you might store in a file:\n\n**item01.txt**\n    \n    hollow unbraced needs mineral high fingerd strings red tragical having definement invisible@@footnote|78@@. flames grow pranks obey hearsed variable grandsire bodykins possessd worser oerthrown oerweigh healthful kingly wise faculty loggats best.\n    \n    unfortified chopine hill witchcraft countries toward nerve grief duty rivals.\n    \n    @@begin|format:javascript@@\n        alert((function() {\n          var item = 'item01';\n          return item.split('').reverse()\n        })());\n    @@format:python@@\n        print('item01'[::-1])\n    @@end@@\n    \n    patience unhouseld pours lapsed would passion point blastments lady spectators.\n    \n    @author@ Billy Speareshakes\n    @title@ Thy Wonderful Randomious\n    @page@ 728\n    @footnote|78@ nose thee something disclaiming wrung antiquity rend illume halt osric list\n    @_created@ 2016-07-27T19:38:10Z\n    @_modified@ 2016-07-27T19:38:10Z\n\nThere are two paragraphs, followed by a block of JavaScript, then a block of Python, then another paragraph, then a bunch of metadata. It's a rediclous example because it combines concepts from both research website (citations and footnotes) and my [netfxharmonics.com](netfxharmonics.com) website (the javascript section, which in that context in final rendering would be rendered with JavaScript colored syntax).\n\nThe current python project reads that file as the following object:\n\n    {\n        '_': {\n            0: 'hollow unbraced needs mineral high fingerd strings red tragical having definement invisible@@footnote|78@@. flames grow pranks obey hearsed variable grandsire bodykins possessd worser oerthrown oerweigh healthful kingly wise faculty loggats best.\\nunfortified chopine hill witchcraft countries toward nerve grief duty rivals.',\n            1: {\n                0: {\n                    '_': \"    alert((function() {\\n      var item = 'item01';\\n      return item.split('').reverse()\\n    })());\",\n                    'format': 'javascript'\n                },\n                1: {\n                    '_': \"    print('item01'[::-1])\",\n                    'format': 'python'\n                }\n            },\n            2: 'patience unhouseld pours lapsed would passion point blastments lady spectators.',\n        },\n        'author': 'Billy Speareshakes',\n        'title': 'Thy Wonderful Randomious',\n        'page': '728',\n        'footnote': {\n            78: 'nose thee something disclaiming wrung antiquity rend illume halt osric list',        \n        },\n        '_created': '2016-07-27T19:38:10Z',\n        '_modified': '2016-07-27T19:38:10Z',\n        '_filename': 'item01.txt',\n        '_extension': 'txt',\n        '_basename': 'item01',\n    }\n\nThat's really useful information without the needs to play around with parsing file internals.\n\nThe created, modified, filename, extension, and basename are read from the file metadata, but created and modified can be overwritten using @_created@ and @_modified@ tokens.\n\nBut, it's not just metadata. On my technical website, I require color syntax for various programming languages. Preformatting makes the code unreadable. So, I need sections(@@begin...@@/@@end@@. On my research website, I require extensive citations and footnotes. So, I need linkable content (@@XXXX@@).\n\nSee test_read.py for usage.\n\n# Use Cases\n\n* one entry == blog entry\n* one entry == one quote (with citation data)\n* one entry == one podcast mp3; you would use something like @audio@ which would tell your custom system that this entry is describing that particular mp3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbetz%2Fpyecontent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbetz%2Fpyecontent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbetz%2Fpyecontent/lists"}