doc/README_md.html in syclink-0.1.1 vs doc/README_md.html in syclink-0.1.2
- old
+ new
@@ -60,16 +60,26 @@
<li><a href="#label-Command+Line+Interface">Command Line Interface</a>
<li><a href="#label-Templates">Templates</a>
<li><a href="#label-Command+Line">Command Line</a>
<li><a href="#label-Commands">Commands</a>
<li><a href="#label-Create+a+website">Create a website</a>
+ <li><a href="#label-Link+Commands">Link Commands</a>
<li><a href="#label-Add+a+link">Add a link</a>
<li><a href="#label-Update+a+link">Update a link</a>
- <li><a href="#label-Remove+a+Link">Remove a Link</a>
+ <li><a href="#label-Delete+a+Link">Delete a Link</a>
<li><a href="#label-List+links">List links</a>
<li><a href="#label-Find+links">Find links</a>
- <li><a href="#label-List+websites">List websites</a>
+ <li><a href="#label-Merge+Links">Merge Links</a>
+ <li><a href="#label-Import+Commands">Import Commands</a>
+ <li><a href="#label-Firefox">Firefox</a>
+ <li><a href="#label-Chrome">Chrome</a>
+ <li><a href="#label-Internet+Explorer">Internet Explorer</a>
+ <li><a href="#label-Directory">Directory</a>
+ <li><a href="#label-Export+Commands">Export Commands</a>
+ <li><a href="#label-Website+Commands">Website Commands</a>
+ <li><a href="#label-Show+websites">Show websites</a>
+ <li><a href="#label-Check+websites">Check websites</a>
<li><a href="#label-Remove+websites">Remove websites</a>
<li><a href="#label-Make+a+html+representation+of+the+website">Make a html representation of the website</a>
<li><a href="#label-Workflow">Workflow</a>
</ul>
</div>
@@ -89,14 +99,26 @@
<li><a href="./README_md.html">README</a>
<li><a href="./README_rdoc.html">README</a>
- <li><a href="./links_csv.html">links.csv</a>
+ <li><a href="./Rakefile.html">Rakefile</a>
<li><a href="./setup_md.html">setup</a>
+ <li><a href="./spec/syclink/fi/a_txt.html">a</a>
+
+ <li><a href="./spec/syclink/fi/c/ie_url.html">ie.url</a>
+
+ <li><a href="./spec/syclink/gc/Bookmarks.html">Bookmarks</a>
+
+ <li><a href="./spec/syclink/ie/ie_url.html">ie.url</a>
+
+ <li><a href="./spec/syclink/ie/one/ie_url.html">ie.url</a>
+
+ <li><a href="./spec/syclink/ie/one/two/ie_url.html">ie.url</a>
+
<li><a href="./syclink_gemspec.html">syclink.gemspec</a>
<li><a href="./syclink_rdoc.html">syclink</a>
<li><a href="./templates/example_html.html">example.html</a>
@@ -128,10 +150,13 @@
<p>The application is installed with <em>RubyGems</em></p>
<pre>$ gem install syclink</pre>
+<p><a href="http://badge.fury.io/rb/syclink"><img
+src="https://badge.fury.io/rb/syclink.svg"></a></p>
+
<h1 id="label-Command+Line+Interface">Command Line Interface<span><a href="#label-Command+Line+Interface">¶</a> <a href="#top">↑</a></span></h1>
<p><em>syclink</em> comes with a default website template and a CSS file. This
can be adjusted to your convenience.</p>
@@ -142,18 +167,29 @@
<h2 id="label-Command+Line">Command Line<span><a href="#label-Command+Line">¶</a> <a href="#top">↑</a></span></h2>
<p>Following list comprises the commands available</p>
-<p><em>Website commands</em> * website show - show all websites or search for
-websites * website remove - Remove website * website create - Create a HTML
-representation of the website</p>
+<p><em>Website commands</em> website show - show all websites or search for
+websites website remove - Remove website website create - Create a HTML
+representation of the website website check - Check from links that are
+not active anymore (pending)</p>
-<p><em>Link commands</em> * add - Add a link * file - Add links from a file *
-update - Update a link * delete - Delete a link * list - List all links
-with an optional filter * find - Find links based on a search string</p>
+<p><em>Link commands</em> add link - Add a link add file - Add links from a
+file update link - Update a link update file - Update links saved to a
+file delete - Delete one or more links list - List all links with an
+optional filter find - Find links based on a search string merge - Merge
+multiple links with same URL</p>
+<p><em>Import commands</em> import mf - Import Mozilla Firefox bookmarks
+import gc - Import Google Chrome bookmarks import ie - Import Internet
+Explorer bookmarks import dir - Import links to files from a directory</p>
+
+<p><em>Export commands</em> export xml - Export links in XML fromat (pending)
+export json - Export links in JSON format (pending) export csv - Export
+links in csv format</p>
+
<h1 id="label-Commands">Commands<span><a href="#label-Commands">¶</a> <a href="#top">↑</a></span></h1>
<p>Following the commands and how to use them is explained based on examples.</p>
<h2 id="label-Create+a+website">Create a website<span><a href="#label-Create+a+website">¶</a> <a href="#top">↑</a></span></h2>
@@ -161,48 +197,66 @@
<p>A website is send to syclink with the global <code>-w</code> flag. If the
website does not exist yet the user is asked whether to create it and
whether to set it as the default website. This is done with commands that
require a website to operate on.</p>
-<pre>$ syclink -w my-new-website add "http://example.com"</pre>
+<pre>$ syclink -w my-new-website add link "http://example.com"</pre>
-<p>Before the command <code>add</code> is executed the website is created. In
-this case a website called 'my-new-website' is created in the
-default directory at `~/.syc/syclink/websites/my-new-website.website</p>
+<p>Before the command <code>add link</code> is executed the website is
+created. In this case a website called 'my-new-website' is created
+in the default directory at `~/.syc/syclink/websites/my-new-website.website</p>
+<p>If an existing website is specified by the <code>-w</code> command and it
+is different to the default command, the user is asked whether to set the
+selected website as the default one.</p>
+
<p>Commands that require a website are <code>add</code>, <code>update</code>,
-<code>delete</code>, <code>list</code>, <code>find</code> and <code>website
-create</code>.</p>
+<code>delete</code>, <code>list</code>, <code>find</code>, merge, import,
+export and <code>website create</code>.</p>
<p>If no website is specified the default website is used.</p>
+<h1 id="label-Link+Commands">Link Commands<span><a href="#label-Link+Commands">¶</a> <a href="#top">↑</a></span></h1>
+
<h2 id="label-Add+a+link">Add a link<span><a href="#label-Add+a+link">¶</a> <a href="#top">↑</a></span></h2>
<p>A link may have a title, a description and a tag. Title, description and
tag are optional but a link obviously has to be provided. If no title is
given the link is used as the title.</p>
-<pre>$ syclink add --title "Test page" --tag TEST \
- --description 'For testing purposes' http://example.com</pre>
+<pre>$ syclink add link --title "Test page" --tag TEST \
+ --description 'For testing purposes' http://example.com</pre>
<p>It is also possible to add links from a file</p>
-<pre>$ syclink file file-with-links</pre>
+<pre>$ syclink add file file-with-links</pre>
<h2 id="label-Update+a+link">Update a link<span><a href="#label-Update+a+link">¶</a> <a href="#top">↑</a></span></h2>
<p>To update a link the URL has to be specified. If more than one link has the
same URL only the first link is updated.</p>
-<pre>$ syclink update --title "Example" http://example.com</pre>
+<pre>$ syclink update link --title "Example" http://example.com</pre>
-<h2 id="label-Remove+a+Link">Remove a Link<span><a href="#label-Remove+a+Link">¶</a> <a href="#top">↑</a></span></h2>
+<p>It is also possible to update links with links saved to a file</p>
-<p>To remove one or more links the URLs have to be provided.</p>
+<pre>$ syclink update file file-with-links</pre>
-<pre>$ syclink delete http://example.com,http://challenge.com</pre>
+<p>If many links have to be updated they can be exported to a csv file. Then
+the changes are made in the csv file and finally the update command is
+called.</p>
+<pre>$ syclink export csv > exported-links
+edit the links
+$ syclink update file exported-links</pre>
+
+<h2 id="label-Delete+a+Link">Delete a Link<span><a href="#label-Delete+a+Link">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>To delete one or more links the URLs have to be provided.</p>
+
+<pre>$ syclink delete http://example.com http://challenge.com</pre>
+
<h2 id="label-List+links">List links<span><a href="#label-List+links">¶</a> <a href="#top">↑</a></span></h2>
<p>Links can be selected based on a filter. If no filter is given all links
are listed. It is possible to specify the columns to print. Possible
columns are <code>url</code>, <code>name</code>, <code>description</code>
@@ -212,44 +266,206 @@
url | description
-------------------+---------------------
http://example.com | For testing purposes</pre>
+<p>The is a switch <code>--expand</code> and a flag <code>--width</code>. If
+no width is specified list will print the complete content and probably
+mess up the table. With a width specified the the columns are scaled so the
+overall width of the table will be the size of width specified. The expand
+switch will expand the table to the specified width if the table would be
+smaller than width.</p>
+
+<pre>$ syclink list --tag TEST --columns `url,description` --width 70 --expand</pre>
+
<h2 id="label-Find+links">Find links<span><a href="#label-Find+links">¶</a> <a href="#top">↑</a></span></h2>
<p>It is also possible to search for links based on a search string. The find
command searches all attributes of the links and is searching for the
-occurance of the search string within the attributes. So the search is not
-list only exact matches.</p>
+occurance of the search string within the attributes. So the search does
+not list exact matches only.</p>
<pre>$ syclink find --columns 'url,tag' 'example'
url | tag
-------------------+-----
http://example.com | TEST</pre>
-<h2 id="label-List+websites">List websites<span><a href="#label-List+websites">¶</a> <a href="#top">↑</a></span></h2>
+<p>The <code>--expand</code> switch and the <code>--width</code> flag are also
+available with the <code>find</code> command. Details see at <a
+href="#list-links">List links</a>.</p>
+<h2 id="label-Merge+Links">Merge Links<span><a href="#label-Merge+Links">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>If there are multiple links with the same URL, these links can be merged.
+During a merge the first link found will be updated with the join of the
+values of the other links.</p>
+
+<pre>$ syclink add link --tag "Day" --name "Work" --description "Busy time" \
+ http://example.com
+$ syclink add link --tag "Night" --name "Fun" --description "Fun time" \
+ http://example.com
+$ syclink merge
+$ syclink list
+
+url | name | description | tag
+-------------------|-----------|--------------------|---------
+http://example.com | Day,Night | Busy time,Fun time | Work,Fun</pre>
+
+<h1 id="label-Import+Commands">Import Commands<span><a href="#label-Import+Commands">¶</a> <a href="#top">↑</a></span></h1>
+
+<p><a href="spec/syclink/gc/Bookmarks.html">Bookmarks</a> can be imported from
+<em>Mozilla Firefox</em>, <em>Google Chrome</em>, <em>Internet
+Explorer</em> and from directories.</p>
+
+<p>The command is <code>syclink import</code> followed by a sub-command
+indicating from which web browser to import, or from which directory.</p>
+
+<p>In case of importing from Internet Explorer and from a directory the parent
+directories are used as tags beginning below the path to the Internet
+Explorer directory or the standard directory. To control to which level the
+directory should be used a <code>level</code> switch can be used.</p>
+
+<pre>$ syclink import dir --level 2</pre>
+
+<p>will only use two parent directories as tags. It is also possible to
+specify tags to use during import. In this case if level is 1 and also 1
+tag is specified this tag is the only tag used.</p>
+
+<pre>$ syclink import dir --level 1 --tags Books PATH/TO/BOOKS</pre>
+
+<p>If the level is greater than tags specified the difference between tags
+specified and levels is the number of parent directories added as tags</p>
+
+<pre>$ syclink import dir --level 2 --tags Books PATH/TO/BOOKS</pre>
+
+<p>If there is a file in PATH/TO/BOOKS/RUBY then Books and RUBY is used as
+tags.</p>
+
+<h2 id="label-Firefox">Firefox<span><a href="#label-Firefox">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>Firefox stores its bookmarks in a SQLite3 database called places.sqlite.
+With Ubuntu this database is usually located in</p>
+
+<pre>'~/.mozilla/firefox .default/places.sqlite'.</pre>
+
+<p>If you are on Windows the file is located in the user's home directory</p>
+
+<pre>'~/AppData/Roaming/Mozilla/Profiles .default/places.sqlite'.</pre>
+
+<p>The bookmarks on Ubuntu can be imported with</p>
+
+<pre>$ syclink import mf ~/.mozilla/SOME_CRYPTIC_NAME.default/places.sqlite</pre>
+
+<h2 id="label-Chrome">Chrome<span><a href="#label-Chrome">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>Google Chrome stores its bookmarks in a JSON file called <a
+href="spec/syclink/gc/Bookmarks.html">Bookmarks</a>. With Ubuntu this file
+is usually located in</p>
+
+<pre>'~/.config/chromium/Default/Bookmarks'.</pre>
+
+<p>If you are on Windows the file is located in the user's home directory</p>
+
+<pre>'~/AppData/Local/Google/Chrome/User Data/Bookmarks'.</pre>
+
+<p>The bookmarks on Ubuntu can be imported with</p>
+
+<pre>$ syclink import gc ~/.config/chromium/Default/Bookmarks</pre>
+
+<h2 id="label-Internet+Explorer">Internet Explorer<span><a href="#label-Internet+Explorer">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>Internet Explorer stores its bookmarks in a directory structure. The
+bookmarks are located in the user's home directory</p>
+
+<pre class="ruby"><span class="ruby-string">'~/AppData/Favorites'</span>
+</pre>
+
+<p>The bookmarks (of course on Windows) can be imported with</p>
+
+<pre>$ syclink import ie ~/Appdata/Favorites</pre>
+
+<h2 id="label-Directory">Directory<span><a href="#label-Directory">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>The PATH_TO_DIRECTORY can have patterns that allows to import specific
+files.</p>
+
+<p>Examples:</p>
+
+<pre>PATH_TO_DIRECTORY/ *.pdf</pre>
+
+<p>will import all pdf-files in the directories and sub-directory</p>
+
+<pre>PATH_TO_DIRECTORY/ *</pre>
+
+<p>will import all files in the specified directory and sub-directories</p>
+
+<p>To import all files from <code>some-directory</code> call</p>
+
+<pre>$ syclink import dir ~/some-directory/**/*</pre>
+
+<p>If on Windows and the directory contains .URL-files the URL within the
+.URL-file will be used as the link target.</p>
+
+<h1 id="label-Export+Commands">Export Commands<span><a href="#label-Export+Commands">¶</a> <a href="#top">↑</a></span></h1>
+
+<p>If links have to be changed in a buld then it is easier to do so in a file
+and when done updating the links from the file.</p>
+
+<p>The links can be exported with</p>
+
+<pre>$ syclink export csv</pre>
+
+<p>This will print to the standard output. To save it to a file can be done as
+follows</p>
+
+<pre>$ syclink export csv > my-links</pre>
+
+<p>Now we can edit the links in the file and when done updating them like so</p>
+
+<pre>$ sylinks update file my-links</pre>
+
+<h1 id="label-Website+Commands">Website Commands<span><a href="#label-Website+Commands">¶</a> <a href="#top">↑</a></span></h1>
+
+<h2 id="label-Show+websites">Show websites<span><a href="#label-Show+websites">¶</a> <a href="#top">↑</a></span></h2>
+
<p>The websites are saved to <code>~/.syc/syclink/websites/</code> and the
html representations are saved to <code>~/.syc/syclink/html/</code>. When
listing websites both <em>webstites</em> and <em>html</em> files are
listed.</p>
-<p>The following command will list all websites</p>
+<p>The following command will list all websites indicating the default website</p>
-<pre>$ syclink website list</pre>
+<pre>$ syclink website show
+[default] ~/.syc/syclink/website/one.website
+ ~/.syc/syclink/website/two.website</pre>
<p>To list websites based on a search string the search string has to be send
-to the list command</p>
+to the show command</p>
-<pre>$ syclink website list "example"</pre>
+<pre>$ syclink website show "example"</pre>
-<p>If the <code>--exact</code> switch is given the command is only listing
-exact matches of the search string</p>
+<p>If the <code>--exact</code> switch is given the command is listing exact
+matches of the search string only</p>
-<pre>$ syclink website list -e "http://example.com"</pre>
+<pre>$ syclink website find -e "http://example.com"</pre>
+<h2 id="label-Check+websites">Check websites<span><a href="#label-Check+websites">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>The <code>website check</code> command checks the availability of the urls
+and files. The result can be printed to the STDOUT in a table format or as
+CSV.</p>
+
+<pre>$ syclink website check --table --width 70 --available --unavailable</pre>
+
+<p>Available URLs or Files show a response “200” and unavailable show “Error”.
+It is also possible to choose upon the columns to print. Available columns
+are <code>url</code> and <code>response</code>. If no columns flag is
+provided both columns are printed.</p>
+
+<pre>$ syclink website check --columns "url,response" --table</pre>
+
<h2 id="label-Remove+websites">Remove websites<span><a href="#label-Remove+websites">¶</a> <a href="#top">↑</a></span></h2>
<p>Websites and their html representations can be deleted based on a filter
string. To delete all websites and respective html representation the
filter string '*' can be provided</p>
@@ -297,19 +513,16 @@
overridden by <em>sass</em>.</p>
<h1 id="label-Workflow">Workflow<span><a href="#label-Workflow">¶</a> <a href="#top">↑</a></span></h1>
<p>To create a website the steps are as follows</p>
-<ul><li>
-<p>add links to a website</p>
-</li><li>
-<p>create the html representation</p>
-</li></ul>
+<p>add links to a website create the html representation</p>
+
<p>Following is showing the above sequence in commands</p>
-<pre>$ syclink -w example add "http://example.com" --tag EXAMPLE
-$ syclink add "http://github.com" --tag DEVELOPMENT
+<pre>$ syclink -w example add link "http://example.com" --tag EXAMPLE
+$ syclink add link "http://github.com" --tag DEVELOPMENT
$ syclink website create</pre>
</main>