Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helje5/macrocows
A Swift macro plugin that expands Strings into ASCII Cows, right at compile time.
https://github.com/helje5/macrocows
Last synced: 3 months ago
JSON representation
A Swift macro plugin that expands Strings into ASCII Cows, right at compile time.
- Host: GitHub
- URL: https://github.com/helje5/macrocows
- Owner: helje5
- License: mit
- Created: 2023-06-12T16:21:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T14:58:01.000Z (over 1 year ago)
- Last Synced: 2024-10-11T12:25:44.296Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 383 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MacroCows
> 400+ ASCII ðŪs
![](https://cloud.githubusercontent.com/assets/170270/13090998/a9cdd6b0-d52b-11e5-83ec-614143c9a3bb.png)
What is it? A Swift 5.9 compiler plugin that provides the `#ðŪ` [Swift macro](https://developer.apple.com/documentation/swift/applying-macros).
It replaces the cow mentioned in the macro w/ one of the ASCII cows
provided by the Swift [cows](https://github.com/AlwaysRightInstitute/cows) package.### Usage:
```swift
let compilerCow = #ðŪ("compiler")
print(compilerCow)
```
If no cow matching the string is available, Xcode will produce an error:
![Xcode using MacroCows](images/MacroCows.png)*Requires*: Xcode 15beta+.
### Related
- Apps:
- [CodeCows](https://zeezide.de/en/products/codecows/) for macOS, includes a cows service and Xcode editor extension
- [ASCII Cows](https://zeezide.de/en/products/asciicows/) for iOS, includes a cows message app extension
- Swift [cows](https://github.com/AlwaysRightInstitute/cows) package
- Swift Macros:
- [Intro to Swift macros](https://developer.apple.com/documentation/swift/applying-macros)
- WWDC 2023: [Expand on Swift macros](https://developer.apple.com/videos/play/wwdc2023/10167)
- Original:
- [cows](https://github.com/sindresorhus/cows) - Node.js cows, the original
- [vaca](https://github.com/sindresorhus/vaca) - Get a random ASCII cow ðŪ
- [cows-docker](https://github.com/alexellis/cows-docker) - ASCII cows on Docker### License
MIT ÂĐ [Sindre Sorhus](http://sindresorhus.com)
Noze.io port: MIT ÂĐ [ZeeZide GmbH](http://zeezide.de)### Who
**Macro** is brought to you by
[ZeeZide](http://zeezide.de).
We like
[feedback](https://twitter.com/ar_institute),
GitHub stars,
cool [contract work](http://zeezide.com/en/services/services.html),
presumably any form of praise you can think of.