Announce and Discuss the Latest Theme and Extension Releases.
yemiteliyadu
Posts: 3Joined: May 6th, 2015, 12:04 pm
Posted May 7th, 2015, 4:30 pm
oombii wrote:yemiteliyadu wrote:I am having trouble with one particular customization: %selection% - %links_text% - %url% My intent is to copy the selected text with embedded links following it and ending with page url. The resulting text is all joined together without line breaks. However, the individual items %selection%, %links_text%, and %url% are all formatted fine with proper line breaks and spacing. Any suggestions on how to fix my template to retain the line breaks?
I think the problem is that you haven't added line breaks between the variables themselves. So your template should look like this: - Code: Select all
%selection%
%links_text%
%url%
You can add newlines in the Template text box by just pressing Enter (or just template the code above).
Thanks for your response. It was actually something else I discovered something by accident. Due to a bug or conflict somewhere, the Options window was truncated at the bottom on my Mac, and when I created the template I could not see the options below that had a dropdown that was set to HTML and a check box that was checked as "Format for HTML". These were the result of creating my template by duplicating an HTML template (my first experiment with Easy Copy). Today, when I tried to insert your template, the window opened up and these options came into view. I set the dropdown to "Text" and unchecked the box. All is well now. However, other users might be having this truncation issues too. Link to picture of truncated Options window below. This truncation happens almost always on my Mac. https://dl.dropboxusercontent.com/u/545 ... 3%20PM.png
Last edited by DanRaisch on May 7th, 2015, 4:58 pm, edited 1 time in total.
Reason: Image tags removed to restore page formatting.
CleverClogs
Posts: 3Joined: December 2nd, 2011, 3:53 pm
Posted May 8th, 2015, 1:00 am
Oombii, I finally get understand why the Copy Title - Link action was grayed out - very happy with your cues! You were right that I added another substitution variable to the template, being %selection%. I didn't realize that if no text is selected, the action will be grayed out entirely. It also explains why on a new Firefox profile I wasn't getting these problems  . The obvious next question is: do you agree it would be a good idea if you'd make %selection% a conditional variable? If nothing is selected, then output nothing for that variable? Thanks for your support!
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted May 10th, 2015, 12:36 pm
Excellent and glad it's working now for you. Thanks for following that up with the developers and updating everyone.
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted May 10th, 2015, 12:48 pm
CleverClogs wrote:I didn't realize that if no text is selected, the action will be grayed out entirely. It also explains why on a new Firefox profile I wasn't getting these problems  . The obvious next question is: do you agree it would be a good idea if you'd make %selection% a conditional variable? If nothing is selected, then output nothing for that variable?
I agree. When I initially built this feature I was considering actually not implementing it at all but then went ahead anyway (enthusiasm, I guess). Now I feel like you do: that templates should always be enabled even if the context might not apply but that variables will then just return blank if there's nothing for them to copy. I just haven't bothered going back and removing this behaviour. I'll add an issue to remove this behaviour so templates will always be enabled. I think it will remove any possible confusion and returning blanks when the context doesn't apply still makes sense. I just have to determine the impact and do some testing, so not sure when it will be done. BTW, for the new release that will have variables for image details (%image_alt_text% and %image_source_url), I'll make them work like above, ie. return blank if not hovering over an image. Thanks for the feedback.
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted May 10th, 2015, 12:59 pm
yemiteliyadu wrote:It was actually something else I discovered something by accident. Due to a bug or conflict somewhere, the Options window was truncated at the bottom on my Mac, and when I created the template I could not see the options below that had a dropdown that was set to HTML and a check box that was checked as "Format for HTML". These were the result of creating my template by duplicating an HTML template (my first experiment with Easy Copy). Today, when I tried to insert your template, the window opened up and these options came into view. I set the dropdown to "Text" and unchecked the box. All is well now. However, other users might be having this truncation issues too. Link to picture of truncated Options window below. This truncation happens almost always on my Mac.
Glad it's working for you and thanks for following up with the truncation issue. That is a weird one and something I've never seen on Windows. I've added it to the list of issues. Unfortunately I don't have a Mac around so I'd have to take a stab at what could be wrong. And when you say it "happens almost always", it sounds like it's an intermittent thing or context-dependent, so that'll make it even harder to track down. But I'll do some investigation and (hopefully) release a fix. Not sure when though as I might not have time for Easy Copy in the next couple of weeks.
evdbogaard
Posts: 1Joined: May 29th, 2015, 3:02 am
Posted May 29th, 2015, 3:15 am
Is it possitble in a template to replace characters that are not allowed in a file name?
E.g. when I print a web page to pdf and want to uwe the title as name to save it, I need to replace characters like : and / by some other characters like _ or -. It would be veru convenient if I could define that as part of a template
Regards, Ed
samjesse
Posts: 2Joined: May 29th, 2015, 12:56 am
Posted May 29th, 2015, 3:27 am
Hi Is there a way to get the path of a page_url for example: Ctrl+Shift+U copies the page url to the clip board ( http://www.domain_name/path_name.aspx). I would like to get path_name and not the whole page_url. I tried this entry %path% in Options > Template or Formatting for no avail. Any help is much appropriated. Thank you
yemiteliyadu
Posts: 3Joined: May 6th, 2015, 12:04 pm
Posted May 30th, 2015, 12:32 pm
Two similar templates format the results differently with no apparent reason why. Examples are given below … please notice how <p> gets converted to "<p>" and other conversions in the second template, but only in the second part where it says "%html_source%" I am using Firefox 38 on Mac Os 10.10.3 Please take a look for yourself to see if you can replicate. This was not expected. If this is the expected behavior of this template, please let me know what template to use to get the result without the conversion. Thanks. Template: %html_source%
Result: <p>Carl Icahn may be on to something <a href="http://www.bloomberg.com/news/articles/2015-05-18/billionaire-investor-icahn-says-apple-s-shares-are-worth-240">in his push</a> for Apple to continue to send more money back to shareholders.</p><p>According to new research from Citigroup, companies that have been making higher payouts to their investors have been heavily rewarded by the market. The note suggests that Icahn's activist Apple strategy may pay off -- at least in the short-term. There is of course an <a href="http://www.ft.com/intl/cms/s/0/1aaac576-e9bb-11e4-a687-00144feab7de.html#axzz3bA6VlBmQ" title="US share buybacks loot the future - FT.com" data-web-url="http://www.ft.com/intl/cms/s/0/1aaac576-e9bb-11e4-a687-00144feab7de.html#axzz3bA6VlBmQ" target="_blank">ongoing debate</a> -- which isn't addressed in the Citi note -- about the longer-term implications of companies opting to spend more of their money on dividends and share buybacks than on investment.</p>
Template: <a href="%page_url%">%page_title%</a>
%html_source%
Result: <a href="http://www.bloomberg.com/news/articles/2015-05-29/citi-here-are-a-bunch-of-companies-spending-more-money-on-their-shareholders-than-on-their-businesses">Citi: Here Are a Bunch of Companies Spending More Money on Their Shareholders Than on Their Businesses - Bloomberg Business</a>
<p>Carl Icahn may be on to something <a href="http://www.bloomberg.com/news/articles/2015-05-18/billionaire-investor-icahn-says-apple-s-shares-are-worth-240">in his push</a>&nbsp;for&nbsp;Apple to continue to send more money back to shareholders.</p><p>According to new research from Citigroup, companies that have been making higher payouts to their investors&nbsp;have been heavily rewarded by the market. The note suggests that Icahn's activist Apple strategy may pay off -- at least in the short-term. There is of course an&nbsp;<a href="http://www.ft.com/intl/cms/s/0/1aaac576-e9bb-11e4-a687-00144feab7de.html#axzz3bA6VlBmQ" title="US share buybacks loot the future - FT.com" data-web-url="http://www.ft.com/intl/cms/s/0/1aaac576-e9bb-11e4-a687-00144feab7de.html#axzz3bA6VlBmQ" target="_blank">ongoing debate</a>&nbsp;--&nbsp;which isn't addressed in the Citi note -- about the longer-term implications of companies opting to spend more of their money on dividends&nbsp;and&nbsp;share buybacks than on investment.</p>
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted June 5th, 2015, 4:41 am
evdbogaard wrote:Is it possitble in a template to replace characters that are not allowed in a file name?
It would be possible to add since Easy Copy already supports something similar for HTML called "Format for HTML". You would then have the option of "Format for Filename" or something similar. I'll add this to the list of new features and hopefully it won't be too hard to implement (although I can't say when it'll be done).
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted June 5th, 2015, 4:44 am
samjesse wrote:Is there a way to get the path of a page_url for example: Ctrl+Shift+U copies the page url to the clip board ( http://www.domain_name/path_name.aspx). I would like to get path_name and not the whole page_url.
You can't do it at the moment but another user suggested the same thing (nickodemos on 7 May) so I've already got a new variable %relative_url% on the list of new features. It will copy the *entire* relative path but in your example it'll just resolve to path_name.aspx. Eg. http://www.somedomain.com/path/to/doc.html will resolve to "path/to/doc.html".
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted June 5th, 2015, 4:46 am
yemiteliyadu wrote:Two similar templates format the results differently with no apparent reason why. Examples are given below … please notice how <p> gets converted to "<p>" and other conversions in the second template, but only in the second part where it says "%html_source%" I am using Firefox 38 on Mac Os 10.10.3 Please take a look for yourself to see if you can replicate. This was not expected. If this is the expected behavior of this template, please let me know what template to use to get the result without the conversion.
You probably have "Format for HTML" ticked which means that it replaces certain HTML characters with their encoded equivalent to make the HTML valid. The way to work around this would be to ensure that the 2nd template has "Format for HTML" unticked. That way it will leave not format the %html_source% variable. It does mean though that it won't encode the text in %page_url% and %page_title% either: If your template Type is "text" then you have nothing to worry about. If your template Type is "html", it means that if the URL or title contains certain characters such as <, > and & then the HTML might not display correctly. But I wouldn't worry too much - most applications and browsers are equipped to deal with certain invalid HTML. So, the best thing in your case would be to deselect "Format for HTML" as it would work in most cases.
oombii
Posts: 55Joined: February 6th, 2012, 3:08 pm
Posted July 3rd, 2015, 4:22 am
Easy Copy is now on PatreonEasy Copy is now on Patreon. Become a patron and contribute to the ongoing development of Easy Copy. Why Patreon?Patreon is another way for you to say thank you and contribute to the future development of Easy Copy. I enjoy working on Easy Copy and it's always a big motivation for me to know that people are contributing on an ongoing basis. The Patreon page is not just for Easy Copy but also for other apps, blogs and extensions that I've created. So if you become a patron, you won't just be supporting Easy Copy, but also those other great products. How it worksGo to Easy Copy's Patreon page and become a patron. You pledge a fixed amount to Easy Copy every month. The contribution is recurring on a monthly basis, so the support is ongoing. Also, you can stop pledging whenever you want so you're in control. You can pledge any amount you like: it could be $1, $5 or even $0.50. The monthly amount is the same regardless of the number fixes/releases to Easy Copy. Once-off ContributionsIf you prefer to make a once-off contribution, you can contribute via PayPal. Thanks for supporting Easy Copy, Byron
Return to Extension/Theme Releases
Who is online
Users browsing this forum: No registered users and 1 guest
|