krettis / cohoast Goto Github PK
View Code? Open in Web Editor NEWManage your hostfile in the terminal
License: MIT License
Manage your hostfile in the terminal
License: MIT License
Documentation is still in a separate branch, needs to be merge. After all these mutations it'll probably need an update.
All the hostnames under it should go to the default category.
Default category cannot be deleted
This is a functionality what can be done under the list functionality
cohoast list -r categoryname
Because you know... fun!
Best thing is not to build a log app besides but just call a vendor for this. Or a make a basic log aside for it.
When a backup-file is created, a standard format is added to the file
This includes (optional):
When entering the menu, a short animation should appear
At this point only run.sh is being checked. This used to be the central script, but a lot has been split up, so extra checks are needed.
Blocking
ATM you can add a hostname with the default settings, but it would be better to configure it in the cli
-p, --port
Portnumber
-c, --category
Name of the category
-a, --address
Ip-address
Using a folder 'import' it will search in the folder for yaml-files and import the hostname.
filetype: yaml
Menu: yes
CLI: yes
cohoast import [ filename ]
Block an ip that is inserted.
Menu: yes
Configuration: yes
CLI
cohoast block [ ip ]
Testing and what more.
When a new category is setup, you can leave a note. Possibly for why the category is setup or what to put it in.
Show all the hostnames in a list on the terminal
cohoast list
Show a list of the hostnames provided with an ipaddress
cohoast list -i 127.0.0.1
In your configuration you have a set of defined ips which you can name.
This way redirecting/blocking some sites can be less a little convoluted.
Also, when you want to change the ip address it should be a lot more easier since everything connected to the name in the config. #21 has to be build first for this.
Not only for checking but also letting the workflow go easier.
Additional flags to need be added to the basic backup from issue #5
- l, --location
Specify the folder
-f, --filename
Name of the file
The man
file gives a copy out to the shared local files so the documentation can be viewed in the terminal
man cohoast
A decent header for the hosts-file itself. Ascii of course.
For user configuration and not touching the shell, yaml comes to the solution
When the command to backup the hosts name is called it will do a backup. Very simple.
cohoast backup
To make it a little bit more attractive, add some colors
At this point, really the most basic as you can get.
For not depending on a host file, let it build up a host file from the ground up with its own settings.
Something in the far future to make it better brought up.
With its own history of deletion, adding and editing.
So its not depending on a host file itself anymore.
The category - block is not that good. Could be a lot better with some decent asci
After a command is fired from the menu (e.g. adding a hostname) and everything went good, everything should be cleared up in the screen and going back to the main menu.
The 'quit' statement should be the only command to stop the menu from recurring after an option is fired.
Give a return value zero or one in the terminal And probably use an echo for it.
cohoast has mydomain.com
Default filter should be category
cohoast list _mycategory_
Or use the flag -c
cohoast list -c mycategory
In the cli you can remove the hostname just by calling what the hostname is:
cohoast remove [ hostname ]
Create and link this to the 'man' command
cohoast help
cohoast add --help
cohoast remove --help
cohoast list --help
etc
In the command line type this
cohoast remove 192.168.3.211
This will remove all the hostnames under this address
Autocomplete commands in the CLI
Show the current version plus 'version name'
cohoast [ -v | --version ]
Using curl and a shell script hosted on this project, do an install to get the whole repository
curl http://githubthingie/install.sh | sh
Very useful for showing this in the readme documentation
This is why to have the backup, restore one.
cohoast restore #idbackupfile
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.