b-yp / logseq-link-to-local Goto Github PK
View Code? Open in Web Editor NEWConvert network assets into local assets.
License: MIT License
Convert network assets into local assets.
License: MIT License
I highlight a picture on the Internet and import to Logseq like that
which codes in Logseq:
## [📌](<http://localhost:7026/unread/28#id=1694044793259>) Highlights
> [:img {:style "border-bottom: 5px solid #ffeb3b" :src "https://mmbiz.qpic.cn/sz_mmbiz_png/rKDmmEibFYjn2qgibHAPv7Napbw3LRFx50fRGy97OX4ia0yqibQoUgTFdwKdfllwMLNrxNdicdHCB1YRUIJjcwnKuMg/640?wx_fmt=png" }]
which original link of that picture:
https://mmbiz.qpic.cn/sz_mmbiz_png/rKDmmEibFYjn2qgibHAPv7Napbw3LRFx50fRGy97OX4ia0yqibQoUgTFdwKdfllwMLNrxNdicdHCB1YRUIJjcwnKuMg/640?wx_fmt=png
Could improve and fix it please?
Issue:
Please ensure the local asset filename used is valid on Windows and Android devices. Please avoid using characters such as asterisk (*), question mark (?), or slashes (/ or ) as part of the filename, as they are not valid filename characters on some operating systems.
This issue renders the plugin virtually unusable if you are using it on a Mac, with a Git based workflow, and expect the Logseq data to also be used on other platforms (e.g. Windows or Android).
Context:
I tried to reset my Git repo clone on my Android device to align with the main branch. It failed, with part of the log output included below:
error: unable to create file assets/storages/logseq-link-to-local/1*zRlkbxrRXjeTYeeail-FSA_49759_1_1702693950847.png: Operation not permitted
fatal: Could not reset index file to revision 'origin/main'.
Note the asset filename: 1*zRlkbxrRXjeTYeeail-FSA_49759_1_1702693950847.png
The asterisk (*) character is not a valid filename character on Windows or Android.
Workaround:
I've seen the same issue before when I tried to reset my Windows clone of the Git repo. The only way I could resolve this was use my Mac to manually rename the local assets in Git, manually rename Logseq references to these files to align with the new filenames, commit, and push the change.
Is there a way I can change the location of the files being downloaded? Currently the files are stored in "assets\storages\logseq-link-to-local". I would like to keep them directly in the assets folder.
Hi! Thanks for your work!
When I try to download link like https://arxiv.org/pdf/2306.00477v4.pdf
The plugin loads it into file with name like 2303_2535_1_1701120353129.15647
(without pdf extension). Could you preserve extension of loaded files? Or even more advanced, deduce it from MIME type?
Also, some messages are in Chinese, which is unexpected as Logseq is English-primary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.