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)
- Warn when close to the item limit in current tab
- Automatically abandon the F7 preview after each close
- Clicking on an item in the drop-down list pastes to emacs window automatically instead of previous active window
- Suddenly found that all copied images only display links instead of thumbnails.
- is ctrl+D a Shortcut I don't see it listed in the software preferences HOT 2
- No clipboard items visible
- Open under mouse, but CLI HOT 1
- Having Trouble Creating Global Shortcut to Copy and Paste Previous Item in Clipboard
- CopyQ Not Remembering Window Size Across Multiple Monitors HOT 1
- Encrypt clipboard items database (%APPDATA%\copyq\copyq_tab_XYZ.dat)
- Is there a way to start copyQ minimize to tray direct ? HOT 1
- Different color tag text
- Paste by number not working for last item
- Esc, click out side the copyq window and <copyq toggle> command can't hide completely the copyq window in Fedora 39
- Fail to paste into Blender
- [Feature Request]:Please add a feature option: allow the same item to exist
- CopyQ 7.1.0 on the Mac mini M2, When copying, error pops up: Exception in command: ScriptError: ReferenceError: zwlZ is not defined HOT 4
- Hard-to-read text on clipboard HOT 1
- "Paste Mouse Selection with Keyboard" logistical problem HOT 6
- Copy Q 8.0.0 M1 version doesn't works. HOT 8
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.