{"id":16073995,"url":"https://github.com/opedrosouza/thecoderbot","last_synced_at":"2026-04-28T13:33:25.266Z","repository":{"id":148129852,"uuid":"391522192","full_name":"opedrosouza/TheCoderBot","owner":"opedrosouza","description":"TheCoderBot is a TelegramBot write with ruby and Docker to practice and understanding how Telegram's Bot API works","archived":false,"fork":false,"pushed_at":"2021-08-01T04:53:24.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T10:41:52.353Z","etag":null,"topics":["bot","docker","ruby","telegram","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opedrosouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-08-01T04:12:42.000Z","updated_at":"2021-08-01T04:53:26.000Z","dependencies_parsed_at":"2023-05-19T05:45:22.310Z","dependency_job_id":null,"html_url":"https://github.com/opedrosouza/TheCoderBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opedrosouza/TheCoderBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opedrosouza%2FTheCoderBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opedrosouza%2FTheCoderBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opedrosouza%2FTheCoderBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opedrosouza%2FTheCoderBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opedrosouza","download_url":"https://codeload.github.com/opedrosouza/TheCoderBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opedrosouza%2FTheCoderBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260836265,"owners_count":23070439,"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":["bot","docker","ruby","telegram","telegram-bot","telegram-bot-api"],"created_at":"2024-10-09T08:40:52.551Z","updated_at":"2026-04-28T13:33:20.226Z","avatar_url":"https://github.com/opedrosouza.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TheCoderBot\n\n\u003c!-- [![Downloads](http://pepy.tech/badge/shallow-backup)](http://pepy.tech/count/shallow-backup)\n[![Build Status](https://travis-ci.com/alichtman/shallow-backup.svg?branch=master)](https://travis-ci.com/alichtman/shallow-backup)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1719da4d7df5455d8dbb4340c428f851)](https://www.codacy.com/app/alichtman/shallow-backup?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=alichtman/shallow-backup\u0026amp;utm_campaign=Badge_Grade) --\u003e\n\u003c!-- [![Coverage Status](https://coveralls.io/repos/github/alichtman/shallow-backup/badge.svg?branch=master)](https://coveralls.io/github/alichtman/shallow-backup?branch=master) --\u003e\n\n`TheCoderBot` Is a Telegram's bot that share informations about the wheater with you (just for now, I'll add more features soon as possible)\n\n\u003c!-- ![Shallow Backup GIF Demo](img/shallow-backup-demo.gif)\n\nContents\n========\n\n * [Why?](#why)\n * [Installation](#installation)\n * [Usage](#usage)\n * [Git Integration](#git-integration)\n * [What can I back up?](#what-can-i-back-up)\n * [Configuration](#configuration)\n * [Output Structure](#output-structure)\n * [Reinstalling Dotfiles](#reinstalling-dotfiles)\n * [Want to contribute?](#want-to-contribute)\n\n### Why?\n\nI wanted a tool that allows you to:\n\n+ Back up dotfiles _from where they live on the system_.\n+ Back up files from _any_ path on the system, not just `$HOME`.\n+ Reinstall them from the backup directory idempotently.\n+ Backup and reinstall files conditionally, so you can easily manage dotfiles across multiple systems.\n+ Copy files on installation and backup, as opposed to symlinking them.\n+ Backup package installations in a highly compressed manner\n\nAnd is incredibly fault tolerant and user-protective.\n\n`shallow-backup` is the only tool that checks all of those boxes.\n\n### Installation\n---\n\n**Do not install this as `root`.**\n\n1. Install with [`pip3`](https://pypi.org/project/shallow-backup/)\n    + `$ pip3 install shallow-backup`\n    + `$ shallow-backup`\n\n2. Download the `shallow-backup` binary from Releases tab.\n\n### Usage\n---\n\nTo start the interactive program, simply run `$ shallow-backup`.\n\n`shallow-backup` was built with scripting in mind. Every feature that's supported in the interactive program is supported with command line arguments.\n\n```shell\nUsage: shallow-backup [OPTIONS]\n\n  Easily back up installed packages, dotfiles, and more.\n  You can edit which files are backed up in ~/.shallow-backup.\n\n  Written by Aaron Lichtman (@alichtman).\n\nOptions:\n  --add-dot TEXT              Add a dotfile or dotfolder to config by path.\n  -backup-all                 Full back up.\n  -backup-configs             Back up app config files.\n  -backup-dots                Back up dotfiles.\n  -backup-packages            Back up package libraries.\n  -delete-config              Delete config file.\n  -destroy-backup             Delete backup directory.\n  -dry-run                    Don't backup or reinstall any files, just give\n                              verbose output.\n\n  -backup-fonts               Back up installed fonts.\n  --new-path TEXT             Input a new back up directory path.\n  -no-new-backup-path-prompt  Skip setting new back up directory path prompt.\n  -no-splash                  Don't display splash screen.\n  -reinstall-all              Full reinstallation.\n  -reinstall-configs          Reinstall configs.\n  -reinstall-dots             Reinstall dotfiles and dotfolders.\n  -reinstall-fonts            Reinstall fonts.\n  -reinstall-packages         Reinstall packages.\n  --remote TEXT               Set remote URL for the git repo.\n  -separate-dotfiles-repo     Use if you are trying to maintain a separate\n                              dotfiles repo and running into issue #229.\n\n  -show                       Display config file.\n  -v, --version               Display version and author info.\n  -h, -help, --help           Show this message and exit.\n```\n\n### Git Integration\n---\n\n**A Word of Caution**\n\nThis backup tool is git-integrated, meaning that you can easily store your backups remotely (on GitHub, for example.) Dotfiles and configuration files may contain sensitive information like API keys and ssh keys, and you don't want to make those public. To make sure no sensitive files are uploaded accidentally, `shallow-backup` creates a `.gitignore` file if it can't find one in the directory. It excludes `.ssh/` and `.pypirc` by default. It's safe to remove these restrictions if you're pushing to a remote private repository, or you're only backing up locally. To do this, you should clear the `.gitignore` file without deleting it.\n\n_If you choose to back up to a public repository, look at every file you're backing up to make sure you want it to be public._\n\n**What if I'd like to maintain a separate repo for my dotfiles?**\n\n`shallow-backup` makes this easy! After making your first backup, `cd` into the `dotfiles/` directory and run `$ git init`. Create a `.gitignore` and a new repo on your favorite version control platform. This repo will be maintained independently (manually) of the base `shallow-backup` repo. Note that you may need to use the `-separate_dotfiles_repo` flag to get this to work, and it may [break some other functionality of the tool](https://github.com/alichtman/shallow-backup/issues/229). It's ok for my use case, though.\n\nHere's a `bash` script that I wrote to [automate my dotfile backup workflow](https://github.com/alichtman/scripts/blob/master/backup-and-update-dotfiles.sh). You can use this by placing it in your `$PATH`, making it executable, and running it.\n\n### What can I back up?\n---\n\nBy default, `shallow-backup` backs these up.\n\n1. Dotfiles and dotfolders\n    * `.bashrc`\n    * `.bash_profile`\n    * `.gitconfig`\n    * `.pypirc`\n    * `.config/shallow-backup.conf`\n    * `.ssh/`\n    * `.vim/`\n    * `.zshrc`\n\n2. App Config Files\n    * Atom\n    * VSCode\n    * Sublime Text 2/3\n    * Terminal.app\n\n3. Installed Packages\n    * `apm`\n    * `brew` and `cask`\n    * `cargo`\n    * `gem`\n    * `pip`\n    * `pip3`\n    * `npm`\n    * `macports`\n    * `VSCode` Extensions\n    * `Sublime Text 2/3` Packages\n    * System Applications\n\n4. User installed `fonts`.\n\n### Configuration\n\nIf you'd like to modify which files are backed up, you have to edit the `JSON` config file, located at `~/.config/shallow-backup.conf`. There are two ways to do this.\n\n1. Select the appropriate option in the CLI and follow the prompts.\n2. Open the file in a text editor and make your changes.\n\nEditing the file in a text editor will give you more control and be faster.\n\n#### Conditional Backup and Reinstallation\n\nEvery dotfile has two subkeys: `backup_condition` and `reinstall_condition`. Both of these accept expressions that will be evaluated in `bash`. An empty string (`\"\"`) is the default value, and is considered to be `True`. If the return value of the expression is `0`, this is considered `True`. Otherwise, it is `False`. This lets you do simple things like preventing backup with:\n\n```javascript\n// Because `$ false` returns 1\n\"backup_condition\": \"false\"\n```\n\nAnd also more complicated things like only backing up certain files if an environment variable is set:\n\n```javascript\n\"backup_condition\": \"[[ -n \\\"$ENV_VAR\\\" ]]\"\n```\n\nMy config (as of `v5.0.0a`) looks like this, and is used to back up my [dotfiles](https://www.github.com/alichtman/dotfiles):\n\n```json\n{\n\t\"backup_path\": \"~/shallow-backup\",\n\t\"lowest_supported_version\": \"5.0.0a\",\n\t\"dotfiles\": {\n\t\t\".config/agignore\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/crontab\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/fzf-notes\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/git/config\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/git/gitignore_global\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/jrnl/jrnl.yaml\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/kitty\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/nvim\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/pycodestyle\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/pylintrc\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/python\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/radare2/radare2rc\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/ranger\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/shallow-backup.conf\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/starship.toml\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/tmux\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/tuir/tuir.cfg\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/zathura/zathurarc\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".config/zsh\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".ctags\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".ghc/ghci.conf\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".pypirc\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".ssh\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t},\n\t\t\".zshenv\": {\n\t\t\t\"reinstall_condition\": \"\",\n\t\t\t\"backup_condition\": \"\"\n\t\t}\n\t},\n\t\"root-gitignore\": [\n\t\t\".DS_Store\",\n\t\t\"dotfiles/.config/nvim/.netrwhist\",\n\t\t\"dotfiles/.config/nvim/spell/en.utf-8.add\",\n\t\t\"dotfiles/.config/ranger/plugins/ranger_devicons\",\n\t\t\"dotfiles/.config/zsh/.zcompdump*\",\n\t\t\"dotfiles/.pypirc\",\n\t\t\"dotfiles/.ssh\"\n\t],\n\t\"dotfiles-gitignore\": [\n\t\t\".DS_Store\",\n\t\t\".config/nvim/.netrwhist\",\n\t\t\".config/nvim/spell/en.utf-8.add*\",\n\t\t\".config/ranger/plugins/*\",\n\t\t\".config/zsh/.zcompdump*\",\n\t\t\".config/zsh/.zinit\",\n\t\t\".config/tmux/plugins\",\n\t\t\".config/tmux/resurrect\",\n\t\t\".pypirc\",\n\t\t\".ssh/*\"\n\t],\n\t\"config_mapping\": {\n\t\t\"/Users/alichtman/Library/Application Support/Sublime Text 2\": \"sublime2\",\n\t\t\"/Users/alichtman/Library/Application Support/Sublime Text 3\": \"sublime3\",\n\t\t\"/Users/alichtman/Library/Application Support/Code/User/settings.json\": \"vscode/settings\",\n\t\t\"/Users/alichtman/Library/Application Support/Code/User/Snippets\": \"vscode/Snippets\",\n\t\t\"/Users/alichtman/Library/Application Support/Code/User/keybindings.json\": \"vscode/keybindings\",\n\t\t\"/Users/alichtman/.atom\": \"atom\",\n\t\t\"/Users/alichtman/Library/Preferences/com.apple.Terminal.plist\": \"terminal_plist\"\n\t}\n}\n```\n\n#### .gitignore\n\nAs of `v4.0`, any `.gitignore` changes should be made in the `shallow-backup` config file. `.gitignore` changes that are meant to apply to all directories should be under the `root-gitignore` key. Dotfile specific gitignores should be placed under the `dotfiles-gitignore` key. The original `default-gitignore` key in the config is still supported for backwards compatibility, however, converting to the new config format is strongly encouraged.\n\n#### Output Structure\n---\n\n```shell\nbackup_dir/\n├── configs\n│   ├── plist\n│   │   └── com.apple.Terminal.plist\n│   ├── sublime_2\n│   │   └── ...\n│   └── sublime_3\n│       └── ...\n├── dotfiles\n│   ├── .bash_profile\n│   ├── .bashrc\n│   ├── .gitconfig\n│   ├── .pypirc\n│   ├── ...\n│   ├── .shallow-backup\n│   ├── .ssh/\n│   │   └── known_hosts\n│   ├── .vim/\n│   └── .zshrc\n├── fonts\n│   ├── AllerDisplay.ttf\n│   ├── Aller_Bd.ttf\n│   ├── Aller_BdIt.ttf\n│   ├── Aller_It.ttf\n│   ├── ...\n│   ├── Ubuntu Mono derivative Powerline Bold Italic.ttf\n│   ├── Ubuntu Mono derivative Powerline Bold.ttf\n│   ├── Ubuntu Mono derivative Powerline Italic.ttf\n│   └── Ubuntu Mono derivative Powerline.ttf\n└── packages\n    ├── apm_list.txt\n    ├── brew-cask_list.txt\n    ├── brew_list.txt\n    ├── cargo_list.txt\n    ├── gem_list.txt\n    ├── installed_apps_list.txt\n    ├── npm_list.txt\n    ├── macports_list.txt\n    ├── pip_list.txt\n    └── sublime3_list.txt\n```\n\n### Reinstalling Dotfiles\n\nTo reinstall your dotfiles, clone your dotfiles repo and make sure your shallow-backup config path can be found at either `~/.config/shallow-backup.conf` or `$XDG_CONFIG_HOME/.shallow_backup.conf`. Set the `backup-path` key in the config to the path of your cloned dotfiles. Then run `$ shallow-backup -reinstall-dots`.\n\nWhen reinstalling your dotfiles, the top level `.git/`, `.gitignore`, `img/` and `README.md` files and directories are ignored.\n\n### Want to Contribute?\n---\n\nCheck out `CONTRIBUTING.md` and the `docs` directory. --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopedrosouza%2Fthecoderbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopedrosouza%2Fthecoderbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopedrosouza%2Fthecoderbot/lists"}