wayneyaoo / alfred-cheat Goto Github PK
View Code? Open in Web Editor NEWManage your self-defined cheat sheets & knowledge base in Alfred
License: MIT License
Manage your self-defined cheat sheets & knowledge base in Alfred
License: MIT License
Hi, I want to test the workflow but I see the latest release seems quite outdated. So I want to package a workflow by cloning the repo. But I don't know how to create a proper .alfredworkflow
file from the raw repo. I unzipped the .alfredworkflow
file from the latest release and saw some files that aren't in the repo. How do I go about it? Thanks!
Thanks to @odapg's proposal. I've planned to add a couple of new features to this tool. They're listed below. Comments and ideas are welcome.
Some comments and commands in the cheatsheet are too long to display in the Alfred window. Let's add โ+L
to enable large text preview.
It'd be great if I can open in editor
when I'm checking out some command quick while needing to add new notes quickly.
Preview the cheatsheet in a pretty-formated HTML as Mac Quicklook does.
Add multiple line command and comment support
Would it be possible to fix it? Thanks.
Hi, first off, this is really neat. I love the idea and thanks for creating this!
I had an idea for a feature, which is to add a placeholder syntax. Let's say I write the following cheat:
# Format as FAT32 with 64 kB clusters
newfs_msdos -F 32 -c 128 -v NAME /dev/rdisk4s1
This command contains parts where we could utilize placeholders:
newfs_msdos -F 32 -c 128 -v [[NAME]] /dev/r[[DISK]]
My idea is that when the user selects this entry (containing placeholders for NAME and DISK), Alfred would prompt for their values before it's pasted/copied to clipboard.
This feature could also help protect against using dangerous hard-coded values (like disk path) which, in this case, could wipe the wrong drive.
PS. I had an idea about using globs as well [[/dev/rdisk*]] which could present a multiple-selection of available values but this only works locally and will quickly become way too complex ๐.
As a command that allows you to add a new chest to a sheet. Basically appending two lines to the cheat sheet.
There shoud be a way to organize cheats in folder.
Nothing should really change in the usage of the plugin but it should search for cheats recursively.
Request URLs be opened rather than copied. I've done this locally for myself by adding a conditional for
matches regex '^https?://'
open->'Open URL'
else->copy/notify
Its more consistent with how workflows are usually implemented, also it lets you easily see where your current path is
Hi, I posted a feature request in Alfred Forum but you may not monitor that so copying here as well:
Hi again, I'm using this workflow a lot, and I have not experienced any problems after updating to macOS Big Sur. I have one feature request (besides autoupdate as asked before), would it be possible to optionally copy also the comment for a command (written as "# comment" above the command in the text files), .e.g. using another modifier such as the option key? I sometimes find a need to not only copy / paste the command itself but also the comment along with the command.
just for the sake of quickness, could you add -s
as an equivalent alternative to --search
? would make it much quicker.
I have some cases, where I actually want to have #
in the subtitle. However, they never appear, likely cause the script thinks its another comment. '#'
or \#
also did not work for me. Is there a proper way for espacing? If not, I formally request one :) thanks!
In the readme.md you point to https://github.com/wx-Yao/alfred-cheat/blob/master as an example for writing a cheat sheet โ not found
It should be possible to ignore files and directories in the cheat folder.
Like ".git/" or ".DS_Store"
If the cheatsheet is empty, listing content in it will fallback to the default Alfred search result, which is not cool.
Will add a semantic hint in the next release.
is it possible to copy result to clipboard or paste directly to iTerm2?
I notice that the current searching logic isn't ideal. Sometimes it doesn't give me what I want. I'm currently onto this problem and won't close this issue until I tuned the logic to be acceptable.
If you're facing the same issue, please wait patiently for next release.
hello i followed the readme but i cannot get the success message to pop up after entering cf ~/.cheat
into my alfred box.
am i missing a step?
this is what i did:
cf ~/.cheat
im on a mac m1 / os monterey version 12.3.1
Hi,
Thank you for your interest in this little project. As you can see this project has a couple of opening/unaddressed issues, outdated releases, not-much-updated README, yet I'm still here, replying issues but no concrete progress on this project. All these have reasons. I'd like to explain a little bit and talk about the future of this toy.
A couple of reasons why I don't actively develop on this project:
Due to work reason, I (unfortunately) have to switch to Windows as my major workstation. MacOS (and hence Alfred) was gradually fading out of my day to day workflow.
I can't say developing an Alfred plugin is a quite readily progress though it's still okay, given the values (efficiency, productivity etc.) it brings. The development involves weird testing and packing process and is quite easy to forget after weeks. I did try to pick up this project during my spare time, when only a few issues emerged but it needed a lot of Googling. so it never succeeded.
This project depends on a Python2 library here. One of the painful experiences in Python2 is that str
is quite different from that in Py3... The author of the library is not willing to upgrade to Python3 for compatibility reason (see issue: deanishe/alfred-workflow#97). Adding this to point 2? No thanks.
The plan:
So I neither don't plan to totally abandon this project, nor start to add new features/fix issues. I'll wait for at least the library version bump before I can swallow the "fine" experience of point 2.
In the meantime, I believe the release, though it's pretty old, still works since the library tried its best to be compatible. So unless you have specific needs, you can still use the release. And if you do have new feature needs, as any other open source projects do, you can always fork and implement your own.
Sorry if this brings inconvenience to you. I'll come back when the lib is upgraded.
And thank you for your support.
Hi. I updated my System to Ventura. On my previous macOS Version it worked.
What I observed. Ventura seems to have droped the default installation of python2. I had already installed python3 on my system, so I made a symbolic link to it
/usr/local/bin/python -> ../Cellar/[email protected]/3.10.6_2/bin/python3
But this did not help. When I run in Alfred4 cf ~/cheat
I get an error message in the Alfred4.workflow.bug-console
[22:30:01.108] Cheat[Keyword] Processing complete
[22:30:01.117] Cheat[Keyword] Passing output '~/cheat' to Run Script
[22:30:01.184] ERROR: Cheat[Run Script] /bin/bash: python: command not found
Afterwards, when I try to run cheat foo
I get the following message in Alfred4.workflow.bug-console
[22:30:45.376] Cheat[Script Filter] Queuing argument '(null)'
[22:30:45.386] Cheat[Script Filter] Script with argv '(null)' finished
[22:30:45.388] ERROR: Cheat[Script Filter] Code 127: Exited with error code but no message
any ideas to solve the problem?
Apple removed Python 2 support in Monterey 12.3, and the workflow is no longer functional. A rewrite into Python 3 is needed.
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.