Git Product home page Git Product logo

catbag's Introduction

🐱bag

A repository of loose helpers, base clases and assorted code that can be trivially referenced individually or by folders, using dotnet-file.

cat:

  1. cat is one of the most frequently used commands on Unix-like operating systems. It has three related functions with regards to text files: displaying them, combining copies of them and creating new ones.
  2. (bag): in spanish, "bolsa de gatos". In Argentina, roughly a "mixed bag" of code, especially when referring to projects like "Helpers" and "Common" which everyone hates but can't quite avoid.

You can efectively "cat" files from this repo straight into yours.

Each piece of functionality that extends the dotnet framework (or any library, actually) in this manner, is hereafter known as a 🐱 (:cat:).

For example, running the following on your repository root:

> dotnet file add https://github.com/devlooped/catbag/blob/main/System/Xml/XmlWrappingReader.cs src/Common/

Will download and add the file to src/Common/System/Xml/XmlWrappingReader.cs (you cat the remote file). If no target directory is specified, the file will be downloaded to the current directory, under System/Xml. If you want to downlodad it without a directory structure at all, to the current directory, you can pass . as the target directory.

Once downloaded, dotnet-file creates (or updates) a dotnet-config file in the current directory named .netconfig as follows:

[file "src/Common/System/Xml/XmlWrappingReader.cs"]
	url = https://github.com/devlooped/catbag/blob/main/System/Xml/XmlWrappingReader.cs
	sha = 19be5e474022ab5b8993b29509a3929439f510e9
	etag = a4dba639f18b47a9e480704abf86b1ba2582c54b76a520d7ed988aa1efcd7b8d

The url is used in combination with the etag to detect changes in the source file afterwards, whenever you run dotnet file update. The sha is used if you pass a -c|--changelog file path to the command, which will contain the diff between the local sha and the latest one at the source. See PR#46 and PR#40 for example.

You can easily automate running these checks for updates in CI on a schedule, to automatically generate those update PRs shown above. See dotnet-file.yml as an example that does this using GitHub Actions.

Sponsors

Clarius Org Kirill Osenkov MFB Technologies, Inc. Stephen Shaw Torutek DRIVE.NET, Inc. Ashley Medway Keith Pickford Thomas Bolon Kori Francis Toni Wenzel Giorgi Dalakishvili Mike James Dan Siegel Reuben Swartz Jacob Foshee Eric Johnson Norman Mackay Certify The Web Ix Technologies B.V. David JENNI Jonathan Oleg Kyrylchuk Charley Wu Jakob Tikjøb Andersen Seann Alexander Tino Hager Mark Seemann Angelo Belchior Ken Bonny Simon Cropp agileworks-eu sorahex Zheyu Shen Vezel Georg Jung

Sponsor this project  

Learn more about GitHub Sponsors

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.