{"id":22712184,"url":"https://github.com/buildit/elc-snow-util","last_synced_at":"2025-03-29T22:21:42.620Z","repository":{"id":77074486,"uuid":"567846589","full_name":"buildit/elc-snow-util","owner":"buildit","description":"A utilty to pull data from ServiceNow with Employee Center application for Business Intelligence","archived":false,"fork":false,"pushed_at":"2022-11-23T21:48:04.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-04T23:31:43.447Z","etag":null,"topics":[],"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/buildit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-18T18:10:41.000Z","updated_at":"2024-04-08T21:50:26.000Z","dependencies_parsed_at":"2023-03-18T05:15:46.712Z","dependency_job_id":null,"html_url":"https://github.com/buildit/elc-snow-util","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Felc-snow-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Felc-snow-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Felc-snow-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Felc-snow-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildit","download_url":"https://codeload.github.com/buildit/elc-snow-util/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246250087,"owners_count":20747293,"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":[],"created_at":"2024-12-10T13:09:36.095Z","updated_at":"2025-03-29T22:21:42.615Z","avatar_url":"https://github.com/buildit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Summary\n\nPython CLI that includes a couple of reports and a utility commands that run against ServiceNow\nwith the Employee Center application.\n\n# How to Install\n\n* Install Python 3.10\n* Download a tarball of a release of this command\n* Run the following to install\n\n```\npip install elc-snow-util-1.0.0.tar.gz\n```\n\n## Virtual Environments\n\nIt really is better to install a command like this in a Python virtual environment, but explaining how to use them is beyond the scope of this docuemntation.\n\n# Configuration File\n\nThe command-line needs a configuration file in `%APPDATA%\\snowutil.ini`.  On Linux/MacOS, it will look for this file in `$HOME/.config/snowutil.conf`.\n\nThe format of the file as as follows:\n\n```\nendpoint: https://host-name-of-service-now/api\nusername: admin_username\npassword: admin_password\ntaxonomy: name-of-the-employee-center-taxonomy\n```\n\nNo credentials are stored with the software itself.\n\n# Commands\n\nThe software supports the following sub-commands:\n\n| Command Name   | Description | \n|----------------|-------------|\n| `catalog-report` | Creates a report on all Catalog Items (`sc_cat_item`) connected to a topic in the Taxonomy |\n| `sort-content` | Modify the `order` of all content (`m2m_connected_content`) connected to a topic in the taxonomy |\n| `topics-report` | Creates a report on all Topics (`topic`) in the taxonomy |\n| `topic-icons` | Download the icons for each topic in the taxonomy |\n\n\n## Uage and Common Options\n\nYou can always find out the usage of a command by using the `-h` option with that command.  As an example, the command-line below finds the usage for the catalog-report:\n\n```\nelc-snow-util catalog-report -h\n```\n\nAll of these commands support the following common options:\n\n| Long Option | Short Option | Description |\n|-------------|--------------|-------------|\n| `--config path` | `-c path` | You can have a different file for each service now instance |\n| `--quiet` | `-q` | By default, the command tells you how many API calls it has made and shows some progress |\n\n\n## Catalog Report\n\nThe catalog report requires an `OUTPUT` path which can be a CSV or XLSX.  It supports the following options:\n\n| Long Option | Short Option | Description |\n|-------------|--------------|-------------|\n| `--drop-missing` | None     | Drops catalog items that are not connected to the taxonomy |\n| `--active-items` | None | Query only on active items |\n| `--active-topics` | None | Report only menu items for active topics in the taxonomy |\n\nAn example of calling this command is as follows:\n\n```\nelc-snow-util catalog-report --drop-missing --active-topics Items-Connected-to-Active-Topics.xlsx\n```\n\n## Topics Report\n\nThe topics report uses the REST Table Api of the `topics` and `m2m_connnected_content` tables to report on the number of catalog items connected to each topic, or menu item.  It requires an `OUTPUT` path which can be a CSV or XLSX.  \n\nIt supports the following options:\n\n| Long Option | Short Option | Description |\n|-------------|--------------|-------------|\n| `--active` | `-a` | Report only on active topics |\n\nAn example of calling this command is as follows:\n\n```\nelc-snow-util -a Active-Topic-with-Content-Count.xlsx\n```\n\n## Topics Icons\n\nThe topic icons command uses the REST Table API against the `topics` table to get the id of each Icon, which it then downloads.  It uses a python package linked with [libmagic](https://man7.org/linux/man-pages/man3/libmagic.3.html) that determines from the file's contents whether it is a PNG, JPEG, or SVG, and then renames the file based on the menu path and the appropriate extension.\n\nThe topic icons command requires an `OUTPUT` which should be the path to a directory, which will be created if it does not exist.\n\nThe command supports the following options:\n\n| Long Option | Short Option | Description |\n|-------------|--------------|-------------|\n| `--active` | `-a` | Report only on active topics |\n\nAn example of calling it is as follows\n\n```\nelc-snow-util topic-icons --active Menu-Icons\ndir/w Menu-Icons\n```\n\n## Sort Content Utility\n\nThis command is the only utility which modifies service now.  It takes an `TOPIC_PATH` argument which tells it which connected content to reorder.  An example of calling this command is as follows:\n\n```\nelc-snow-util sort-content \"Software /\"\n```\n\nThis would sort all of the content items connected to the Software topic.  This command only \nqueries on content connected to active topics.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Felc-snow-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildit%2Felc-snow-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Felc-snow-util/lists"}