Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to import bookmark folders as tags #80

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

levjj
Copy link

@levjj levjj commented Apr 21, 2013

There is no standard way of export tags in Netscape's bookmarks file format. When exporting from Google Bookmarks, folders are used as tags. The following example shows a bookmark that was tagged with History and Programming:

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
  <DT><H3 ADD_DATE="1258826211990949">History</H3>
  <DL><p>
    <DT><A HREF="http://dotnetmasters.com/historyofcfamily.htm" ADD_DATE="1260914469588170">History of the C family of languages</A>
  </DL><p>
  <DT><H3 ADD_DATE="1238826211990949">Programming</H3>
  <DL><p>
    <DT><A HREF="http://dotnetmasters.com/historyofcfamily.htm" ADD_DATE="1260914469588170">History of the C family of languages</A>
  </DL><p>
</DL><p>

In order to support imports from Google Bookmarks (and other services which use folders during the export), I added an option to the import form which uses the folders as tags. For bookmarks with multiple tags the overwrite options needs to be enabled as well. Additionally, the timestamp needs to be adjusted from microseconds to normal unix seconds during the import.

import

The result of a successful import has the right tags for all imported links:

result

@sijnak
Copy link

sijnak commented Apr 21, 2013

I have the same feature available in my proposal of importing files from firefox JSON export. So, when the pull request will be accepted, I'll enable this feature for JSON import also.

@levjj
Copy link
Author

levjj commented Apr 21, 2013

@sijnak That's great! Having a JSON import makes it a lot easier for people to move to Shaarli from Firefox, etc.

@PatrickHonorez
Copy link

@levjj Great option ! How can I benefit from it ? I would like to import my GBookmarks into shaarli, but the loss of the tags is what prevents me to switch. However I am not at all a PHP developper....

@levjj
Copy link
Author

levjj commented Jun 26, 2013

@PatDeLux Until @sebsauvage merges this pull request, you could just clone [this branch](https://github.com/levjj/Shaarli/tree/import-folders-as-tags reposiroty) of Shaarli and import the Google Bookmarks HTML file (be sure to check the "overwrite existing links" option).

@PatrickHonorez
Copy link

@levjj : thanks for replying. Your link "this branch" returns me a 404 error...(sorry to bother you - this Github etc..is 100% new for me - I am mostly developing on SQL Server and VBA)

@levjj
Copy link
Author

levjj commented Jun 26, 2013

@PatDeLux Sorry, should have checked the link. Try this one instead.

@PatrickHonorez
Copy link

Christopher,
Thanks for your work.
I would like to point an issue: I have a lot of GBookmarks tagged "SQL
Server
", and they generate 2 tags in Shaarli: 1 for *SQL *and 1 for *Server
*.
So for me there is definitely a problem for tags containing a space !
Regards,

Patrick Honorez
+352 691-67 68-65

On 26 June 2013 23:06, Christopher S. [email protected] wrote:

@PatDeLux https://github.com/PatDeLux Sorry, should have checked the
link. Try this onehttps://github.com/levjj/Shaarli/tree/import-folders-as-tagsinstead.


Reply to this email directly or view it on GitHubhttps://github.com//pull/80#issuecomment-20080064
.

@levjj
Copy link
Author

levjj commented Jul 3, 2013

Yep, this is an open issue in Shaarli. See #22

@ghost
Copy link

ghost commented Jul 7, 2013

Thanks, I really needed that option.

@silopolis
Copy link

Priceless !

@virtualtam
Copy link

Shaarli (community fork) now uses a dedicated Netscape bookmark parser:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants