Hi,There is an API, to manage and manipulate bookmars with web-extensions.So it should be possible to "manipulate" them from TW directly. ... But this would be a completely new AddON.
It looks interesting. .. The only problem. .. The day has only 24 hours :/
-mario--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1171c79c-9d7f-425a-bcd2-a4d974196d8an%40googlegroups.com.
There is an API, to manage and manipulate bookmars with web-extensions.So it should be possible to "manipulate" them from TW directly. ... But this would be a completely new AddON.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/85b9a103-0bc2-4827-bf29-320e8e7b35c1n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8ab10072-d5e8-4e74-9982-bdd514fa1b79n%40googlegroups.com.
One of the things to consider is that neither title nor URL are bound to be unique in the bookmarks file, so you would need to guarantee somehow that the title used for each tiddler is unique or some will go missing.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c0625353-feea-48bf-b4c4-519cb7c831e1n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/85b9a103-0bc2-4827-bf29-320e8e7b35c1n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8ab10072-d5e8-4e74-9982-bdd514fa1b79n%40googlegroups.com.
| [ ] { }
This is for both PMario & Mohammad ...PMario wrote:There is an API, to manage and manipulate bookmars with web-extensions.So it should be possible to "manipulate" them from TW directly. ... But this would be a completely new AddON.Ha! Interesting. What is the advantage of that API over BRUTE PARSING?
Hi Mohammad, I think it is time for you to try your hand at some JavaScript :)
This is a good opportunity, the deserializer code is very simple ...... you need to do a String.replace to replace the characters not allowed in tiddler titles.
This is a good opportunity, the deserializer code is very simple ...... you need to do a String.replace to replace the characters not allowed in tiddler titles.Right! It would be useful to see an example of String.replace in the code. Is that using REGULAR EXPRESSIONS?If so there I can help too. But I can't really read JS code. But I'm sure Mohammad will quickly learn how to :-)
I think it is time for you to try your hand at some JavaScript :)
This is a good opportunity, the deserializer code is very simple, it is less than 10 lines of code. If you get stuck I will be happy to help :)
So you need to do a String.replace to replace the characters not allowed in tiddler titles.exports["application/x-bookmarks"] = function(text,fields) {const parser = new DOMParser;const vdoc = parser.parseFromString(text,"text/html");const bookmarkAnchors = vdoc.querySelectorAll("a");var results = [];$tw.utils.each(bookmarkAnchors,function(anchor) {results.push({"add_date" : anchor.getAttribute("add_date"),//"icon": anchor.getAttribute("icon"),"title": anchor.textContent,"url": anchor.getAttribute("href")});});return results;};
The other issue to consider is that in a bookmarks file, the title is not unique. So importing several bookmarks with the same title, only one will survive. So during the parsing, a unique title needs to be created.
On Saturday, May 22, 2021 at 7:19:37 AM UTC+2 Mohammad wrote:Saq,I think the illegal letters by TW need to be scrapped e.g| [ ] { }
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4e0e72be-405f-45b3-8e36-6d1a889abcafn%40googlegroups.com.
Best wishesTT
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/47f8ea7d-68ad-4fe8-945a-450a6180d046n%40googlegroups.com.
TiddlyTweeter wrote...
What is the advantage of that API over BRUTE PARSING?
The html-export doesn't contain the bookmarks tags and description info. So information is lost. ...
Bookmarks can be synced among devices. So it would be nice to modify stuff on the PC and have them synced to the mobile. ...
Theoretically it should be possible to create browser addOns for all major browsers in 1 project. I would like to test this.
Ciao Saq & Mohammadsaq.i...@gmail.com wrote:Hi Mohammad, I think it is time for you to try your hand at some JavaScript :)Right! I'd love to see the outcome of that.Likely Mohammad's new "LINK COMMANDER" TW-tool! :-)This is a good opportunity, the deserializer code is very simple ...... you need to do a String.replace to replace the characters not allowed in tiddler titles.Right! It would be useful to see an example of String.replace in the code. Is that using REGULAR EXPRESSIONS?
If so there I can help too. But I can't really read JS code. But I'm sure Mohammad will quickly learn how to :-)Best wishesTT
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/47f8ea7d-68ad-4fe8-945a-450a6180d046n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4ccfc5e7-a333-4ad8-99c4-466e30f5f185n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/59ef0fc2-66b4-43d7-8469-ee0b97089bf7n%40googlegroups.com.
Hi Mohammad, it looks good!So we can't use the unusedtitle macro from TiddlyWiki because inside the deserializer code, these are not tiddlers yet.What I recommend is to create another empty array where we make the array for results, called resultsTitlesThen inside the $tw.utils loop, where we have results.push, we should also for each bookmark do resultsTitles.push(title). Now we have an array of results titles.
So now we have to add an extra step for creating the title after the regex string replacement, here is pseudo code:while title exists in resultsTitles arraytitle = title + "1"The title variable should now be unique for the bookmarks we are importing.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f73a724e-b8ad-4c81-9956-726b6341266an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f73a724e-b8ad-4c81-9956-726b6341266an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ffd4411a-a18f-419e-a348-b75c2d3460e1n%40googlegroups.com.
@Mohammad yes you need to have a while loop:while(results.Title.indexOf(title) == -1) {title = title + "1";}
Another improvement you can make just to have neater code, is to make a function called getTitle outside and before the $tw.utils.each loop.var getTitle = function(title) {title = title.replace.....
while(title in resultsTitles) {
title = title + "1";}
return title;}
Inside this function you can do the string replacement of unwanted characters and also check for already existing titles in a loop, and return the new title. This is an aesthetic thing though and wont really impact the efficiency of the code.
@TT the regexp is good, Mohammad refers to check for duplicate titles only once instead of in a loop. So if "TiddlyWiki.com" already exists, we have to check if "TiddlyWiki.com1" already exists.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ffd4411a-a18f-419e-a348-b75c2d3460e1n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d7ff28ea-d806-4f79-9475-4ee7a87d3dd6n%40googlegroups.com.
I add documentation and soon I will push it to GitHub!
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fcea22cd-12c9-4e35-a1cb-fe5cb6090c5cn%40googlegroups.com.
That means one can extract all links in a webpage! For example I am visiting aiche.org and if save and add .bookmarks to file name then drag and drop into bookmarker!Tiddlywiki will extract all links!That is a MAGIC ;-)
Interesting! That means one can extract all links in a webpage!
Ciao Mohammad & Saq ...Mohammad wrote:That means one can extract all links in a webpage! For example I am visiting aiche.org and if save and add .bookmarks to file name then drag and drop into bookmarker!Tiddlywiki will extract all links!That is a MAGIC ;-)Right!An issue with The Power of GENERIC <a> EXTRACTION ...1 - You could end up with so MANY Tiddlers it becomes a nightmare to manage! :-)
so ...2 - I SUGGEST each ".bookmarks" import need a UNIQUE ID adding (tag or other field unique IDENTIFIER) so you can DELETE them all if needed (JUST that specific import).WHY?
- In tests with extracting from WikiPedia pages I found out that you can easily add over 200 "Link Tiddlers" to a TW.
- In short, with Scale potential one also needs Scale Removal options too! :-) so ...
3 - PROVIDE USER with a macro to selectively DELETE Tiddlers created by (2).
Just thoughts!TT
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d8d21c80-0a61-4167-b8df-66fadf65a7c5n%40googlegroups.com.
Folks,Doing anything in bulk capable of generating a lot of tiddlers would be supported by using the method the JSON Mangler uses to generate tiddlers from CSV files. pack them into a plugin. Shadow tiddlers are easy to access and can be overridden with edits as needed. Non-plugin JSON tiddlers (of tiddlers) are less easy to access without additional tools. We also have zipping at our disposal but a custom JSON structure to store bookmarks can be made more efficient but less reusable (without additional tools)
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/05c69b56-0ad4-4e10-bd43-49fc556cb472n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9496f2f3-9605-4e76-8178-fecae17ca376n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2ad0f631-df81-4659-96b1-02e34c6978fcn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/20af900e-6538-4017-af93-495d2cb110b9n%40googlegroups.com.