Skip to content

Commit

Permalink
Add Redact plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcgrtz committed Feb 20, 2019
1 parent 718cce6 commit ace5c72
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 18 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014–2017 Marc Görtz <https://marcgoertz.de/>
Copyright (c) 2014–2019 Marc Görtz <https://marcgoertz.de/>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
# My PopClip extensions

These are some personal [PopClip](http://pilotmoon.com/popclip)
These are some personal [PopClip](https://pilotmoon.com/popclip)
extensions I use on a regular basis.

## List of extensions

* **Jira ID**<br>
![Jira ID Sample](https://cdn.rawgit.com/Dreamseer/popclip-extensions/master/jira-id-sample.png)<br>
You all know this: The Project Manager Guy comes along asking “Hey,
what about LOLPROJECT-1337? Will it be in the release next week?”, or
the Controlling Guy asks “Can you put some estimates on AWESOME-42?”
And you need to fire up your browser, type in the URL of your Jira
installation, append the ticket ID… ugh! Struggle no more, here comes
the PopClip Jira ID extension: Just select the ticket ID, click the
fancy Jira icon in PopClip and… abracadabra, there you go!
Additionally the URL is put into your clipboard.

* **Open in Chrome Canary**<br>
This is almost the same extension as
[Open in Chrome](http://pilotmoon.com/popclip/extensions//page/OpenInChrome),
but it opens the current URL in Chrome Canary.
* **Jira ID**<br>
![Jira ID Sample](https://cdn.rawgit.com/Dreamseer/popclip-extensions/master/jira-id-sample.png)<br>
You all know this: The Stake Holder Guy comes along asking “Hey,
what about LOLPROJECT-1337? Will it be released next week?”, or
the Product Owner Guy asks “Can you put some estimates on AWESOME-42?”
And you need to fire up your browser, type in the URL of your Jira
installation, append the ticket ID… ugh! Struggle no more, here comes
the PopClip Jira ID extension: Just select the ticket ID, click the
fancy Jira icon in PopClip and… abracadabra, there you go!
Additionally the URL is put into your clipboard.

* **Redact**<br>
Replaces selected text with a pre-defined symbol. Useful if the
Slack Admin Guy disables deletion of messages while still allowing
editing.

* **Open in Chrome Canary**<br>
This is almost the same extension as
[Open in Chrome](https://pilotmoon.com/popclip/extensions//page/OpenInChrome),
but it opens the current URL in Chrome Canary. (You could also use
[Choosy](https://www.choosyosx.com/)
and the
[Choosy PopClip Extension](https://github.com/georgebrock/choosy-popclip).)

## License

Copyright (c) 2014–2017 Marc Görtz <https://marcgoertz.de/>
Copyright (c) 2014–2019 Marc Görtz <https://marcgoertz.de/>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
Expand Down
Binary file added redact.popclipextz
Binary file not shown.
42 changes: 42 additions & 0 deletions src/redact/Config.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Version</key>
<integer>1</integer>
<key>Extension Name</key>
<string>Redact</string>
<key>Extension Identifier</key>
<string>de.marcgoertz.popclip.extension.redact</string>
<key>Extension Description</key>
<string>Redact the selected text.</string>
<key>Actions</key>
<array>
<dict>
<key>After</key>
<string>paste-result</string>
<key>Image File</key>
<string>redact.png</string>
<key>Script Interpreter</key>
<string>/usr/bin/php</string>
<key>Shell Script File</key>
<string>redact.php</string>
<key>Title</key>
<string>Redact</string>
</dict>
</array>
<key>Options</key>
<array>
<dict>
<key>Option Identifier</key>
<string>symbol</string>
<key>Option Label</key>
<string>Redacting symbol</string>
<key>Option Type</key>
<string>string</string>
<key>Option Default Value</key>
<string></string>
</dict>
</array>
</dict>
</plist>
6 changes: 6 additions & 0 deletions src/redact/redact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
mb_internal_encoding('UTF-8');
$input = getenv('POPCLIP_TEXT');
$length = mb_strlen($input);
$symbol = getenv('POPCLIP_OPTION_SYMBOL');
echo str_repeat($symbol, $length);
Binary file added src/redact/redact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ace5c72

Please sign in to comment.