Comments (10)
How would I export to html ?
from copyq.
@majkinetor What do you mean by "export to HTML"? Be more specific please.
from copyq.
Tab to html page ?
from copyq.
This task is about making backups or moving tabs and items to different installation.
Creating HTML page from tab would be possible using a custom command (importing the page back to the app could be possible but a bit more complicated).
You can do something like following (saves selected HTML and plain text items).
[Command]
Name=Save As HTML...
Command="
copyq:
currentpath(Dir().homePath())
var defaultFileName = 'untitled.html'
var fileName = dialog(
'.title', 'Save Items As HTML...',
'.width', 250,
'File', File(defaultFileName)
) || abort()
if (!fileName)
abort()
var f = File(fileName)
if (!f.open()) {
popup('Failed to open \"' + f.fileName() + '\"', f.errorString())
abort()
}
var html = \"<html><body>\"
var selected = selectedItems()
for (var i in selected) {
var item = getitem(selected[i])
html += \"<p>\"
if ('text/html' in item) {
html += str(item['text/html'])
} else if ('text/plain' in item) {
html += escapeHtml(str(item['text/plain']))
}
html += \"</p>\"
}
html += \"</body></html>\"
f.write(html)
popup(\"Items Saved\", 'Items saved as \"' + f.fileName() + '\".')"
InMenu=true
Icon=\xf0c7
Shortcut=ctrl+s
from copyq.
What about images ?
from copyq.
Sure, images can be saved separately and referenced in HTML or serialized with base64 encoding, e.g.:
if ('text/png' in item) {
html += '<img src="data:image/png;base64,'
html += str(toBase64(item['image/png']))
html += '" />'
}
from copyq.
Totally epic. Thanks.
NOTE: text/png
should be image/png
.
from copyq.
I just upgraded my main machine to Linux Lite 3.0, which required a fresh install. I thought I would simply copy the old database files at /.config/copyq over to the new install but it's not happening. Is there something I'm missing about bringing in the old data? Thanks.
from copyq.
Cancel that. Copying the entire folder over does work. Thanks.
from copyq.
Implementation is in import-export
branch.
What is not imported:
- position and size for windows/dialogs
- filter history
- command history (from Action dialog)
- underlying files for Synchronize plugins
- encrypted tabs are imported decrypted (!)
- public and secret keys from Encryption plugin (needs to be generated again)
For backup it's still better to back up the whole configuration folder manually since everything is not exported and import doesn't replace existing tabs and commands.
from copyq.
Related Issues (20)
- copyq only shows only the reload symbol on start HOT 3
- Main window closes right after opening HOT 2
- Paste in pycharm is unreliable [linux][Focus issue] HOT 2
- v9 and RDP: Remote machine does not see copied items from local machine
- Copyq not working when copying in private browsing (firefox)
- Does not start. HOT 3
- Copyq icon does not show in panel. HOT 1
- wl-copy in wsl no longer displays in clipboard history on copyq version 9.0.0 HOT 4
- Weird flickering of items and menus. HOT 1
- Copyq disappears when I click on it
- Does not work with Wayland (ok switching to X11) HOT 1
- inconsistent search selection
- Command "Ignore *"Password"* window" doesn't work HOT 6
- Manually editing the contents of the Item Content window
- Wish to optimize multi-device data synchronization
- How can I disable text/plain;charset=utf-8 ?
- Add an option to append to the clipboard based on an alt C or other key press HOT 1
- CopyQ v8 and v9 crash often HOT 2
- v8 and v9 are not working on macos 14.5 HOT 6
- CopyQ v9 sometimes fails to copy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copyq.