Automator script to rename files on Mac OS X [closed] - automator

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is there an easy way to use Automator on OS X to replace spaces in filenames with underscores?

I've set up a service called "Rename Items…" that can be run by selecting any item (or batch of items) in the Finder, right clicking, and then selecting Services > Rename Items…
This is useful as it will provide a small popup window when you perform the action, where you can choose whatever settings you want (for example, you can make the sequence sequential, replace text, add text, etc.)
In order to create something similar for yourself:
launch Automator
when prompted, choose the "Service" template.
drag and drop the Rename Finder Items action to the workflow area on the right (you can find this action easily by typing 'rename' into the search bar in the upper left of Automator)
you will be asked whether you want this service to duplicate files when they are renamed (preserving the originals) or just work on the files themselves (if you do this, your actions will not be undo-able)
configure the action to whatever you want the default prompt to be ("Add Date or Time", "Add Text", "Change Case", etc.) I have selected "Make Sequential" as my default, but you can do whichever you prefer.
At the bottom of the action bubble, there are 3 small buttons (Results, Options, Description). Choose Options, and then tick the box that says "Show this action when the workflow runs")
Lastly, at the top of the Automator window, you must configure two dropdowns that specify what this Service will be active for. Set this to: "Service receives FILES OR FOLDERS in FINDER.APP"
Save and you're done. Select any file in the Finder now, and under the Services menu you will find your new service (under whatever name you gave when saving, eg. "Rename Items…") Whenever you run this service, you will get a popup window that allows you to configure your renaming pattern.

I am another one that has never used Automator,and quite a lot of people say it`s easy to use. Judging by the above tutorial i find that very hard.
I am 64 years old,not technically minded,and to tell you the truth i would still prefer to do it manually.I have getting by all the time the same has a lot of people that do not evan mention it,and have never used it at all the same has me?

Related

How to disable Link Preview Chips in all Google Sheets/Docs?

I am using Google Sheets and Docs a lot at work (like most people I assume) and the link previews severely hinder my ability to work quickly. I have tried to google around to see how to remove this, I understand there are chrome extensions that can employ css to hide them to a certain degree but not fully. I am wondering if there is a way to remove them completely from all docs - not just from one at a time. Thanks!
I put in a little work to try a few things on your behalf. You can use the following steps. Each two-step process takes less than 10 seconds.
When you are ready to begin work in a particular sheet:
1.) Hit Ctrl-A to select the entire sheet range.
2.) With the entire sheet range selected, right click anywhere and hover over "View more cell actions" at the bottom of the menu that appears. Then choose "Remove links." All links in that sheet will now be deactivated.
When you are done in that particular sheet:
1.) Click Ctrl-H to bring up the Find/Replace dialog. (For this process, do not select the entire sheet first.)
2.) In the "Find" field enter http. In the "Replace with" field also enter http. For "Search" area, select "This sheet." Finally, hit the "Replace all" button. This should reactivate all links in that sheet.
Again, each of these two-step processes can be accomplished in just a few seconds.
Because this is an important work document, I would recommend that you practice this once or twice in a copy of some real sheet that has links in it (i.e., duplicate a real sheet within the spreadsheet, practice there, and when you're satisfied with your practice results, delete that duplicate sheet).
I also recommend before you do the first two-step process for any sheet, that you get in the habit of creating a new Named Range (File > Version history > Name current version), so that you can revert if needed. This is good practice for anyone who will be making significant changes to any sheet; and at the very least, it will provide peace of mind and confidence as you apply the workaround steps I've offered.

guidelines from a pro for IOS 6 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
i would like to know or maybe if someone can guide me what to do. for now im putting my mind on creating an app that gets the featured products on my website, using storyboard. where i click on products on my list in the tables view the it'll send me to next view to choose the product and when i click on the product and it'll go to another view where its details are written. i would know that it'll be done with parsing, or am i wrong.
its like, products --> products name list from web --> details
the interface and the tableview are already set, coding is just missing i just need to know where to begin.
Just a heads up, this question is far too broad for StackOverflow. You need to break this up and ask several smaller questions.
User Loads app, and it makes a request to your webserver asking for product list
(NSURLConnection)
Webserver receives request and sends encoded data back down. XML? JSON? Up to you.
(What software is running on your webserver? PHP? MySQL? Gather data and encode)
App Receives product data. Parse the encoding wrapper to get your object data.
(JSON or XML to NSDictionary, some good libraries available)
Populate data source with this data
Display data
If you have hundreds of products you'll probably need to reproduce this over and over, but that's up to you. If you only have a dozen or so it's probably easier to just send the whole chunk over on app startup.
Ace, if understand you correctly, the products itself should be fetched from the server. Then you can pick one or display the details. So, I would use a framework to connect and get the results from the server. There are things to consider: XML/JSON data parsing and mapping, Storing and caching the products, so you would be able to display them when there is no connections and updating with the latest changes. I am currently using RestKit which handles pretty much all of these things but for JSON. If you consider CoreData (database storage in iOS) you may need some additional help with retrieving the objects - MagicalRecord framework (on top of RestKit). It will handle things like findAll, findByAttribute:name: so you can get the objects you need. These frameworks are somewhat advanced, but on the other hand, they provide a sound ground for the UI stuff.
When you set up the backend integration and get your objects/collection of objects into the client, you can start populating the TableViews and displaying details.
One more thing to consider for a new project - CocoaPods. It is a very nice way to manage third-party libraries and frameworks. You just specify the libs you need and their versions (the good practice is to always specify the version, so the libs stay in sync) and it will fetch them and create a XCode workspace with them, so you don't have to worry about integrating them into the project. Both of the frameworks are there, just use
pods search <your_framework>
Good luck

PDF Parsing with Text and Coordinates [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am currently using PDF Box to parse a pdf and I am trying to figure out how to retrieve data about the text such as the font (bold, size, etc) and the location of the font.
Any suggestions?
After poking around the (hard to find) PDFBox docs, I found this little gem.
Apparently one of the examples shows exactly how to do everything you asked. Basically, you subclass PdfTextStripper and override the processTextPosition method. There, you query the TextPosition for whatever information you need.
For future reference, you can find the javaDoc here: http://pdfbox.apache.org/apidocs/index.html
Edit 2018-04-02: original link is dead, but example can be found in the SVN repo here.
One of the best things for text extraction from PDFs is TET, the text extraction toolkit. TET is part of the PDFlib.com family of products.
PDFlib.com is Thomas Merz's (the author of the "PostScript and PDF Bible") company.
TET's first incarnation is a library. That one can probably do everything you want, including to positional information about each text element on the page. Oh, and it can also extract images. It recombines+merges images which are fragmented into pieces.
pdflib.com also offers another incarnation of this technology, the TET plugin for Acrobat. Obviously you'd need Acrobat as well to make use of this.
And the third incarnation is the PDFlib TET iFilter. This is a standalone tool for user workstations. Both this is free (as in beer) to use for private, non-commercial purposes.
Lastly, TET also comes with a commandline interface.
TET is really powerful. Way better than Adobe's own text extraction. It extracted text for me where other tools (including Adobe's) do spit out garbage only.
A few months ago I tested their desktop standalone tool, and what they say on their webpage is true. It has a very good commandline. Some of my "problematic" PDF test files the tool handled to my full satisfaction.
This thing is my recommendation for every sophisticated and challenging PDF text extraction requirements.
TET is simply awesome. It detects tables. Inside tables, it identifies cells spanning multiple columns. It identifies table rows and contents of each table cell separately. It deals very well with hyphenations: it removes hyphens and restores complete words. It supports non-ASCII languages (including CJK, Arabic and Hebrew). When encountering ligatures, it restores the original characters...
Give it a try.
The GetPageText function with extract option 3 or 4 in Quick PDF Library returns a CSV string for the selected page which includes the text (either individual words or a piece of text) and the related font name, text color, text size and co-ordinates on the page.
Note: it is a commercial library and I work for the company that sells it.
PDF files can be parsed with tabula-py, or tabula-java.
I made a full tutorial on how to use tabula-py on this article. You can tabula in a web-browser too as long as you have installed Java.

free visual editor for graph (dot) files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Is there a free (as in "cheers"), linux-compatible, interactive visual editor for graphviz or other graphs? aptitude seems to be drawing a blank.
edit: "cheers" means both "beer" and "speech". meta-edit: I guess it should be "free as in beach".
edit 2: Maybe a suitable svg editor would be a more realistic goal. I basically want something that can be used to conveniently create a collection of labeled shapes and lines which connect them. Actually it would probably make more theoretical sense to extract the graph from this data, since it includes both semantic data (the graph) and presentation data (the way it's arranged on the screen, the colours used, etc). Is there a way to lay out labeled shapes conveniently with inkscape or some other free vector graphics editor? I really need rearranging of the nodes, and (re)flowing of the text in them, to happen with maximum convenience.
I've also realized that this is really a superuser question. I was going to repost it over there when I found an existing question that seems likely to provide me with an answer: dia.
edit 3: dia seems useful except that it doesn't seem to be possible to get the textual contents of node objects to wrap in any useful manner (ie any way other than by inserting manual line breaks). This is kind of a dealbreaker, since it screws most of the convenience factor that's my incentive to do things this way rather than with a text editor or a pen and paper. But it supports some sort of event model and Python-based scripting, so I'm going to dig around a bit and see if I can use python to wrap the text in response to content changes. Unless one of you lovely people has a better idea..? Basically I want to have the option to explicitly set the node size via GUI interaction, and have the contents wrap and rescale (within a certain range of font sizes) to fit it. Rich text would be pretty useful.
In other words, this is actually a valid SO question at this point, since it appears to require coding.
To save time those eager to try existing programs handling DOT graphs:
dotty can display DOT graphs and with little luck you can move its nodes with a mouse, nothing more, and you can easily segfault as a bonus (I tried latest stable graphviz)
lefty is only a special-purpose language interpreter used by dotty, nothing to look at
KGraphEditor is an empty wishful project (a QT window and a few buttons)
gvedit is not really a graph editor: it provides a simple text editor and you hit F5 to run a layout tool and open a picture; you can actually get more functionality from configuring your own favourite text editor
grappa is an abandoned java applet, which I failed to run
interestingly, dia can export to DOT ("PyDia DOT Export"), but due to its buggy printing, you have to post-process the files to use them
graphedit can read in DOT a graph and you can move its nodes around and change their colors
Eclipse people started working on DOT support in GEF4, so it can display DOT graphs
GraphUI has a very interesting demonstration video, but beware: although it might seem that the graph is being created by clicking and dragging, in reality all editing happens through the keyboard, using shortcuts. On the plus side, contextual instructions are always available showing which shortcuts do what.
DotEditor claims a tree editor, modifying node attributes/color/shape with mouse.
The graph editors mentioned in other answers, yEd (a Java application) and JointJS/Rappid (a JaveScript thing) apparently have nothing to do with DOT (tried both).
I believe there exist no working DOT-handling graph editor out there at all.
JointJS is a Javascript graph editing library based on Backbone : http://www.jointjs.com/
The author also provides Rappid, an online graph editor which might suit your needs, I don't know about dot files import though.

How to generate a printed form with dynamic inputs [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Our customer would like to give participation certificates for students undergoing a singing class. Currently they have printed certificates where in they fill the candidate name and the grade he obtained with the teachers signature.
We would like to automate this, so that the dynamic output mentioned above is automatically printed somehow on this sheet. How do we do this? Are there any tools which help you with positioning the dynamic output onto this template sheet.
http://www.123certificates.com provides some of the capabilities but looks like printing will happen on an A-4 sheet, how would you make this print on a dynamic template (either in pdf or word)
Not sure what the correct tags are for this question
You could just use OpenOffice (or MS's suite) with mailing fonctionnality. For precise placement, you could use a document with tables having fixed columns/row length.
For example, you'd have blank OO Writer document, with tables, and you'd positions the wanted fields accordingly. Since it's a certificate, maybe you'll want to put the page in landscape mode.
You'd have another OO Calc document, with the names of all the people you'd want to print a certificate for.
Then you just follow this tutorial on mail merging:
http://documentation.openoffice.org/HOW_TO/word_processing/writer2_EN.html
Print your page a few times on a blank sheet to see if everything fits/align properly.
Oh, and watch out for long names.
Then you can print it on the "real" certificate paper.
I've seen things like this done all the time in office settings and, as Aissen said, it's often referred to as "mail merging" and is used to create things called "form letters." Typically you have a list of data (often in a spreadsheet like Excel) and a corresponding document with "place holders." Each column in the spreadsheet corresponds to a "place holder" on the form/document (certificate in your case) and each row in the sheet represents a separate document/certificate.
It's very easy to do and very well documented online and, fortunately, is one of the primary features of Microsoft Word. Here are some examples:
Best Example
(VIDEO): Use an excel file to mail merge names into a word document--certificates of completion for a group of students
Other Examples
(Video): Microsoft Word: Mail Merge
(Video): Wdandp Presents: How to Use Mail Merge
(Video): How to Do a Mail Merge in Microsoft Word & Open Office
(MS Support Document): How to use mail merge to create form letters in Word
(Tutorial): Preparing a form letter with Word and Excel
I hope some of that helps in some way! In the very first video, they are doing EXACTLY what you need.
gMale

Resources