QuietHeart's Site

内容管理方法


目录

本文主要考虑内容管理方面的内容。

和本文类似的一篇文章中,讲述了GTD管理的方式,参见:

这里主要讲述内容管理的方式。

内容管理本文并没有给出一个系统的、官方的方式,只是给出实践中使用的一种方法,或者说是策略。因为这里所说的内容管理,涉及的方面比较杂乱,所以文章结构也有些杂乱,会随着实践的深入和改进而更新。

文档、书签、文件、

1 其它

非问题的,待整理的内容。

1.1 杂乱

为知笔记可以目录无限分级,但是大多还是只能两级,所以内容管理的分类"_xxx"。

1.2 其实这些东西本质上真的可以理解成为内容管理方面的东西。

我现在也不太清楚要做什么,最好能多了解一些相关的东西,可能会让将来的目标更清晰。

我尝试过很多方法和工具,给你推荐几个你可以参考一下,也可以用用它们。 1.DGT GTD。 在Android上面,关于时间管理方面的(GTD),工具,但是这个需要知道一些GTD相关的知识,才能理解它的便利,并且存储方面也能让数据掌握在自己手中。不足的是,存储格式和同步方式有限,但是基本的功能都有了。 2.aTimeLogger 在Android上面的时间记录和统计工具,可以将自己日常任何的、适合自己的、各个方面的事情所消耗的时间记录下来,并且统计,还能设定目标,同步,操作非常简单。 3.为知笔记/云笔记 将自己所有日常文档都归结到一个云端的笔记上,手机、电脑上都能查看,随意导出,脱机浏览。个人感觉比较全面的是为知,易用,扩展强。 4.Git/Emacs+Orgmode 这个是在电脑上,使用方式比较复杂,但是它们能把工作、生活、学习中的一切事情用文本的方式表达出来,并且集中管理、分布存储、既能充分利用网络的便利性,又不会受限于网络,完全可以脱机存储。搜索、统计、查询、导出各种格式等等都完全能够依据个人需要自行定制和扩展,工具的功能取决于你的思维方法。工具很强大,但是不太容易普及,可以看看相关的介绍。

这几个文档可以参考: http://www.mifengtd.cn/categories/time-management/ http://vaqeteart.github.io/categories/note/GTD_Manage_Method.html http://orgmode.org/

1.3 知识管理使用git的原则

  1. 提交的时候,是做比较关键修改的时候,便于历史备份。
  2. 提交的时候,可以是改动了很多的时候。

平时的操作,不用每次都要更新。

1.4 参考资料

emacs,orgmode,jekyll,owncloud

2 WAIT/FORWARD FAQ [1/25]([4%])

问题形式的,待整理的内容。

2.1 NEXT 使用orgmode组织内容管理体系,如何处理大文件、附件的问题?

  • State "NEXT" from "INBOX" [2015-12-03 四 16:21]

2.2 NEXT 如何处理整理好的文档,以及导出的内容?以及内容的更新?以及版本控制?

  • State "NEXT" from "INBOX" [2015-12-03 四 16:21]

2.3 NEXT —— [2015-12-01 二 11:54] 图片和文件等引用链接处理的方式------

  • State "NEXT" from [2016-01-04 一 09:38]

From:/home/miracle/mydata/orgmode/gtd/output/Content_Manage_Method.org

2.3.1 <2015-12-14 一 09:38> 与文章同名的目录存放相应的参考资料

当前图片等链接文件都采用相对链接的方式,但是内容放在data目录下,随着文章的位置变化,可能会修改文章内部的链接。这样不便于移植。

不可能通过配置的方式指定这种相对链接,以便文章转移时不用修改文章内容,所以干脆,在文章目录的父目录中,也就是文章所在_posts目录建立。

方式是: 文章名为xxx在yyy/zzz/_posts中,其对应引用的文件所处位置为:yyy/zzz/post_files/xxx/data 档转移文章xxx到其它_posts目录时,将对应的post_files/xxx目录也转移到对应于_posts的同级目录下即可,不需要修改文章内容,文章中引用的方式是:"../post_files/xxx/data/…"

貌似不行,这样会导致orgmode中的引用路径和html中的引用路径不一样。 如何解决orgmode中引用路径和转换之后引用路径不一致的问题?

2.3.2 <2016-01-04 一 09:39> 三种路径

原则,修改内容之时,不应该修改内容之内的链接。

2.3.2.1 相对路径

即,被引用文件存放在一个目录中,这个目录的名称和文章的名称一样,这个目录的路径和文章在同样的目录中。例如:文章 2015-10-16-test.org 中的引用文件,存放在同样目录下的 2015-10-16-test.files 中,引用之时,只需要使用链接 file://./2015-10-16-test.files/xxx 即可,迁移文章之时,文章和目录一并迁移。

这种方式文章和目录同名(扩展名除外),并且路径相同,适合于文章做为一个整体而存在,其中的内容迁移之时的范围在于当前文章,不会被转移到其他文章中。

2.3.2.2 绝对路径

即,所有被引用的文件放在一个固定的目录中。系统不变即可,但是系统变了,可能需要修改配置。使用与文章内的内容迁移之时,可能会迁移出文章之外。

2.3.2.3 相对绝对路径

属于前两者的折衷。即,所有文章以及引用文件路径都在一个文件系统子目录中,该子目录有自己的层次结构。该目录的父级目录路径在系统中是相对路径,而文章的引用文件是以该目录为“根”,期内引用链接相对该目录本身是“绝对路径”。该方式,文章内的引用文件路径相对文件系统某子目录固定,文章路径视文章所处位置而定,由于引用文件和文章不是在同一目录,如果文章名称不能保证唯一性那么可能会有些问题。 下面是例子:

  1. WAIT/FORWARD -—设置Jekyll中文内引用链接保持在文件路径变化时文件内容不变的方式
    • State "WAIT/FORWARD" from [2016-01-08 五 17:26]
      等待进一步整理

    对于像jekyll中的文章有如下特点:

    1. 内容迁移的时候基本上是文章整体做迁移

      即,其文章内的内容和标题的迁移范围相对固定,不会迁移到其它文章文件中。

    2. 文章对应的文件名称全局基本唯一

      文章名称是以日期做为前缀,只要在每次写文之时,保证每个日期中没有重复的文章文件名(事实上,一天也很难写出很多文章,并且这些文章中有重名的情况),即可保证文章全局唯一。

    所以大致的思路是采用上面提到的相对绝对路径方法。

    大致描述如下:

    1. 链接引用文件存放地

      文章引用的文件,存放在jekyll中data目录的,名为对应文章所在文件扩展名替换为 .files 的目录中。

      假设引用的是一个图片文件, 引用的文章文件名称是 2015-12-17-testexport.org, 导出到jekyll系统中的名称是 2015-12-17-testexport.html, 那么其文章所有被引用的文件都存放在 =data/2015-12-17-testexport.files=。

    2. org文件中引用链接到jekyll导出文件链接的转换

      org文件中的引用链接,在导出到jekyll的html需要进行转换才能正确显示。这里给出了文件、图片、导出到jekyll的org文章在引用时链接的转换方式,如下

      1. org文章使用链接的方式

        org文章中引用本地外部文件和普通orgmode语法一样,如下

        [[file:~/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg][image file]]
        

        图片的语法

        [[file:~/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg]]
        

        org文章中引用其他org文章的语法类似

        [[file:~/mygitrepo/quietheart/mydoc/prepub/orgmode/categories/note/_posts/2015-11-27-gtd_with_orgmode.org][gtd method]]
        
      2. 导出的html链接

        导出结果到jekyll对应的html文件后,对应链接变成

        <a href="file:///home/miracle/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg">image file</a>
        

        图片如下

        <img src="file:///home/miracle/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg" alt="2015-12-17-editor_study_line.jpg" />
        

        org文章如下

        <a href="file:///home/miracle/mygitrepo/quietheart/mydoc/prepub/orgmode/categories/note/_posts/2015-11-27-gtd_with_orgmode.org">gtd method</a>
        
      3. 对导出的html链接进行转换

        这样的结果在jekyll中是无法直接正确显示链接的,需要在导出为html之后,再对相应html文件中相应的链接处进行处理,处理成jekyll可以显示的方式,这里为:

        <a href="/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg">image file</a>
        

        图片链接转换成

        <img src="/data/2015-12-17-testexport.files/2015-12-17-editor_study_line.jpg" alt="2015-12-17-editor_study_line.jpg" />
        

        org文章转换成

        <a href="/categories/note/gtd_with_orgmode.html">gtd method</a>
        
    3. 转换实现

      这里实现上述转换的方法是定义一个替换链接的函数,把它做为hook添加到 org-publish-after-publishing-hook 中。

      大致如下:

      (defun my-update-jekyll-html-link (htmlfile)
      ;;replace the local file link to site relative link in jekyll.
      ;;open
      (setq htmlbuffer (find-file-existing htmlfile))
      
      ;;search
      (goto-char (point-min))
      
      ;;file reference link convert.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<a href=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/data/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-.*?\.files\\)" nil t) 
      (replace-match "\\1\\3" nil nil))
      
      ;;image reference link convert.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<img .*?src=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/data/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-.*?\.files\\)" nil t) 
      (replace-match "\\1\\3" nil nil))
      
      ;;article reference link convert, we don't convert articles in "/_posts" that is not specify categories from file structure.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<a href=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/.*?\\)\\(_posts/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-\\)\\(.*?\.html\\)" nil t) 
      (replace-match "\\1\\3\\5" nil nil))
      
      ;;save and close
      (save-buffer)
      (kill-buffer htmlbuffer)))
      
      (defun my_after_pub_html_hook (orgfile htmlfile) 
      (my-update-jekyll-html-link htmlfile)
      )
      
      (add-hook 'org-publish-after-publishing-hook 'my_after_pub_html_hook)))
      

      关键在于如下三句:

      ;;file reference link convert.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<a href=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/data/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-.*?\.files\\)" nil t) 
      (replace-match "\\1\\3" nil nil))
      
      ;;image reference link convert.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<img .*?src=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/data/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-.*?\.files\\)" nil t) 
      (replace-match "\\1\\3" nil nil))
      
      ;;article reference link convert, we don't convert articles in "/_posts" that is not specify categories from file structure.
      ;;TODO the xxx.files, xxx is better to be replaced by the html file name.
      (while (re-search-forward "\\(<a href=.*?\\)\\(file:.*?quietheart/mydoc/prepub/orgmode\\)\\(/.*?\\)\\(_posts/[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]-\\)\\(.*?\.html\\)" nil t) 
      (replace-match "\\1\\3\\5" nil nil))
      

2.4 LATER 使用kindle代替pocket,标签也是gtd标签来阅读网页。

  • State "LATER" from "INBOX" [2015-12-23 三 13:53]

Capture Time:[2015-12-23 三 11:29]


稍后阅读网页可以借助: http://fivefilters.org 中的"send to kindle"功能,可以做为火狐插件。

不一定只有网页,文本、pocket中的内容等等,只要在浏览器中打开之后,即可使用该插件推送到kindle中, 然后用kindle中的收藏夹代替pocket中的标签。 期间一些内容如果无法在推送时候预览到,可以借助 http://pastepad.fivefilters.org/, pocket中的有些内容就是无法直接预览出来。

2.5 NEXT 若orgmode导出功能能将每次的update时间戳都添加到html文件中就好了,不知道是否有必要。

  • State "NEXT" from "INBOX" [2016-01-05 二 15:39]

Capture Time:[2015-12-30 三 09:45]


update之前的如果可以备份就好了。这样结合git可以看到这些更新中,被提交的更新修改了什么,如果为时间戳加上链接,就可不借助git访问每次修改的内容,当然,每次备份的时候也可以为备份加上一个“old”标记,以及指向最新的文章的标记。

2.6 WAIT/FORWARD 最初如何将某方面的内容纳入内容管理系统

  • State "WAIT/FORWARD" from [2016-01-08 五 17:54]
    等待整理

以jekyll建站过程为例,其中形成的文档或者文章的诞生过程大致如下:

  1. 由于对jekyll建站并无专门的学习和研究,所以该文章内容开始还不够系统。
  2. 文中大多内容是这样产生的

    在jekyll的建站过程中首先遇到某些问题,然后将改问题放于FAQ中,通过orgmode结合GTD方法来管理,FAQ中的问题有些解决,有些没有解决,解决的问题或许会整理到更合适的文章章节中。

  3. 如上方式会快速形成一个jekyll建站文档的雏形,虽然不够系统,也反映了在建站经历的真实过程,便于有兴趣的朋友参考。
  4. 随着实践的增多,和文章内容的丰富,在更为熟悉之时会将所有FAQ相应内容归纳到合适的章节,该文章会逐渐形成一篇系统的文章。

2.7 LATER 如何处理jekyll引文链接的问题,以及链接失效之时如何更新被引用文章?

  • State "LATER" from "INBOX" [2016-01-11 一 10:31]

Capture Time:[2016-01-09 六 17:07]


被引用文章中,列出引用它的所有文章。 ! 被引用文章链接更新之时,更新引用它的文章链接。 引用文章更新之时,更新它的被引用文章中相关的链接。

2.8 WAIT/FORWARD 转移资料之时,为备份可以将原来位置增加一个 "_to_xxx" 的目录。

  • State "WAIT/FORWARD" from "NEXT" [2016-02-09 二 10:01]
    wait for more confirm.
  • State "NEXT" from "INBOX" [2016-02-09 二 10:01]

Capture Time:[2016-01-18 一 13:52]


比如将wiz中的内容转移至git,那么原来wiz的位置增加一个 "_to_git", 然后转移后,将原来wiz中的内容移动到这个"_to_git"目录中,而非删除。 这样可以备份,也可了解这些内容集中到了哪里。

再如baidu中的文件转移至megasync,那么将原来baidu中的内容放到一个 "_to_mega"的目录中。

2.9 LATER 云存储策略

  • State "LATER" from "INBOX" [2016-02-09 二 10:04]

Capture Time:[2016-01-18 一 13:56]


2.9.1 公有云

baidu/weiyun/box/megasync

暂时用megasync存放相对重要的内容。

公有云敏感数据应该考虑安全问题,可考虑encfs做为加密手段。

2.9.2 私有云

考虑 NAS/智能路由 搭建个人云站

2.10 WAIT/FORWARD 本地同步工具

  • State "WAIT/FORWARD" from "CANCEL" [2016-02-09 二 10:04]
    how to decide.
  • State "CANCEL" from "INBOX" [2016-02-09 二 09:57]
    It may no good than git.

Capture Time:[2016-01-21 四 10:25]


定期将一个目录的内容同步到另外一个目录中,以便备份

为防止数据丢失,可以设置两个备份,第二个备份备份周期要长一些,并且是手动的。

考虑用git版本控制?可是如何管理二进制文件?

2.11 LATER 如何收藏好的网页文章而非链接以便脱机查看?

  • State "LATER" from "INBOX" [2016-02-09 二 10:15]

Capture Time:[2016-01-31 日 12:40]


2.12 WAIT/FORWARD 使用maff和mht格式离线保存网页

  • State "WAIT/FORWARD" from "INBOX" [2016-02-25 四 15:44]
    wait for more.

Capture Time:[2016-02-11 四 13:50]


maff和mht都是将当前网页保存成单一离线文件的格式.

firefox下的MAFF Archive Format插件可以实现这一点,并且能直接查看对应文件格式.

另外maff文件格式实质是zip压缩文件,可以将文件解压之后用普通浏览器打开其中的内容(与直接打开maff格式的区别是普通方式打开的网页缺少了源网址来源的信息提示),亦可将解压后的文件夹重新用zip压缩,重命名为xxx.maff用firefox的MAFF Archive Format插件浏览.

当前存放外部引用网页的方式,可以采取maff方式保存(这要求我们只有使用firefox浏览网页),为便于随时浏览,可将保存的文件用zip解压. 需要时再用zip压缩\重命名为maff再打开.

还有一个问题是: 如何随意选取网页的部分并且离线保存?

2.13 INBOX Content jekyll 文章org发布方式

Capture Time:[2016-02-11 四 16:49]


org目录中存放待发布到jekyll的文章,包含草稿性质的文章,但是如果是没有被export到jekyll的文章,就暂时放在根目录_posts中否则放到/categories相应子目录中.

2.14 LATER 云路由

  • State "LATER" from "INBOX" [2016-02-25 四 15:44]

Capture Time:[2016-02-16 二 14:08]


友讯(D-Link)DAP-1160L 150M云分享USB接口直立式云AP

2.15 DONE 考虑用elisp链接实现平时日常工作中文档的引用,资料输出html时链接转换为html链接。

  • State "DONE" from "INBOX" [2016-06-14 二 15:18]

Capture Time:[2016-02-26 五 17:50]


参考 http://orgmode.org/manual/Advanced-configuration.html

借助 hookfilter, 对 link 类型的文档元素进行 filter 。相应的函数定义类似如下:

;; custom link function for export.
(defun my-link-convert-elisp (file_path)
  (setq org-file-prefix org-directory)
  (concat org-file-prefix file_path))

(defun my-link-org-file (file_path)
  (setq org-file-prefix org-directory)
  (find-file (my-link-convert-elisp file_path)))

;;In orgmode file, it is like: [[elisp:(my-link-org-file%20"/home/miracle/mydata/orgmode/gtd/readme.org")][test]]
;;After export to html, it is like: <a href="(my-link-org-file%20"/home/miracle/mydata/orgmode/gtd/readme.org")">test</a>
;;With this link filter, it replace links like <a href="(my-link-org-file%20"/home/miracle/mydata/orgmode/gtd/readme.org")">test</a>
;;to <a href="/home/miracle/mydata/orgmode/gtd/readme.org">test</a>
(defun my-link-elisp-html(link backend info)
  (when (org-export-derived-backend-p backend 'html)
    ;;(print (concat "@@@" link "@@@") t)    
    (replace-regexp-in-string "\\(<a \s*href=\\).*my-link-org-file.*?\\(\".*\\)\")\\(.*\\)" "\\1\\2\\3" link)
    )
)

(add-to-list 'org-export-filter-link-functions 'my-link-elisp-html)

声明之后,假设文档中的链接定义为类似如下方式:

[[elisp:(my-link-org-file%20"/home/miracle/mydata/orgmode/gtd/readme.org")][test]]

导出之时,会将其转换为:

<a href="/home/miracle/mydata/orgmode/gtd/readme.org">test</a>

2.16 INBOX scrap book and git backup scheme for cloud.

Capture Time:[2016-04-25 一 10:31]


2.17 WAIT/FORWARD 优惠、保险信息可以集中到一个地方记录,免得经常忘记这些琐碎的事情

  • State "WAIT/FORWARD" from "INBOX" [2016-08-24 三 11:11]
    目前用gtddgt和带标记的微信收藏管理。

Capture Time:[2016-07-25 一 11:24]


2.18 WAIT/FORWARD git内容管理方式

  • State "WAIT/FORWARD" from "LATER" [2016-08-24 三 11:04]
    已有实践,有待进一步整理。
  • State "LATER" from "INBOX" [2016-08-24 三 11:04]

Capture Time:[2016-08-17 三 16:34]


个人文档,工作项目,等资料用git保存。各个git库创建一个链接到一个同一的路径中,如 ~/mygitrepo, 便于集中访问和云管理。

2.19 MAYBE/FUTURE emacs中写一个方便的创建网摘的工具

  • State "MAYBE/FUTURE" from "INBOX" [2016-08-24 三 11:04]

Capture Time:[2016-08-17 三 16:42]


当前网摘都是保存成maff格式,然后手动在 netarticles 文章中追加相应内容,并拷贝相应的文件到对应附件目录。

例如:

**<2016-08-12 五 16:11> [[http://www.hahack.com/codes/cmake/][CMake 入门实战]]

站内链接:[[/home/miracle/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2016-02-16-net_articles201602.files/CMake_usage][CMake_usage]]

存档:[[/home/miracle/mygitrepo/quietheart/mydoc/prepub/orgmode/data/2016-02-16-net_articles201602.files/CMake_usage.maff][CMake_usage.maff]]

考虑用一种简单的方式来实现这个重复的过程。

2.20 WAIT/FORWARD 云存储

  • State "WAIT/FORWARD" from "INBOX" [2016-08-24 三 11:04]
    已经实践,功能上传不佳。kodexplorer还行,可以通过web访问全盘。

Capture Time:[2016-08-18 四 11:33]


2.20.1 kodexplorer

http://www.oschina.net/p/kodexplorer?fromerr=45mzBoOt

http://kalcaddle.com/download.html

$wget "https://github.com/kalcaddle/KODExplorer/archive/3.22.zip"

解压到www目录下

2.20.1.1 nginx配置
#KODExplorer
server {
    listen       80;
    server_name  112.74.19.38;

    location / {
            root /home/webspace/www/KODExplorer;
            index  index.php;
    }

    location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/webspace/www/KODExplorer$fastcgi_script_name;
            include        fastcgi_params;
    }
}

2.20.2 dzzoffice

2.20.2.1 部署
2.20.2.2 配置

nginx.conf

# another virtual host using mix of IP-, name-, and port-based configuration
#
server {
    listen       80;
    server_name  112.74.19.38;

    location / {
            root /home/webspace/www/dzzoffice/upload;
            index  index.php;
    }

    location /install {
            alias /home/webspace/www/dzzoffice/upload/install;
            index  index.php;
    }

    location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/webspace/www/dzzoffice/upload$fastcgi_script_name;
            include        fastcgi_params;
    }
}
2.20.2.3 安装
+----------------------------------+
 DzzOffice安装方法
+----------------------------------+
1. 上传 upload 目录中的文件到服务器

2. 设置目录属性(windows 服务器可忽略这一步)
	以下这些目录需要可读写权限
	./core/config
	./data 含子目录

3. 执行安装脚本 /install/
   请在浏览器中运行 install 程序,即访问 http://您的域名/install/

4. 参照页面提示,进行安装,直至安装完毕

5.进入桌面,在开始面板中打开“系统工具”应用,更新系统缓存。

2.21 WAIT/FORWARD 本地搭建owncloud存放大文件,搭建git存放文档与源码,搭建webdavfs将本地目录与owncloud挂接

  • State "WAIT/FORWARD" from "INBOX" [2016-08-24 三 11:13]
    已经实践,过程需要进一步整理。

Capture Time:[2016-08-23 二 11:04]


CenterOS上,nginx+php+owncloud.

#yum install davfs2
$sudo mount -t davfs https://localhost/remote.php/webdav/ owncloud_webdav/
Please enter the username to authenticate with server
https://localhost/remote.php/webdav/ or hit enter for none.
  Username: public
Please enter the password to authenticate user public with server
https://localhost/remote.php/webdav/ or hit enter for none.
  Password:  
/sbin/mount.davfs: the server certificate does not match the server name
/sbin/mount.davfs: the server certificate is not trusted
  issuer:      Public, QCY, SZ, GD, CN
  subject:     Public, QCY, SZ, GD, CN
  identity:    QuietHeart
  fingerprint: 45:39:d4:81:81:35:c1:a0:35:ad:74:ca:8a:ee:84:55:d3:d0:74:70
You only should accept this certificate, if you can
verify the fingerprint! The server might be faked
or there might be a man-in-the-middle-attack.
Accept certificate for this session? [y,N] y
/sbin/mount.davfs: warning: the server does not support locks
/sbin/mount.davfs: Warning: can't write entry into mtab, but will mount the file system anyway

2.22 LATER 为orgmode网站添加文件的过程比较麻烦,如何简化?

  • State "LATER" from "INBOX" [2016-08-24 三 11:17]

Capture Time:[2016-08-23 二 14:58]


目前都是,复制文章到 prepub/orgmode, 创建附件目录结构,复制附件,修改文章链接,…

2.23 LATER 考虑使用原生orgmode来生成网站,而不依赖jekyll环境。

  • State "LATER" from [2016-08-24 三 11:15]

2.24 WAIT/FORWARD mygit repo

  • State "WAIT/FORWARD" from "INBOX" [2016-08-24 三 11:16]
    私有内容,加入到jekyll之时,慎重。

Capture Time:[2016-08-23 二 15:14]


mygitrepo with xiaomi center.

in local pc, quietheart for example:

$cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://vaqeteart@bitbucket.org/vaqeteart/quietheart.git #config for bitbucket
        #url = https://github.com/vaqeteart/quietheart.git
[remote "xiaomi"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = xiaomi:/userdisk/data/mygitrepo/quietheart #config for xiaomi
        #url = https://github.com/vaqeteart/quietheart.git
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "gh-pages"]
        remote = origin
        merge = refs/heads/gh-pages

you do

$git add .
$git commit -m 'xxx'
$git push

then for sync to xiaomi, you can do:

$git push xiaomi

or, you can also do on xiaomi:

$git pull

2.25 WAIT/FORWARD 考虑将xiaomi做为第一个最新的提交库,而其它库如github,bitbucket等都尽量不要直接使用,而是用xiaomi来更新。

  • State "WAIT/FORWARD" from "DONE" [2016-10-19 三 16:56]
    wait for more arrange with configure.
  • State "DONE" from "NEXT" [2016-10-19 三 16:56]
  • State "NEXT" from [2016-10-19 三 16:36]

考虑将所有远端用自编写的类 repo 程序,即 rgits 管理,并且,所有其它项目中的内容远端都设置为 rgits 端,即 xiaomi://xxx, 例如,远端为 bitbucket 的quietheart, 在xiaomi上可以知道是 bitbucket的了,所以本地管理的时候,远端只需要是xiaomi即可,每次都更新xiaomi,偶尔会定期到xiaomi路由上进行reset –hard 和 push,使得github或者bitbucket更新。最新的提交都是提交到xiaomi上。

//xiaomi
xxx/quietheart
.git/config:
origin is bitbucket.

//bitbucket
xxx.bigbucket/quietheart

//local
xxx/.git/config:
origin is xiaomi,
and another remote bitbucket.

work:

1. local change
git add/commit/push -> to xiaomi
2. xiaomi 
git push -> to bitbucket

also in step1, we can:
git push bitbucket -> to bitbucket

2.26 LATER orgmode的管理策略

  • State "LATER" from "INBOX" [2017-04-07 五 16:10]

Capture Time:[2016-12-28 三 10:40]

不更新orgmode_with_gtd文档,更新到个人content管理文档中

状态冠以前缀: 1_inbox.org, 2_next.org, …全都是org文件。

项目暂时划分为: _work.org, _life.org, _study.org, _others.org, _active.org

2.27 LATER 关于data数据越来越大的考虑

  • State "LATER" from "INBOX" [2017-04-07 五 16:11]

Capture Time:[2017-01-05 四 15:23]

orgmode中所有标题的引用文件都用data目录管理。data本身再次使用git管理,并且不是repo方式,而是单一的data目录做为git库。这样会越来越大。

目前暂无处理,或者临时建立几个子目录。日后可以考虑用软链接方式实现,将所有标题移到特定的目录集合,不同的集合用类似repo方式同一管理数据,并且,会自动建立一个data目录,将所有的子目录软链接到这个data,这个data并不用git管理。