Manage Snippets Mac Informer. Featured Manage Snippets free downloads and reviews. Latest updates on everything Manage Snippets Software related. ScriptFlow is a simple and lightweight code snippets manager made for developers.and lightweight code snippets manager made for developer.stores your code snippets on iCloud. Free 11 Conceited Software. Snippets Lite is an application that saves time when you type. The app lets you create snippets of text that can. Before, you had only one option, Command-Click, to insert selected snippet immediately. However, many of you wanted other options like Copy and Edit Code. In CodeBox 1.4, you are free to configure any command as you wish. For instance, Command-Click to Insert Code, Option-Click to Copy, Shift-Click to Edit code and placeholders.
Here we go then, these five code snippets are fairly awesome, even if I say so myself.
Get today’s five snippets in a tiny zip from MediaFire.
The code below will grab all the links from a webpage.
This could be modified to grab all the text and images from the page as well. Maybe options for other file types and a simple GUI could be added. A nice little coding project in the making?
You might first need to “pip install requests”.
This bit of code also uses the “re” module (regular expressions), which is part of the standard library in Python 3, so no pip install is required for that one.
Double click inside the code box to select all
Starting out with the above code snippet, I went on to write a scraper script to download text and graphics from WordPress blogs.
Be careful using this, as some security software can get nervous. Also, if it wrecks someone’s drive you could be liable, so I guess I had better say that you use this at your own risk, and can’t hold me liable for any damages etc. etc.
After running this, Avira virus checker blocked my python.exe, and I had to add it as an exception to get python to work again, but after that, no problems.
That said, this could still be l something one might need one day, (how about a Windows Shutdown Timer?), so I am listing it here for the record.
This uses Google Translate’s Text-to-Speech API. You can change the English accent to Aussie, en–au or American, en-us, if you wish. You can set other languages too, like fr (French), es (Spanish) etc. See Google language codes for a list of these codes.
Note that long texts can take a while to process, but it does get saved as an mp3 so you only have to do it once. I used this snippet to build TIM-The Insult Machine.
This code snippet has a ton of potential uses, just go ahead and have fun with it. What about an E-book reader that reads the book to you? Or maybe you could use the voice produced inside a game, video voice over, or an app?
I found that the speech was rarely perfect, but with some common sense changes in the text, you can make it easier for Google. For example, by changing certain words that it stumbles on for easier words, or changing punctuation or the spelling etc.
The code uses the gTTS module (Google Text To Speech), so you will need to “pip install gtts” first.
You will also need to prepare a plain text file with a line or two of text in it, name it test.txt, and save it to the same directory that you are running the code from.
When the code runs successfully it should use whatever program your system has associated with playing mp3’s. This may make this code Windows only, but I am not sure. Mac and Linux users may have a way around this, or it could work the same way as Windows.
Update: Any problems with MAC or Linux then use webbrowser.open(“start pcvoice.mp3”) instead of os.system(“start pcvoice.mp3”). You will need to pip install webbrowser first though, unless you already have it installed.
I like this snippet a lot. I feel a future GUI coming on.
“urllib” and “xml” are both part of the Python standard library, so no pip installs are required in the following code.
I have already written three posts about this code in my Newsbox tutorial, so it would be pointless repeating it all here again.
I think you could use this as the basis of a available domain searcher, but I’m not 100% sure how to do it.
You may need to “pip install python-whois” first.
Here is the Python whois page, it is not exactly helpful to noobs. Also all WhoIs modules I have tried on my Windows machine are a bit flaky and often report incorrect results.
According to an old stack overflow post, WhoIs should be fine on old Python V2 and Linux machines but not so much Windows. I have left this snippet in the collection for reference, and for non Windows users, I guess.
If I do finally find a WhoIs module that works 100%, and I can access separate parts of the data, like the address of the registrant, (so one can see if the domain is taken or not), I will update this part of the post.
I keep coming back to this every few months as I would love to do a WhoIs with GUI to find available domain names, but at the moment it just ain’t happening bra’.
Check out the video at the end of this post, where the guy shows another way of coding this and it appears to work, he is using a Mac.
Get today’s five snippets in a tiny zip from MediaFire.
Updated November 2019
Previous post:Python Code Snippets #2
Next post:Python Code Snippets #4
What a day! Keynote by Apple was so exciting. And this is only beginning of the magical WWDC week! I'm 2x happy because of Apple Review Team approved version 1.4 right during the Keynote. I cannot believe these guys were working while Steve was announcing iOS 5 and iCloud. Bravo Apple! So, what's new in CodeBox?
There is no more need to copy code and attributes one-by-one to transfer snippets between different CodeBox libraries. Now you can copy and paste or drag and drop whole Snippets, Groups, Folders and Smart Groups between libraries. This makes code snippet management extremely easy.
CodeBox 1.3 brought support for adding files and folders from Finder. CodeBox 1.4 continues Finder integration and adds support for dragging whole folders, groups and snippets into Finder. For example, you can drop the complete project template including subfolders and all nested files. Neat?
If you are an advanced Mac user, you must have heard about text expanding tools like TextExpander. According to your feedback, CodeBox really missed text expanding feature. So why not have it at hand? Adding abbreviations is easy: just write some letters before the asset name and attach them using a symbol @.
Say, you have an asset.txt with your email signature. Click the Asset tab and edit its name by adding the shortcut like here: SIGN@asset.txt. Next, save the library and switch to another Mac application. Type ‘SIGN’, and CodeBar should automatically replace it with contents of the ‘asset.txt’.
The new service named Add to CodeBox allows you to select a piece of text from any application and create a new snippet with this text. Please, do not forget that you can define a custom Keyboard Shortcut to call the service in System Preferences.
Also, you can bookmark the link Add to CodeBox to create new snippets right from your browser. The workflow is as follows: install that link into the Bookmark bar, then select a piece of text on a webpage and click the Add to CodeBox bookmarklet. CodeBox will create the new snippet containing current selection.
In addition to revamped user interface, new CodeBar added support for custom Keyboard modifiers. Before, you had only one option, Command-Click, to insert selected snippet immediately. However, many of you wanted other options like Copy and Edit Code.
Here we go! In CodeBox 1.4, you are free to configure any command as you wish. For instance, Command-Click to Insert Code, Option-Click to Copy, Shift-Click to Edit code and placeholders.
I think this is the best release of CodeBox ever, and I hope you will like and use it as much as I do. As always, I want to thank you for reporting bugs and issues, suggesting new features and leaving reviews in the Mac App Store. Go get an update guys!
Tips and Tricks for CodeBox updated on the Hidden Preferences page.