{"id":20690732,"url":"https://github.com/welbornprod/glader","last_synced_at":"2025-04-22T16:58:00.552Z","repository":{"id":20990736,"uuid":"24280207","full_name":"welbornprod/glader","owner":"welbornprod","description":"Generate python code from a glade file. Signals are automatically stubbed out with correct arguments.","archived":false,"fork":false,"pushed_at":"2020-03-23T01:00:56.000Z","size":159,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-29T16:51:15.196Z","etag":null,"topics":["code-generation","code-generator","glade","glade-files","gtk","gtksourceview","gui","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/welbornprod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-21T02:46:19.000Z","updated_at":"2024-11-25T01:23:38.000Z","dependencies_parsed_at":"2022-07-31T05:07:59.765Z","dependency_job_id":null,"html_url":"https://github.com/welbornprod/glader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welbornprod%2Fglader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welbornprod%2Fglader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welbornprod%2Fglader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welbornprod%2Fglader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welbornprod","download_url":"https://codeload.github.com/welbornprod/glader/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250284527,"owners_count":21405294,"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":["code-generation","code-generator","glade","glade-files","gtk","gtksourceview","gui","python"],"created_at":"2024-11-16T23:14:05.418Z","updated_at":"2025-04-22T16:58:00.531Z","avatar_url":"https://github.com/welbornprod.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Glader\n======\n\nGenerates skeleton code from a glade file. The generated signal handler stubs\ncan then be filled in to provide functionality. Arguments for signal handlers\nare automatically decided through introspection using Gtk.\n\nI didn't know this before I wrote it, but this does the exact same thing that\n`pyqt4uic` and `pykde4uic` do for Qt designer files. It does a little more\nactually. It includes a GUI for previewing/editing, and also generates stubs\nfor the signal handlers. It does this by reading the glade file's XML,\nparsing it, and using introspection to generate the stubs.\n\nThe glade file still needs to be present in the finished application\ndirectory. It is used with `Gtk.Builder.add_from_file()` to generate the\nwidgets.\n\nWhen everything is working as expected, doing\n`glader input.glade output.py` will create an executable Gtk application\nthat can be ran and previewed by running `./output.py`.\n\n\nCommand Line:\n-------------\n\nIf an input file name (glade), and an output file name (python) are passed to\n`glader`, the code will be generated and written to the output file.\n\nYou can pass `-` as the output file name to write to stdout.\n\n\nGui Mode:\n---------\n\nWhen `glader` is ran with no arguments, or just an input file is given, a GUI\nis loaded. In GUI mode a preview is generated, and can be edited before saving.\nWhen an input file is given, or `--gui` is used, the preview code is\nautomatically generated when the program loads.\n\nThe GUI supports Python syntax highlighting using GtkSourceView. The viewer\nuses GtkSourceView themes, and can be changed using the theme selector.\nThemes are located in `/usr/share/gtksourceview-3.0/styles`, and can be\ndownloaded from various places on the internet. The most common is\n[https://wiki.gnome.org/Projects/GtkSourceView/StyleSchemes](https://wiki.gnome.org/Projects/GtkSourceView/StyleSchemes).\n\n\nUsage:\n------\n\n```\nUsage:\n    glader -h | -v\n    glader [FILE] [OUTFILE] [-d] [-g] [-l]\n\nOptions:\n    FILE           : Glade file to parse.\n    OUTFILE        : File name for output.\n                     If - is given, output will be printed to stdout.\n    -d,--dynamic   : Use dynamic object initialization method.\n    -g,--gui       : Force use of a GUI, even when an output file is given.\n                     You still have to use the 'Save' button to apply\n                     changes.\n    -h,--help      : Show this help message.\n    -l,--lib       : Generate a usable Gtk.Window class only, not a\n                     script.\n    -v,--version   : Show version.\n```\n\n\nDependencies:\n-------------\n\nGlader has several GTK-related dependencies. If you are already creating GTK\napps then you may have some of these installed already.\n\n### Python modules:\n\nInstalled with [pip](https://pypi.python.org).\n\n* **docopt** - *Handles command-line argument parsing.*\n\n### System packages:\n\nInstalled with your package manager, like [apt](https://wiki.debian.org/apt-get).\n\n* **gir1.2-gtk-3.0** - *Provides helpers and access to GIRepository.*\n* **libgtksourceview-3.0-dev** - *Provides the `GtkSourceView` widget.*\n* **python3-gi** - *Provides python bindings for gobject-introspection.*\n\n\nInstall:\n--------\n\nAn installer script is included in the repo. It will attempt to install any\n*missing* dependencies. The full installation process is this:\n```bash\n# Clone the repo:\ngit clone https://github.com/welbornprod/glader.git\n\n# Change to the project directory:\ncd glader\n\n# Run the installer (--user is recommended).\n./install --user\n```\n\nIf there are no errors, then you're good to go. A `glader` command was just\ninstalled.\n\n\nCompatibility:\n--------------\n\nGlader is designed for\n[PyGTK3](http://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html),\nand [Python 3](https://www.python.org/downloads/).\n\nIt's possible to backport this to older versions, but no work will be done on\nthat unless the need is great.\nFile an issue if that is something you would like to see.\n\n\nContributions:\n--------------\n\nContributions are welcome. That's what this repo is for.\nFile an issue, or send me a pull request if you would like to see a\nfeature added to Glader.\n\n\nGUI Preview:\n--------\n\n![Glader](https://welbornprod.com/images/glader-preview.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelbornprod%2Fglader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelbornprod%2Fglader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelbornprod%2Fglader/lists"}