[Ext] Easy Copy

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
yemiteliyadu
Posts: 3
Joined: May 6th, 2015, 12:04 pm

Re: [Ext] Easy Copy

Post by yemiteliyadu »

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: 3
Joined: December 2nd, 2011, 3:53 pm

Re: [Ext] Easy Copy

Post by CleverClogs »

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!
computergeoffrey
Posts: 4
Joined: August 10th, 2014, 6:45 am

Re: [Ext] Easy Copy

Post by computergeoffrey »

Now you can properly remap shortcuts between multiple windows if using Firefox 38+ using Customizable Shortcuts. It can be found here: https://github.com/ttaubert/customizabl ... rtcuts.xpi
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

computergeoffrey wrote:Now you can properly remap shortcuts between multiple windows if using Firefox 38+ using Customizable Shortcuts. It can be found here: https://github.com/ttaubert/customizabl ... rtcuts.xpi

Excellent and glad it's working now for you. Thanks for following that up with the developers and updating everyone.
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

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.
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

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.
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

Easy Copy v2.6 is now available:

* (New): Two new variables to copy image details: %image_alt_text% for alt text and %image_source_url% for the image's source URL. Requested by esponki.

If you like Easy Copy, please Flattr it.

Links
Download from Mozilla Add-ons
Easy Copy Home and Documentation
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
evdbogaard
Posts: 1
Joined: May 29th, 2015, 3:02 am

Re: [Ext] Easy Copy

Post by evdbogaard »

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: 2
Joined: May 29th, 2015, 12:56 am

Re: [Ext] Easy Copy

Post by samjesse »

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: 3
Joined: May 6th, 2015, 12:04 pm

Re: [Ext] Easy Copy

Post by yemiteliyadu »

Two similar templates format the results differently with no apparent reason why. Examples are given below … please notice how <p> gets converted to "&lt;p&gt;" 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>&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>

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>

&lt;p&gt;Carl Icahn may be on to something &lt;a href="http://www.bloomberg.com/news/articles/2015-05-18/billionaire-investor-icahn-says-apple-s-shares-are-worth-240"&gt;in his push&lt;/a&gt;&amp;nbsp;for&amp;nbsp;Apple to continue to send more money back to shareholders.&lt;/p&gt;&lt;p&gt;According to new research from Citigroup, companies that have been making higher payouts to their investors&amp;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&amp;nbsp;&lt;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"&gt;ongoing debate&lt;/a&gt;&amp;nbsp;--&amp;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&amp;nbsp;and&amp;nbsp;share buybacks than on investment.&lt;/p&gt;
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

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).
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

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".
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

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 "&lt;p&gt;" 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.
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

Easy Copy is now on Patreon

Easy 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 works
Go 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 Contributions
If you prefer to make a once-off contribution, you can contribute via PayPal.

Thanks for supporting Easy Copy,
Byron
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
oombii
Posts: 55
Joined: February 6th, 2012, 3:08 pm

Re: [Ext] Easy Copy

Post by oombii »

Easy Copy v2.7 is now available:

* New: New variable called %url_full_path% that copies the full path of the URL, ie. the part after the domain. This includes the path, query string and fragment after the domain.

For example, if you have http://www.mysite.com/docs/thedoc.html?check=true then the variable will return docs/thedoc.html?check=true. As requested by samjesse and nickodemos.

Note that the frontslash after the domain is never included - you can add it manually to the template if you wish, eg:

Code: Select all

[url=/%url_full_path%]%title%[/url]


If you like Easy Copy, please support it on Patreon or Flattr it.

Links
Download from Mozilla Add-ons
Easy Copy Home and Documentation
Please support Easy Copy by contributing on Patreon, via PayPal or with a Flattr.
Post Reply