{"id":13857057,"url":"https://github.com/farisachugthai/utilities","last_synced_at":"2025-07-13T19:34:02.237Z","repository":{"id":53472000,"uuid":"135539207","full_name":"farisachugthai/utilities","owner":"farisachugthai","description":"Functional scripts to administer multiple workstations.","archived":false,"fork":false,"pushed_at":"2022-12-08T05:52:28.000Z","size":7549,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-06T03:03:11.102Z","etag":null,"topics":["backups","conda","multiple-workstations","neovim","python3","rclone","requests","sphinx","termux","tmux","youtube-dl"],"latest_commit_sha":null,"homepage":"https://farisachugthai.github.io/utilities/","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/farisachugthai.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}},"created_at":"2018-05-31T06:06:04.000Z","updated_at":"2024-02-26T08:35:27.000Z","dependencies_parsed_at":"2023-01-24T14:45:57.912Z","dependency_job_id":null,"html_url":"https://github.com/farisachugthai/utilities","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/farisachugthai%2Futilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisachugthai%2Futilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisachugthai%2Futilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisachugthai%2Futilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farisachugthai","download_url":"https://codeload.github.com/farisachugthai/utilities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912515,"owners_count":17544191,"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":["backups","conda","multiple-workstations","neovim","python3","rclone","requests","sphinx","termux","tmux","youtube-dl"],"created_at":"2024-08-05T03:01:24.348Z","updated_at":"2024-11-22T14:31:51.075Z","avatar_url":"https://github.com/farisachugthai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. _root-readme:\n\n======\npyutil\n======\n\n.. module:: readme\n\n.. title:: utilities\n\n.. highlight:: sh\n\nThis repository houses a number of functional scripts I utilize to\nadminister multiple workstations.\n\n\n.. contents: Table of Contents\n    :local:\n    :backlinks: \"entry\"\n\n\n.. _root-installation:\n\nInstallation\n============\n\nPython offers it's users a large number of ways to install new packages.\n\nOne can install the python modules by:\n\n* Installing with pip\n\n  Install from newest dev version in master branch\n\n.. code-block:: sh\n\n    pip install git+https://github.com/farisachugthai/utilities\n\n* Cloning with git and installing with pip\n\n.. code-block:: sh\n\n    git clone git+https://github.com/farisachugthai/utilities\n    pip install .\n\n* As an alternative to a pip install, obtain the source code and run the `setup.py`_ file.\n\n.. _`setup.py`: setup.py\n\nIf you are on a Unix-like system, the following will ensure everything\nbelow pyutil_ is in the environment variable :envvar:`$PATH`\nand give you the ability to modify the source code in place.\n\n.. _pyutil: ./pyutil/\n\n\n.. code-block:: sh\n\n    git clone https://github.com/farisachugthai/utilities\n    cd utilities\n\n    python3 setup.py build \u0026\u0026 python3 -m pip install -U -e .\n\n* After which point, the only necessary step will be ensuring that the scripts\n  in sh_ are in your environment variable :envvar:`$PATH`.\n\n.. _sh: ./sh/\n\n.. code-block:: sh\n\n    # The script at pyutil/dlink.py is useful for creating symlinks for every\n    # file in a directory. If the directory ~/bin is in your path...\n\n    # Check which directories are in the ``$PATH`` env var\n    echo $PATH\n\n    # Then link the scripts in sh/ to a directory in your path!\n    python3 pyutil/dlink.py \"$PWD/sh\" \"$HOME/bin\"\n\nFor anyone using Windows 10, the PowerShell installation will be slightly\ndifferent; however, not tremendously.\n\n.. code-block:: console\n\n    git clone https://github.com/farisachugthai/utilities\n\n    # `cd` is aliased to set-location for most instances of powershell;\n    # however in the interest of using domain specific built-ins:\n    Set-Location utilities\n\n    python3 setup.py build; python3 -m pip install -U -e .\n\n    # to view the environment variable path, run:\n    Get-ChildItem -Path $Env:PATH\n\n    # then ensure that the directory you pick is in your path, and run\n    python3 pyutil\\dlink.py \"$pwd\\sh\" C:\\Users\\path\\to\\directory\n\n\n.. note::\n\n   When creating symbolic links on Windows, it's necessary to start the\n   console as an administrator.\n   In addition, be aware that symlinks created in a bash subshell\n   won't be recognized as valid by Windows OS!\n\n\n.. _root-docs:\n\nBuilding Documentation From Source\n==================================\n\nThe documentation can be read online at `GitHub Pages \u003chttps://farisachugthai.github.io/utilities\u003e`_\n\nHowever, the documentation can be built locally as well.\n\nAfter following the installation instructions at `root-installation`_, one can run\n\n.. code-block:: shell\n\n   cd doc\n   make html\n\nThen, direct your browser to ``_build/html/index.html``.\n\nTo do so in a more direct manner, a *htmlview* target has been created as a\nconvenience in the `docs/Makefile`_.\n\n.. _`docs/Makefile`: ./docs/Makefile\n\nThis target will build the documentation and open up your default web browser\nautomatically.\n\nTesting\n=======\n\nTo run the tests with the interpreter available as ``python``, use:\n\n.. code-block:: console\n\n    make test\n\nIf you want to explicitly define which interpreter, e.g. ``python3``, use:\n\n.. code-block:: console\n\n    PYTHON=python3 make test\n\nAlternatively, one can use :mod:`distutils` and the `setup.py`_ file like so::\n\n   python setup.py test\n\nLicense\n=======\n\nMIT\n\nContributing\n==============\n\nEven though these are mostly scripts I've thrown together; I'd absolutely love\nany constructive criticism or pointers on how to get any module listed to work\nbetter!\n\nI hope it goes without saying, but if it doesn't, please don't hesitate\nto fork or create an issue.\n\n.. _`Back up directories.`: docs/api/pyutil/backup_nt_and_posix\n.. _`Automate the process of downloading plain-text files from the Internet.`: pyutil/lazy_downloader.py\n.. _`Automate downloading videos from YouTube.`: pyutil/yt_dl.py\n.. _`Symlink files recursively`: pyutil/linktree.py\n.. _`Inspect varying python modules.`: pyutil/inspect_module.py\n.. _`Introspect environment variables.`: pyutil/env.py\n.. _`Profiling nvim startup time.`: pyutil/nvim_profiling.py\n.. _`Strip trailing whitespace from a file.`: pyutil/strip_space.py\n.. _`setup.py`: setup.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarisachugthai%2Futilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarisachugthai%2Futilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarisachugthai%2Futilities/lists"}