{"id":20044929,"url":"https://github.com/gryf/mc_extfslib","last_synced_at":"2025-05-05T08:33:01.632Z","repository":{"id":60639352,"uuid":"41823205","full_name":"gryf/mc_extfslib","owner":"gryf","description":"Midnight Commander extfs for several filetypes using Python","archived":false,"fork":false,"pushed_at":"2023-10-22T16:46:26.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T21:46:19.679Z","etag":null,"topics":["adf","amiga","dms","fs-plugin","lha","lzx","mc","midnight-commander","python"],"latest_commit_sha":null,"homepage":"https://bitbucket.org/gryf/mc_extfs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gryf.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-02T19:29:31.000Z","updated_at":"2024-10-15T09:36:57.000Z","dependencies_parsed_at":"2024-11-13T11:03:09.420Z","dependency_job_id":"459cda81-d519-47ad-90f2-db9f54f31cdc","html_url":"https://github.com/gryf/mc_extfslib","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"918a94960552745e7e84405e334103ee57bd450f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gryf%2Fmc_extfslib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gryf%2Fmc_extfslib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gryf%2Fmc_extfslib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gryf%2Fmc_extfslib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gryf","download_url":"https://codeload.github.com/gryf/mc_extfslib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252466996,"owners_count":21752481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["adf","amiga","dms","fs-plugin","lha","lzx","mc","midnight-commander","python"],"created_at":"2024-11-13T11:02:53.118Z","updated_at":"2025-05-05T08:33:01.250Z","avatar_url":"https://github.com/gryf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========================\nMidnight Commander extfslib\n===========================\n\n.. image:: https://img.shields.io/pypi/v/extfslib.svg\n    :target: https://pypi.python.org/pypi/extfslib\n\nMidnight Commander extfslib helper library for writing extfs archive plugins.\n\n\nDescription\n===========\n\nExtfslib help with building Midnight Commander extfs plugins, especially for\nthose which operates on different kind of archives.\n\nSimplest plugin built on top of this lib would be:\n\n.. code:: python\n\n   import extfslib\n\n\n   class MyArchive(extfslib.Archive):\n\n       ARCHIVER = \"fancyarch\"\n\n       def list(self):\n           if not self._contents:\n               return 1\n\n           for item in self._contents:\n               sys.stdout.buffer.write(self.ITEM % item)\n\n\n   arch = MyArchive('/path/to/file.fancyarch')\n   arch.list()\n\n\nIn this example class instance should be able to be called with ``list``\nmethod.  All methods:\n\n- ``list``\n- ``copyin``\n- ``copyout``\n- ``rm``\n- ``mkdir``\n- ``rmdir``\n- ``run``\n\nshould be implemented if needed, since by default all of them are just defined,\nbut not implemented.\n\nOf course, real life example can be a little bit more complicated, since there\nwould be possible need for adapting ``LINE_PAT`` which is regular expression\nfor getting attributes for the list compatible with MC along with the ``ITEM``\nwhich holds the output pattern and utilizes dictionary from ``LINE_PAT``,\n``CMD`` which maps between class and archiver commands. Possibly there might be\nneeded some other adjustments.\n\nAdditionally there is an optional ``Config`` class, which might be used for\nreading Midnight Commander ini file (ususally located in ``~/.config/mc/ini``),\nso that for the example above:\n\n.. code:: python\n\n   import extfslib\n\n\n   class MyArchive(extfslib.Archive):\n\n       ARCHIVER = \"fancyarch\"\n\n       def __init__(self):\n           super().__init__()\n           self.conf = extfslib.Config(self)\n           if self.conf,getint('config_key'):\n               # do something\n\nwhere the ``ini`` config file would contain:\n\n.. code:: ini\n\n   …\n   [myarchive]\n   config_key = 300\n   …\n\nSo, section name ``[myarchive]`` must match class name in lower case, and name\nof the option is arbitrary string folowed by value. Note, the section and\noptions must be added manually.\n\n\nInstallation\n============\n\nInstall from Pypi\n\n.. code:: shell-session\n\n   # pip install extfslib\n\nor, as a user:\n\n.. code:: shell-session\n\n   $ pip install extfslib --user\n\nor use virtualenv:\n\n.. code:: shell-session\n\n   $ git clone https://github.com/gryf/mc_extfslib\n   $ cd mc_extfslib\n   $ virtualenv venv\n   $ source venv/bin/activate\n   (venv) $ pip install\n\n\nLicense\n=======\n\nThis software is licensed under 3-clause BSD license. See LICENSE file for\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgryf%2Fmc_extfslib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgryf%2Fmc_extfslib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgryf%2Fmc_extfslib/lists"}