Coder Social home page Coder Social logo

ishaanbedi / swiftup Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 7 KB

A command-line tool written in Swift that allows you to check the reachability of URLs in all the Swift files and packages within a directory, including any nested directories.

License: MIT License

Swift 100.00%
spm swift swift-cli url-management

swiftup's Introduction

swiftup


swiftup is a command-line tool written in Swift that allows you to check the reachability of URLs in all the Swift files and packages within a directory, including any nested directories.

This tool is useful for verifying that the URLs referenced in your code are valid and accessible.


Installation

Prerequisites

Installation Steps

  1. Clone the repository:
git clone https://github.com/ishaanbedi/swiftup.git
  1. Navigate to the repository directory:
cd swiftup
  1. Compile and install the tool:
swift build -c release
  1. Move the binary file to a directory included in the system path:
mv .build/release/swiftup /usr/local/bin/swiftup

On macOS, the /usr/local/bin directory is typically included in the default system path.

On Linux, the recommended directory for system executables is /usr/bin.

After moving the binary file to a directory that is included in your system path, you can use the swiftup command from any directory on your system.

You may need to restart your terminal or log out and log back in for the changes to take effect.

Install using a single command

To install swiftup, compile the tool, and include it in the system path in a single command, run the following:

git clone https://github.com/ishaanbedi/swiftup.git && cd swiftup && swift build -c release;
sudo mv .build/release/swiftup /usr/local/bin/swiftup

To fix the permission denied error when executing the mv command, I've combined it with sudo command to give the installation process superuser privileges.

If prompted for a password at this step, please enter the password for your user account on the machine.

On macOS, this will clone the repository, navigate to the repository directory, compile and install the tool, and move the binary file to the /usr/local/bin directory, which is included in the default system path.

On Linux, the command will be similar, but the binary file will be moved to the /usr/bin directory instead.

Usage

swiftup [-s START] [-h] [-v]

Options

  • -s START, --start START: Start the processing of all files in the current directory
  • -h, --help: Show this help message and exit
  • -v, --verbose: Enable verbose output

Examples

To check the reachability of URLs in all files in the current directory:

swiftup

To check the reachability of URLs in all files in a specific directory:

swiftup -s /path/to/directory

Enabling verbose output will cause the tool to print more detailed information about the URLs it is checking and their reachability status. This can be helpful if you are trying to troubleshoot why a particular URL is not being reached, or if you simply want more insight into how the tool is functioning.

To enable verbose output, you can use the -v or --verbose flag when running the swiftup command.

For example:

swiftup -v

Demo

Check out this short demo of swiftup in action:

My Movie (1)

Note

Please note that swiftup is a tool that only checks the reachability of URLs and does not validate their content or replaces any occurrences of the URL.

It is the responsibility of the end-user developer or user to ensure that any unreachable URLs reported by the tool are corrected and points to the intended resources.

swiftup simply provides a way to identify and flag any URLs with possible reasons, that are not reachable, and it is up to the user or developer to take the necessary steps to address any issues arising.

License

This project is licensed under the MIT license.

swiftup's People

Contributors

ishaanbedi avatar

Watchers

 avatar

Forkers

dishant10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.